ravening opened a new pull request, #14945:
URL: https://github.com/apache/cloudstack/pull/14945
(#14810)
### Description
1. `CloudInitUserDataProvider` typed multipart parts by their `#` header
only, so a `## template: jinja` part (e.g. the CKS `k8s-control-node.yml`) was
sent as `text/cloud-config`. cloud-init only renders jinja for `text/jinja2`
parts, so it parsed the raw template as YAML and dropped the whole control-node
user data, leaving CKS clusters stuck in Starting. Parts whose first line is
`## template: jinja` are now typed `text/jinja2`. Added a unit test covering
this.
2. `registerCniConfiguration` with no `cniconfig` saved a null CNI config
that later NPE'd in `KubernetesClusterStartWorker`; it now rejects blank
`cniconfig` with `InvalidParameterValueException`.
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### Bug Severity
- [ ] BLOCKER
- [x] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### How Has This Been Tested?
Added `testAppendJinjaCloudConfigWithShellScriptTypesJinjaPart` to
`CloudInitUserDataProviderTest` asserting the jinja-headed part is emitted as
`text/jinja2`. Existing tests use non-jinja fixtures for content-type
assertions and are unaffected. Unit tests run in PR CI (no JDK in the working
environment).
Closes #14810
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]