Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove config yaml error log messages #1224

Open
vr4manta opened this issue Aug 28, 2024 · 0 comments · May be fixed by #1225
Open

Remove config yaml error log messages #1224

vr4manta opened this issue Aug 28, 2024 · 0 comments · May be fixed by #1225
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@vr4manta
Copy link

vr4manta commented Aug 28, 2024

What happened?

When deploying clusters, the cluster may be using either INI or YAML configuration for the vsphere cloud provider. All of our existing clusters (OpenShift) haven't migrated to using the newer YAML format. This is resulting in the logging of error messages that can be misleading since the INI is present and loads correctly. The logging in this case should either be removed in the YAML module or be made configurable so clients using the config module can suppress these messages.

An example of loading INI config with log output.

E0828 14:08:33.586780       1 config_yaml.go:208] Unmarshal failed: yaml: unmarshal errors:
  line 1: cannot unmarshal !!seq into config.CommonConfigYAML
W0828 14:08:33.586794       1 config.go:264] ReadConfigYAML failed: yaml: unmarshal errors:
  line 1: cannot unmarshal !!seq into config.CommonConfigYAML
I0828 14:08:33.586894       1 config.go:272] ReadConfig INI succeeded. INI-based cloud-config is deprecated and will be removed in 2.0. Please use YAML based cloud-config.
I0828 14:08:33.586924       1 config.go:283] Config initialized

It would be ideal to just have the error log calls be removed in config_yaml.go like it is done in the config_ini_legacy.go.

An alternative approach would be to make an Options object that can pass in various options that can trigger whether or not the logging is performed. The default behavior can be to log all messages as we do today while allowing developers using this module to filter them out via the Options object.

What did you expect to happen?

I would like it if the YAML config loader did not log the errors in the log like the INI module does. This will remove the Exx message from the logs preventing any confusion of it being an error.

W0828 14:08:33.586794       1 config.go:264] ReadConfigYAML failed: yaml: unmarshal errors:
  line 1: cannot unmarshal !!seq into config.CommonConfigYAML
I0828 14:08:33.586894       1 config.go:272] ReadConfig INI succeeded. INI-based cloud-config is deprecated and will be removed in 2.0. Please use YAML based cloud-config.
I0828 14:08:33.586924       1 config.go:283] Config initialized

How can we reproduce it (as minimally and precisely as possible)?

Create a cluster with the vSphere cloud provider config using the INI format

Anything else we need to know (please consider providing level 4 or above logs of CPI)?

No response

Kubernetes version

$ kubectl version
Kubernetes Version: v1.30.3

Cloud provider or hardware configuration

VMware vSphere 8.0.2.00300

OS version

No response

Kernel (e.g. uname -a)

No response

Install tools

No response

Container runtime (CRI) and and version (if applicable)

No response

Related plugins (CNI, CSI, ...) and versions (if applicable)

No response

Others

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant