cluster

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: UPL-1.0 Imports: 12 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var ClusterDumpDirectoriesRe = regexp.MustCompile(`.*/cluster-dump$`)

ClusterDumpDirectoriesRe is used for finding cluster-dump directory name matches

View Source
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

View Source
var EventReasonFailedRe = regexp.MustCompile(`.*Failed.*`)

EventReasonFailedRe is used for finding event reason failures

View Source
var LogFilesMatchRe = regexp.MustCompile(`logs.txt`)

LogFilesMatchRe is used for finding pod log files in a cluster dump

View Source
var PodFilesMatchRe = regexp.MustCompile(`pods.json`)

PodFilesMatchRe is used for finding pod files in a cluster dump

View Source
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

func GetEventList(log *zap.SugaredLogger, path string) (eventList *corev1.EventList, err error)

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

func GetPodList(log *zap.SugaredLogger, path string) (podList *corev1.PodList, err error)

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

func IsPodPending(pod corev1.Pod) bool

IsPodPending returns a boolean indicating whether a pod is pending or not

func IsPodProblematic

func IsPodProblematic(pod corev1.Pod) bool

IsPodProblematic returns a boolean indicating whether a pod is deemed problematic or not

func IsVerrazzanoInstallJobPod

func IsVerrazzanoInstallJobPod(pod corev1.Pod) bool

IsVerrazzanoInstallJobPod returns true if the pod is an install job related pod for Verrazzano

func IsVerrazzanoUninstallJobPod

func IsVerrazzanoUninstallJobPod(pod corev1.Pod) bool

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

Types

type StringSlice

type StringSlice []string

StringSlice is a string slice

Jump to

Keyboard shortcuts

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