diagnostics

package
v3.9.0-alpha.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2018 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Overview

OpenShift v3 Diagnostics

This is a tool to help administrators and users resolve common problems that occur with OpenShift v3 deployments. It will likely remain under continuous development as the OpenShift Origin project progresses.

The goals of the diagnostics tool are summarized in the Trello card https://trello.com/c/LdUogKuN; Diagnostics are included as an `openshift` sub-command that analyzes OpenShift as it is able, whether from the perspective of an OpenShift client or on an OpenShift host.

View pkg/diagnostics/README.md for more details on developing diagnostics.

Index

Constants

View Source
const (
	// Command name
	DiagnosticsRecommendedName    = "diagnostics"
	AllDiagnosticsRecommendedName = "all"

	// Standard locations for the host config files OpenShift uses.
	StandardMasterConfigPath string = "/etc/origin/master/master-config.yaml"
	StandardNodeConfigPath   string = "/etc/origin/node/node-config.yaml"
)
View Source
const (
	// Standard locations for the secrets mounted in pods
	StandardMasterCaPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
	StandardTokenPath    = "/var/run/secrets/kubernetes.io/serviceaccount/token"
	StandardMasterUrl    = "https://kubernetes.default.svc.cluster.local"
)

Variables

This section is empty.

Functions

func NewCmdDiagnostics

func NewCmdDiagnostics(name string, fullName string, out io.Writer) *cobra.Command

NewCmdDiagnostics is the base command for running a standard set of diagnostics with generic options only.

func NewCmdDiagnosticsAll added in v3.10.0

func NewCmdDiagnosticsAll(name string, fullName string, out io.Writer, available types.DiagnosticList) *cobra.Command

NewCmdDiagnosticsAll is the command for running ALL diagnostics and providing all flags.

func NewCmdDiagnosticsIndividual added in v3.10.0

func NewCmdDiagnosticsIndividual(name string, fullName string, out io.Writer, diagnostic types.Diagnostic) *cobra.Command

NewCmdDiagnosticsIndividual is a parameterized subcommand providing a single diagnostic and its flags.

func NewCommandNetworkPodDiagnostics

func NewCommandNetworkPodDiagnostics(name string, out io.Writer) *cobra.Command

NewCommandNetworkPodDiagnostics is the command for running network diagnostics.

func NewCommandPodDiagnostics

func NewCommandPodDiagnostics(name string, out io.Writer) *cobra.Command

NewCommandPodDiagnostics is the command for running pod diagnostics.

Types

type DiagnosticsOptions

type DiagnosticsOptions struct {
	// list of diagnostic name(s) to run
	RequestedDiagnostics sets.String
	// flag bindings for any diagnostics that require them
	ParameterizedDiagnostics types.ParameterizedDiagnosticMap

	// list available diagnostics and exit
	ListAll bool
	// specify locations of host config files
	MasterConfigLocation string
	NodeConfigLocation   string
	// indicate this is an openshift host despite lack of other indicators
	IsHost bool
	// When true, prevent diagnostics from changing API state (e.g. creating something)
	PreventModification bool
	// We need a factory for creating clients. Creating a factory
	// creates flags as a byproduct, most of which we don't want.
	// The command creates these and binds only the flags we want.
	ClientFlags *flag.FlagSet
	Factory     *osclientcmd.Factory
	// specify context name to be used for cluster-admin access
	ClientClusterContext string
	// LogOptions determine globally what the user wants to see and how.
	LogOptions *log.LoggerOptions
	// contains filtered or unexported fields
}

DiagnosticsOptions holds values received from command line flags as well as other objects generated for the command to operate.

func (*DiagnosticsOptions) Complete

func (o *DiagnosticsOptions) Complete(c *cobra.Command, args []string) error

Complete fills in DiagnosticsConfig needed if the command is actually invoked.

func (*DiagnosticsOptions) Logger

func (o *DiagnosticsOptions) Logger() *log.Logger

returns the logger built according to options (must be Complete()ed)

func (DiagnosticsOptions) RunDiagnostics

func (o DiagnosticsOptions) RunDiagnostics() error

RunDiagnostics builds diagnostics based on the options and executes them. Returns: error (raised during construction of diagnostics; may be an aggregate error object),

type NetworkPodDiagnosticsOptions

type NetworkPodDiagnosticsOptions struct {
	// list of diagnostic names to limit what is run
	RequestedDiagnostics []string
	// LogOptions determine globally what the user wants to see and how.
	LogOptions *log.LoggerOptions
	// contains filtered or unexported fields
}

NetworkPodDiagnosticsOptions holds values received from environment variables for the command to operate.

func (*NetworkPodDiagnosticsOptions) Complete

func (o *NetworkPodDiagnosticsOptions) Complete(c *cobra.Command, args []string) (err error)

Complete fills in NetworkPodDiagnosticsOptions needed if the command is actually invoked.

func (*NetworkPodDiagnosticsOptions) Logger

Logger returns the logger built according to options (must be Complete()ed)

func (NetworkPodDiagnosticsOptions) RunDiagnostics

func (o NetworkPodDiagnosticsOptions) RunDiagnostics() error

RunDiagnostics builds diagnostics based on the options and executes them, returning a summary.

type PodDiagnosticsOptions

type PodDiagnosticsOptions struct {
	// list of diagnostic names to limit what is run
	RequestedDiagnostics []string
	// LogOptions determine globally what the user wants to see and how.
	LogOptions *log.LoggerOptions
	// contains filtered or unexported fields
}

PodDiagnosticsOptions holds values received from environment variables for the command to operate.

func (*PodDiagnosticsOptions) Complete

func (o *PodDiagnosticsOptions) Complete(c *cobra.Command, args []string) error

Complete fills in PodDiagnosticsOptions needed if the command is actually invoked.

func (*PodDiagnosticsOptions) Logger

func (o *PodDiagnosticsOptions) Logger() *log.Logger

returns the logger built according to options (must be Complete()ed)

func (PodDiagnosticsOptions) RunDiagnostics

func (o PodDiagnosticsOptions) RunDiagnostics() error

RunDiagnostics builds diagnostics based on the options and executes them, returning fatal error(s) only.

Directories

Path Synopsis
diagnostics
log
pod

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL