Description of problem: If you configure static networking via the appliance_console and then reboot the appliacne cloud_init runs again and resets the network configuration back to DHCP. Version-Release number of selected component (if applicable): 5.8.0.9-alpha2.20170404195944_1d7ece4 How reproducible: Always Steps to Reproduce: 1. Create a new appliance from template in RHV 2. use appliance_console to configure static network 3. reboot the VM Actual results: cloud_init runs again and resets the network configuration back to DHCP. Expected results: cloud_init should not be running again and the static networking configuration should not be being overwritten. Additional info: This was found during 5.8 test-a-thon
cloud-init used to use a "marker" file that it created on initial execution. If that "marker" file existed it would not rerun on reboot. Perhaps cloud-init is broken. I'll investigate. JoeV
Confirmed this as a problem on vcenter appliance as well.
The fix will be to disable cloud-init's network configuration in the appliance_console as one of the steps done to configure static network. A PR is pending. A work around can be to execute the following command after configuring the static network the the appliance_console. echo "network: {config: disabled}" >> /etc/cloud/cloud.cfg.d/10_miq_cloud.cfg JoeV
https://github.com/ManageIQ/manageiq-gems-pending/pull/115
New commit detected on ManageIQ/manageiq-gems-pending/master: https://github.com/ManageIQ/manageiq-gems-pending/commit/ee87f97ff0c2ebe6628e6093d8fc6f2daac64a0e commit ee87f97ff0c2ebe6628e6093d8fc6f2daac64a0e Author: Joe VLcek <jvlcek> AuthorDate: Fri Apr 7 15:30:42 2017 -0400 Commit: Joe VLcek <jvlcek> CommitDate: Fri Apr 7 15:44:23 2017 -0400 Disable cloud-init network re-config on network updates https://bugzilla.redhat.com/show_bug.cgi?id=1439373 lib/gems/pending/appliance_console.rb | 5 +++++ 1 file changed, 5 insertions(+)
Hi, With CFME 5.7.2.1-1 (on VMWare): * On first-boot, 'network' service fails. * I had to use the workaround in comment #5 in order to configure static network. But with CFME 5.7.1-3 configuring static network worked out of the box. And also network does not fail on first-boot. Cheers.
(In reply to Reartes Guillermo from comment #11) > Hi, > > With CFME 5.7.2.1-1 (on VMWare): > * On first-boot, 'network' service fails. > * I had to use the workaround in comment #5 in order to configure static > network. > > But with CFME 5.7.1-3 configuring static network worked out of the box. And > also network does not fail on first-boot. > > Cheers. Hi Reartes, It's not clear to me what you are saying. Are you saying that this fix did work on 5.7.1-3 but failes on 5.7.2.1-1 ? This BZ if for the 5.9 release. If you are seeing issues with the 5.7.z releases please provide clarification comments on the 5.7.z clong BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1442877 Thank you JoeV
Verified in 5.9.0.2
I am having exact the same issue with cfme-rhevm-5.9.0.18-1.x86_64.qcow2. After the CFME VM reboot, cloud-init reset my network configuration for static IP (/etc/sysconfig/network-scripts/) back to dhcp. Can you please confirm if it is fixed with 5.9.0.18 build?
(In reply to bzhou1 from comment #17) > I am having exact the same issue with cfme-rhevm-5.9.0.18-1.x86_64.qcow2. > After the CFME VM reboot, cloud-init reset my network configuration for > static IP (/etc/sysconfig/network-scripts/) back to dhcp. Can you please > confirm if it is fixed with 5.9.0.18 build? This was verified in 5.9.0.2. How did you configure your network? Did you use the appliance_console? The appliance_console will create file "/etc/cloud/cloud.cfg.d/99_miq_disable_network_config.cfg" With the content: "network: {config: disabled}" Can you confirm if your appliance has this file with the described content and if you configured with the appliance console? Thank you. JoeV
Hi JoeV, Thanks a lot for the response. The static IP configured was not configured through appliance_console. After applied the static IP configure using appliance_console, I do see new file 99_miq_disable_network_config.cfg generated. I also confirmed the static IP is persistent against reboot. Sorry about the false alarm. Bin
(In reply to bzhou1 from comment #20) > Hi JoeV, > > Thanks a lot for the response. > The static IP configured was not configured through appliance_console. After > applied the static IP configure using appliance_console, I do see new file > 99_miq_disable_network_config.cfg generated. I also confirmed the static IP > is persistent against reboot. > Sorry about the false alarm. > Bin NP Bin! Glad you got it working! JoeV