Documentation ¶
Index ¶
- Constants
- Variables
- func CheckMessageFileIssue()
- func FixOrphanedPodIssue(line string) bool
- func FixReferenceMountIssue(line string) bool
- func GlobalConfigSet()
- func IsFileExisting(filename string) bool
- func ReadFileLinesFromHost(fname string) []string
- func Run(cmd string) (string, error)
- func StorageOM()
- type GlobalConfig
Constants ¶
View Source
const ( // SysLog log file SysLog = "/var/log/messages" // NsenterCmd is nsenter mount command NsenterCmd = "/nsenter --mount=/proc/1/ns/mnt" // IssueMessageFile tag IssueMessageFile = "ISSUE_MESSAGE_FILE" // IssueBlockReference tag IssueBlockReference = "ISSUE_BLOCK_REFERENCE" // IssueOrphanedPod tag IssueOrphanedPod = "ISSUE_ORPHANED_POD" // MessageFileLines tag MessageFileLines = "MESSAGE_FILE_LINES" )
View Source
const (
// MountInfo mount file
MountInfo = "/proc/mounts"
)
Variables ¶
View Source
var ( // FixedPodList fix pod FixedPodList = map[string]string{} // K8sMounter mounter K8sMounter = k8smount.New("") )
Functions ¶
func CheckMessageFileIssue ¶
func CheckMessageFileIssue()
CheckMessageFileIssue check/fix issues from message file
func FixOrphanedPodIssue ¶
FixOrphanedPodIssue Pod Like: Jul 10 18:55:49 kubelet: E0710 18:55:49.251132 7643 kubelet_volumes.go:154] orphaned pod "a60244b2-e6ee-4a63-b311-13f7b29ef49a" found, but volume paths are still present on disk : There were a total of 1 errors similar to this. Turn up verbosity to see them.
func FixReferenceMountIssue ¶
FixReferenceMountIssue remove reference links error message: The device %q is still referenced from other Pods;
func IsFileExisting ¶
IsFileExisting check file exist in volume driver;
func ReadFileLinesFromHost ¶
ReadFileLinesFromHost read file from /var/log/messages
Types ¶
type GlobalConfig ¶
type GlobalConfig struct { IssueMessageFile bool MessageFileTailLines int IssueBlockReference bool IssueOrphanedPod bool }
GlobalConfig save global values for om
var ( // GlobalConfigVar var GlobalConfigVar GlobalConfig )
Click to show internal directories.
Click to hide internal directories.