kubeadm: fixed warning nil logging
This commit is contained in:
		@@ -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...)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user