-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
userdata: fix append scenarios #7741
userdata: fix append scenarios #7741
Conversation
- Fixes case of appending userdata when both template and vm data are either shellscript or cloudconfig - Fixes error when appending gzip userdata Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@blueorangutan package |
@shwstppr a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report
@@ Coverage Diff @@
## main #7741 +/- ##
============================================
+ Coverage 13.41% 13.42% +0.01%
- Complexity 9365 9381 +16
============================================
Files 2745 2746 +1
Lines 258683 258695 +12
Branches 40291 40288 -3
============================================
+ Hits 34691 34733 +42
+ Misses 219621 219590 -31
- Partials 4371 4372 +1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6469 |
@blueorangutan test |
@shwstppr a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
[SF] Trillian test result (tid-7062)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM.
@shwstppr can we target this to 4.18.1 ?
@harikrishna-patnala based it on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, did not test it though
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@blueorangutan package |
@shwstppr a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6478 |
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@blueorangutan package |
@shwstppr a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6479 |
@blueorangutan test |
@shwstppr a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
[SF] Trillian test result (tid-7096)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, manually tested all the possible scenarios
Registerd Userdata1 format | Registered Userdata2 format | Vm-userdata | Content of userdata | Result | Comments |
---|---|---|---|---|---|
Cloud-config (text/cloud-config) | Plain text | Pass | |||
Cloud-config (text/cloud-config) | Shellscript | Mime type | Pass | ||
Shell script | Cloud-config (text/cloud-config) | Mime type | Pass | ||
Cloud-config (text/cloud-config) | gzip (user-data) | Pass | Error attempting to merge user data as a multipart user data. Reason: Gzipped user data can not be used together with other user data formats | ||
gzip (user-data) | Gzip data | Pass | |||
Cloud-config (mimetype) | Mime type | ||||
Cloud-config (mimetype) | Mime type | Pass | |||
Cloud-config (mimetype) | gzip (user-data) | Pass | Error attempting to merge user data as a multipart user data. Reason: Gzipped user data can not be used together with other user data formats | ||
Shell script | gzip (user-data) | Pass | Error attempting to merge user data as a multipart user data. Reason: Gzipped user data can not be used together with other user data formats | ||
Cloud-config (mimetype) | Shell script | Mime type | Pass | ||
Shell script | Cloud-config (mimetype) | Pass | |||
Cloud-config (text/cloud-config) | Cloud-config (text/cloud-config) | Plain text | Pass | ||
Cloud-config (text/cloud-config) | Cloud-config (text/cloud-config) | Plain text | Pass | ||
Cloud-config (text/cloud-config) | Shell script (directly pasting in the UI ) | Mime type | Pass | ||
Shell script | Cloud-config (text/cloud-config)directly pasting in the UI | Mime type | Pass | ||
Cloud-config (mimetype) | Cloud-config (mimetype) | Mime type | Pass |
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@blueorangutan package |
@shwstppr a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6497 |
@blueorangutan test |
@kiranchavala a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
[SF] Trillian test result (tid-7102)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
Fixes case of appending userdata when both template and vm data are either shellscript or cloudconfig Fixes error when appending gzip userdata Fixes case when userdata manual text from VM is not getting decoded-encoded correctly. Fixes case of appending multipart data when both template and vm data contain same format types. Refactor - moved validateUserData method to UserDataManager class Refactor userdata test to check resultant multipart userdata thoroughly Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> (cherry picked from commit 729e6d1) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Description
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?