config drive - send user-defined vm name as host name, not uuid#2637
config drive - send user-defined vm name as host name, not uuid#2637ernjvr wants to merge 2 commits into
Conversation
|
@PaulAngus @DaanHoogland @rhtyd please review |
|
@blueorangutan package |
|
@ernjvr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2049 |
| when(virtualMachine.getDataCenterId()).thenReturn(DATACENTERID); | ||
| when(virtualMachine.getInstanceName()).thenReturn(VMINSTANCENAME); | ||
| when(virtualMachine.getUserData()).thenReturn(VMUSERDATA); | ||
| when(virtualMachine.getHostName()).thenReturn("vm-hostname"); |
There was a problem hiding this comment.
can you externalise this string (like the ones above)
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2671)
|
|
I had to port changes from another PR, I've them converged and tested here: https://github.com/apache/cloudstack/pull/2645/files |

Description
For config drive to be Openstack compliant, in the openstack/latest/meta_data.json, we need the ‘name’ to be the name that the user sets as the VM name and the ‘hostname’ to be “ . ” ie. the fqdn.
Cherry picked a commit that fixes this: 105b3fe
Create an L2 network offering with user data checkbox selected to pass user data and metadata to VMs via config Drive. Create an L2 network and create a vm with userdata. Launch the VM. Ssh to the vm instance. Mount the config drive and verify that the openstack/latest/meta_data.json file contains the name that the user set as the VM name and the ‘hostname’ as “ . ” ie. the fqdn.
Types of changes
GitHub Issue/PRs
Fixes #2615
Screenshots (if appropriate):
How Has This Been Tested?
Checklist:
Testing