Documentation ¶
Overview ¶
Package cluster handles cluster analysis
Package cluster handles cluster analysis ¶
Package cluster handles cluster analysis ¶
Package cluster handles cluster analysis ¶
Package cluster handles cluster analysis ¶
Package cluster handles cluster analysis ¶
Package cluster handles cluster analysis ¶
Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
Package cluster handles cluster analysis
Index ¶
- Variables
- func AnalyzePodIssues(log *zap.SugaredLogger, clusterRoot string) (err error)
- func AnalyzeVerrazzano(log *zap.SugaredLogger, clusterRoot string) (err error)
- func AnalyzeVerrazzanoInstallIssue(log *zap.SugaredLogger, clusterRoot string, podFile string, pod corev1.Pod, ...) (err error)
- func FindProblematicDeployments(deploymentList *appsv1.DeploymentList) (deployments []appsv1.Deployment)
- func GetDeploymentList(log *zap.SugaredLogger, path string) (deploymentList *appsv1.DeploymentList, err error)
- func GetEventList(log *zap.SugaredLogger, path string) (eventList *corev1.EventList, err error)
- func GetEventsRelatedToPod(log *zap.SugaredLogger, clusterRoot string, pod corev1.Pod, ...) (podEvents []corev1.Event, err error)
- func GetEventsRelatedToService(log *zap.SugaredLogger, clusterRoot string, service corev1.Service, ...) (serviceEvents []corev1.Event, err error)
- func GetPodList(log *zap.SugaredLogger, path string) (podList *corev1.PodList, err error)
- func GetServiceList(log *zap.SugaredLogger, path string) (serviceList *corev1.ServiceList, err error)
- func IsContainerNotReady(conditions []corev1.PodCondition) bool
- func IsDeploymentProblematic(deployment *appsv1.Deployment) bool
- func IsPodPending(pod corev1.Pod) bool
- func IsPodProblematic(pod corev1.Pod) bool
- func IsVerrazzanoInstallJobPod(pod corev1.Pod) bool
- func IsVerrazzanoUninstallJobPod(pod corev1.Pod) bool
- func RunAnalysis(log *zap.SugaredLogger, rootDirectory string) (err error)
- type StringSlice
Constants ¶
This section is empty.
Variables ¶
var ClusterDumpDirectoriesRe = regexp.MustCompile(`.*/cluster-dump$`)
ClusterDumpDirectoriesRe is used for finding cluster-dump directory name matches
var ErrorSearchRe = regexp.MustCompile(`(?i).*error.*`)
ErrorSearchRe is used for searching for case insensitive "error". This is useful when we know there is a problem lurking but we can't identify the specific issue and are trying to capture relevant information to include in support data from logs and events
var EventReasonFailedRe = regexp.MustCompile(`.*Failed.*`)
EventReasonFailedRe is used for finding event reason failures
var LogFilesMatchRe = regexp.MustCompile(`logs.txt`)
LogFilesMatchRe is used for finding pod log files in a cluster dump
var PodFilesMatchRe = regexp.MustCompile(`pods.json`)
PodFilesMatchRe is used for finding pod files in a cluster dump
var WideErrorSearchRe = regexp.MustCompile(`(?i).*error.*|.*failed.*`)
WideErrorSearchRe is used for casting a wider net while looking for issues TBD: .*ERROR.*|.*Error.*|.*FAILED.*
Functions ¶
func AnalyzePodIssues ¶
func AnalyzePodIssues(log *zap.SugaredLogger, clusterRoot string) (err error)
AnalyzePodIssues analyzes pod issues. It starts by scanning for problem pod phases in the cluster and drill down from there.
func AnalyzeVerrazzano ¶
func AnalyzeVerrazzano(log *zap.SugaredLogger, clusterRoot string) (err error)
AnalyzeVerrazano handles high level checking for Verrazzano itself. Note that we are not necessarily going to drill deeply here and we may actually handle scenarios as part of the other drill-downs separately
func AnalyzeVerrazzanoInstallIssue ¶
func AnalyzeVerrazzanoInstallIssue(log *zap.SugaredLogger, clusterRoot string, podFile string, pod corev1.Pod, issueReporter *report.IssueReporter) (err error)
AnalyzeVerrazzanoInstallIssue is called when we have reason to believe that the installation has failed
func FindProblematicDeployments ¶
func FindProblematicDeployments(deploymentList *appsv1.DeploymentList) (deployments []appsv1.Deployment)
FindProblematicDeployments will find and return all deployments deemed problematic in the deploymentList
func GetDeploymentList ¶
func GetDeploymentList(log *zap.SugaredLogger, path string) (deploymentList *appsv1.DeploymentList, err error)
GetDeploymentList gets an deployment list
func GetEventList ¶
GetEventList gets an event list
func GetEventsRelatedToPod ¶
func GetEventsRelatedToPod(log *zap.SugaredLogger, clusterRoot string, pod corev1.Pod, timeRange *files.TimeRange) (podEvents []corev1.Event, err error)
GetEventsRelatedToPod gets events related to a pod
func GetEventsRelatedToService ¶
func GetEventsRelatedToService(log *zap.SugaredLogger, clusterRoot string, service corev1.Service, timeRange *files.TimeRange) (serviceEvents []corev1.Event, err error)
GetEventsRelatedToService gets events related to a service
func GetPodList ¶
GetPodList gets a pod list
func GetServiceList ¶
func GetServiceList(log *zap.SugaredLogger, path string) (serviceList *corev1.ServiceList, err error)
GetServiceList gets a service list
func IsContainerNotReady ¶
func IsContainerNotReady(conditions []corev1.PodCondition) bool
IsContainerNotReady will return true if the are PodConditions indicate the ContainersNotReady TODO: Extend for transition time correlation (ie: change from bool to struct)
func IsDeploymentProblematic ¶
func IsDeploymentProblematic(deployment *appsv1.Deployment) bool
IsDeploymentProblematic returns a boolean indicating whether a deployment is deemed problematic or not
func IsPodPending ¶
IsPodPending returns a boolean indicating whether a pod is pending or not
func IsPodProblematic ¶
IsPodProblematic returns a boolean indicating whether a pod is deemed problematic or not
func IsVerrazzanoInstallJobPod ¶
IsVerrazzanoInstallJobPod returns true if the pod is an install job related pod for Verrazzano
func IsVerrazzanoUninstallJobPod ¶
IsVerrazzanoUninstallJobPod returns true if the pod is an uninstall job related pod for Verrazzano
func RunAnalysis ¶
func RunAnalysis(log *zap.SugaredLogger, rootDirectory string) (err error)
RunAnalysis is the main entry analysis function