vmware-tanzu / vmware-tanzu/vm-operator
Change the log level to warning if templating of bootstrap data fails
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 134
- Forks
- 83
- Avg merge
- 4d 18m
- Merged PRs (30d)
- 73
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the customization code that performs template substitutions for Secret/ConfigMap bootstrap data and find where template parsing failures are logged. Change the failure severity from error to warning, then verify that malformed or literal {{ content produces a warning rather than an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100