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 ¶
const ( // 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" )
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" )
const (
DiagnosticsRecommendedName = "diagnostics"
)
Variables ¶
This section is empty.
Functions ¶
func NewCmdDiagnostics ¶
NewCmdDiagnostics is the base command for running any diagnostics.
Types ¶
type DiagnosticsOptions ¶
type DiagnosticsOptions struct { // list of diagnostic names to limit what is run RequestedDiagnostics []string // specify locations of host config files MasterConfigLocation string NodeConfigLocation string // specify context name to be used for cluster-admin access ClientClusterContext string // indicate this is an openshift host despite lack of other indicators IsHost bool // specify the image template to use for DiagnosticPod ImageTemplate variable.ImageTemplate // 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 // LogOptions determine globally what the user wants to see and how. LogOptions *log.LoggerOptions // The Logger is built with the options and should be used for all diagnostic output. Logger *log.Logger }
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(args []string) error
Complete fills in DiagnosticsOptions needed if the command is actually invoked.
func (DiagnosticsOptions) Run ¶
func (o DiagnosticsOptions) Run(diagnostics []types.Diagnostic) (bool, error, int, int)
Run performs the actual execution of diagnostics once they're built.
func (DiagnosticsOptions) RunDiagnostics ¶
func (o DiagnosticsOptions) RunDiagnostics() (bool, error, int, int)
RunDiagnostics builds diagnostics based on the options and executes them, returning a summary.
func (*DiagnosticsOptions) Validate ¶
func (o *DiagnosticsOptions) Validate() error
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 // The Logger is built with the options and should be used for all diagnostic output. Logger *log.Logger }
PodDiagnosticsOptions holds values received from environment variables for the command to operate.
func (PodDiagnosticsOptions) BuildAndRunDiagnostics ¶
func (o PodDiagnosticsOptions) BuildAndRunDiagnostics() (bool, error, int, int)
BuildAndRunDiagnostics builds diagnostics based on the options and executes them, returning a summary.
func (*PodDiagnosticsOptions) Complete ¶
func (o *PodDiagnosticsOptions) Complete(args []string) error
Complete fills in PodDiagnosticsOptions needed if the command is actually invoked.