vm-operator icon indicating copy to clipboard operation
vm-operator copied to clipboard

Change the log level to warning if templating of bootstrap data fails

Open aruneshpa opened this issue 2 years ago • 0 comments

What steps did you take and what happened?

The customization code performs any template substitutions in the metadata specified via the Secret/ConfigMap resource. If the template parsing encounters an error, we log the message at severity = error. However, it is possible that the bootstrap data contains special markers (e.g., {{) that trigger the template substitution logic. In those cases, users will see error messages in VM operator log that are not really an error and definitely not actionable.

A typical example for this would be users specifying user-data that contains {{ which is expected to be consumed by the guest as-is. However, since the current code treats the {{ as a template prefix, it will try to parse the template and log an error.

What did you expect to happen?

Ideally, we should only perform template substitutions for vAppConfig bootstrap type. This is handled by #46. However, we should also change the log level to Warning severity so as to cause less confusion. This issue deals focuses on the latter problem.

Is there anything else you would like to add?

N/A

Please tell us about your environment.

This issue has existed as far as I can go back in the history of VM operator.

aruneshpa avatar May 10 '23 22:05 aruneshpa