mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
kubeadm: fixed warning nil logging
This commit is contained in:
parent
da20ffdae6
commit
7249ba2872
@ -335,8 +335,12 @@ func (sysver SystemVerificationCheck) Check() (warnings, errors []error) {
|
|||||||
// Run all validators
|
// Run all validators
|
||||||
for _, v := range validators {
|
for _, v := range validators {
|
||||||
warn, err := v.Validate(system.DefaultSysSpec)
|
warn, err := v.Validate(system.DefaultSysSpec)
|
||||||
errs = append(errs, err)
|
if err != nil {
|
||||||
warns = append(warns, warn)
|
errs = append(errs, err)
|
||||||
|
}
|
||||||
|
if warn != nil {
|
||||||
|
warns = append(warns, warn)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err := utilerrors.NewAggregate(errs)
|
err := utilerrors.NewAggregate(errs)
|
||||||
@ -575,7 +579,7 @@ func RunChecks(checks []Checker, ww io.Writer) error {
|
|||||||
for _, c := range checks {
|
for _, c := range checks {
|
||||||
warnings, errs := c.Check()
|
warnings, errs := c.Check()
|
||||||
for _, w := range warnings {
|
for _, w := range warnings {
|
||||||
io.WriteString(ww, fmt.Sprintf("[preflight] WARNING: %s\n", w))
|
io.WriteString(ww, fmt.Sprintf("[preflight] WARNING: %v\n", w))
|
||||||
}
|
}
|
||||||
found = append(found, errs...)
|
found = append(found, errs...)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user