-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
4.20
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
After updating Kubernetes dependencies in openshift/origin, the `openshift-tests images` command now outputs log messages that contaminate the generated image mapping and break existing scripts. The updated dependencies (kubectl's i18n package and cadvisor) print initialization logs during package import, which make it impossible to prevent the extra logging, unless we get rid of those dependencies. In our CI, we worked around this by updating calls to `openshift-tests image` to filter out the unintended logging: https://github.com/openshift/release/pull/67184 However, we need to make sure the output of the images command only contains the mapped images. A possible solution to that, would be to increase the log level in the upstream dependencies. Here's an example of a patched vendor: diff --git i/vendor/github.com/google/cadvisor/container/factory.go w/vendor/github.com/google/cadvisor/container/factory.go index dfe6de6437..0748ac65b3 100644 --- i/vendor/github.com/google/cadvisor/container/factory.go +++ w/vendor/github.com/google/cadvisor/container/factory.go @@ -192,7 +192,7 @@ func RegisterPlugin(name string, plugin Plugin) error { if _, found := plugins[name]; found { return fmt.Errorf("Plugin %q was registered twice", name) } - klog.V(4).Infof("Registered Plugin %q", name) + klog.V(6).Infof("Registered Plugin %q", name) plugins[name] = plugin return nil } diff --git i/vendor/k8s.io/kubectl/pkg/util/i18n/i18n.go w/vendor/k8s.io/kubectl/pkg/util/i18n/i18n.go index d850b283db..7b23659abd 100644 --- i/vendor/k8s.io/kubectl/pkg/util/i18n/i18n.go +++ w/vendor/k8s.io/kubectl/pkg/util/i18n/i18n.go @@ -154,7 +154,7 @@ func LoadTranslations(root string, getLanguageFn func() string) error { fmt.Sprintf("%s/%s/LC_MESSAGES/k8s.mo", root, langStr), }- klog.V(3).Infof("Setting language to %s", langStr) + klog.V(6).Infof("Setting language to %s", langStr) // TODO: list the directory and load all files. buf := new(bytes.Buffer) w := zip.NewWriter(buf) That said, these changes would need to be proposed upstream, and additional investigation is warranted to explore potentially cleaner solutions.
Version-Release number of selected component (if applicable):
4.20
How reproducible:
Always
Steps to Reproduce:
1. Run openshift-tests images 2. 3.
Actual results:
Expected results:
Additional info: