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
Allow configkey to set 'cloud-name' cloud-init metadata #7964
Allow configkey to set 'cloud-name' cloud-init metadata #7964
Conversation
Codecov Report
@@ Coverage Diff @@
## main #7964 +/- ##
=============================================
+ Coverage 13.06% 29.14% +16.08%
- Complexity 9098 30374 +21276
=============================================
Files 2720 5100 +2380
Lines 257465 358328 +100863
Branches 40145 52310 +12165
=============================================
+ Hits 33633 104439 +70806
- Misses 219605 239530 +19925
- Partials 4227 14359 +10132
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3666 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
server/src/main/java/com/cloud/network/router/CommandSetupHelper.java
Outdated
Show resolved
Hide resolved
engine/api/src/main/java/com/cloud/vm/VirtualMachineManager.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
…er.java Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
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.
@blueorangutan package |
@DaanHoogland 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 7093 |
@blueorangutan test matrix |
@DaanHoogland a [SF] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
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.
CLGTM
Did not test the changes, though.
[SF] Trillian test result (tid-7710)
|
[SF] Trillian test result (tid-7712)
|
[SF] Trillian test result (tid-7711)
|
* Allow configkey to set 'cloud-name' cloud-init metadata * Update engine/api/src/main/java/com/cloud/vm/VirtualMachineManager.java Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com> * Update server/src/main/java/com/cloud/network/NetworkModelImpl.java Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com> * Update server/src/main/java/com/cloud/network/router/CommandSetupHelper.java Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com> * Revert "Update server/src/main/java/com/cloud/network/router/CommandSetupHelper.java" This reverts commit 8abc3e3. * Revert "Update server/src/main/java/com/cloud/network/NetworkModelImpl.java" This reverts commit 7f239be. * Rework/Fix review code suggestions --------- Co-authored-by: Marcus Sorensen <mls@apple.com> Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com> (cherry picked from commit 155a307) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Description
This PR allows admin to set a "cloud-name" for cloud-init metadata. Configdrive has no special handling to determine what cloud it is being run on, it just generically sets the cloud-name to the datasource name. By providing this metadata key, we can allow admin to configure this for users.
Followed the same pattern for adding "cloud-domain" and other metadata.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested locally by first keeping the value unset and confirming there is no change to the data
Then set the config key
metadata.custom.cloud.name
and confirmed it was reflected in the VMAlso tested it works with VR as userdata provider: