Bug 1100179

Summary: 'hostname' return unexpected hostname after doing vmware customization with cloud-init on DHCP network configure
Product: [SUSE Linux Enterprise Server] Beta SUSE Linux Enterprise Server 15 Reporter: vmware gos <vmware-gos-qa>
Component: OtherAssignee: E-mail List <bnc-team-screening>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: jsavanyo
Version: GMC   
Target Milestone: ---   
Hardware: Other   
OS: SLES 15   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description vmware gos 2018-07-05 07:28:30 UTC
'hostname' return unexpected hostname after doing vmware customization with DHCP network configure while /etc/hostname has saved expected hostname got from vmware cust.cfg file.


Reproduce steps:
1. Install cloud-init on SLES VM

2. Enable cloud-init 4 services.
systemctl enable cloud-init-local
systemctl enable cloud-init
systemctl enable cloud-config
systemctl enable cloud-final

3. Add "disable_vmware_customization: false" to /etc/cloud/cloud.cfg

4. Add below 2 lines to Unit sesstion of vmtoolsd service if they are not there:
DefaultDependencies=no
Before=cloud-init-local.service

5. Poweroff VM

6. Edit VM configuration to not check "Connect At Power On" for all DVD Drivers.

7. Select one DHCP policy to do "Customize Guest OS", in which will set one special hostname

8. Power On VM and log in to VM.

9. Execute"hostname" to check hostname is expected.

Expected Result:
Step 9, execute "hostname" on VM will display same one with which is given in Policy in Step7.
Actual Result:
Step 9, execute "hostname" on VM display different one with which is given in Policy in Step7.


cloud-init.log is attached which help for your debugging.


-VMWare QE
Comment 1 Tomáš Chvátal 2018-07-06 11:05:38 UTC
Same bug as the otehr one, duping.

*** This bug has been marked as a duplicate of bug 1100178 ***