Merge pull request #81818 from Klaven/cleanup_system_validators
removal of klog from validaters
This commit is contained in:
@@ -26,7 +26,6 @@ go_library(
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library",
|
||||
"//vendor/github.com/blang/semver:go_default_library",
|
||||
"//vendor/github.com/pkg/errors:go_default_library",
|
||||
"//vendor/k8s.io/klog:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@@ -32,7 +32,6 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
|
||||
errorsutil "k8s.io/apimachinery/pkg/util/errors"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
var _ Validator = &KernelValidator{}
|
||||
@@ -255,12 +254,7 @@ func (k *KernelValidator) parseKernelConfig(r io.Reader) (map[string]kConfigOpti
|
||||
continue
|
||||
}
|
||||
fields := strings.Split(line, "=")
|
||||
if len(fields) != 2 {
|
||||
klog.Errorf("Unexpected fields number in config %q", line)
|
||||
continue
|
||||
}
|
||||
config[fields[0]] = kConfigOption(fields[1])
|
||||
config[fields[0]] = kConfigOption(fields[1][0])
|
||||
}
|
||||
return config, nil
|
||||
|
||||
}
|
||||
|
@@ -26,7 +26,6 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
|
||||
errorsutil "k8s.io/apimachinery/pkg/util/errors"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// semVerDotsCount is the number of dots in a valid semantic version.
|
||||
@@ -127,7 +126,6 @@ func (validator *packageValidator) validate(packageSpecs []PackageSpec, manager
|
||||
// Get the version of the package on the running machine.
|
||||
version, err := manager.getPackageVersion(packageName)
|
||||
if err != nil {
|
||||
klog.V(1).Infof("Failed to get the version for the package %q: %s\n", packageName, err)
|
||||
errs = append(errs, err)
|
||||
validator.reporter.Report(nameWithVerRange, "not installed", bad)
|
||||
continue
|
||||
@@ -145,7 +143,6 @@ func (validator *packageValidator) validate(packageSpecs []PackageSpec, manager
|
||||
// the version is in the range.
|
||||
sv, err := semver.Make(toSemVer(version))
|
||||
if err != nil {
|
||||
klog.Errorf("Failed to convert %q to semantic version: %s\n", version, err)
|
||||
errs = append(errs, err)
|
||||
validator.reporter.Report(nameWithVerRange, "internal error", bad)
|
||||
continue
|
||||
|
Reference in New Issue
Block a user