cloudbase-init does not set network information again after resizing

Bug #1524281 reported by Li Wei Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloudbase-init
Opinion
Undecided
Unassigned
compute-hyperv
Fix Released
Undecided
Unassigned
os-win
Invalid
Undecided
Unassigned

Bug Description

Hi cloudbase team, I think I met an cloudbaseinit issue.
There are 2 key points:
Point 1. when resizing vm (which is deployed with windows 2008 image), it changed to an new adapter.
Point 2. why the cloudbaseinit did not set network information again when changing to new adapter.
PS: we are using config drive to set network, not by dhcp.
The vm deployed with linux image can be resized successfully, so this issue only happens with windows vm.
we just tested on hyper-v, not test on KVM.

Here is my environment:
In my Hyper-v environment, I booted a vm with windows 2008 image and got IP 172.13.84.123 which is pingable. Then I resized it to big flavor, and I can not ping 172.13.84.123 anymore. I logged in the vm via hyper-v console and found it got an new IP 169.254.169.67.

1:
With my investigation, When I changed back to original IP for the vm manually, it reminded that the IP was using by another adapter. It means that the IP was matched with the old adapter. Also we found that the adapter for network connection changed after resizing. In my test, the adapter was "Microsoft Virtual Machine Bus Network Adapter #2" and changed to "Microsoft Virtual Machine Bus Network Adapter #3" after resizing, also the adapter ID changed.

2:
I checked the cloudbase-init.log on the vm booted from win2008 image, and found that the cloudbaseinit executes plugin 'NetworkConfigPlugin' to set the network only one time when booting vm for the first time. It will not set the network again no matter reboot or resize.
When boot vm for the first time, cloudbaseinit will execute plugin 'NetworkConfigPlugin' and read metadata to set network information, relative log:
2015-12-01 02:18:51.244 1756 INFO cloudbaseinit.init [-] Executing plugin 'NetworkConfigPlugin'
2015-12-01 02:18:51.244 1756 DEBUG cloudbaseinit.metadata.services.base [-] Using cached copy of metadata: 'openstack/latest/meta_data.json' _get_cache_data C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\metadata\services\base.py:74
2015-12-01 02:18:51.244 1756 DEBUG cloudbaseinit.metadata.services.base [-] Using cached copy of metadata: 'openstack/latest/meta_data.json' _get_cache_data C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\metadata\services\base.py:74
2015-12-01 02:18:51.244 1756 DEBUG cloudbaseinit.plugins.windows.networkconfig [-] network config content:

When resizing vm to a bigger flavor, cloudbaseinit will skip executing plugin 'NetworkConfigPlugin', relative log:
Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\init.py:64
2015-12-01 02:29:52.236 1536 DEBUG cloudbaseinit.init [-] Plugin 'NetworkConfigPlugin' execution already done, skipping _exec_plugin C:\Program Files (x86)\Cloudbase

"adapater information before resizing" and "adapater information after resizing" and "adapter conflict when modifying IP manually" and "cloudbase-init.log" are shown as attachements.

The screenshots and cloudbase-init.log are shown with attachements. I do not know whether it is a cloudbaseinit bug. Please help confirm it, any feedback is helpful, many thanks.

Revision history for this message
Li Wei Wang (wlwwang) wrote :
Revision history for this message
Li Wei Wang (wlwwang) wrote :

For the cloudbase-init version, we now can provide this information: CloudbaseInitSetup_Beta.msi. Could this can help confirm the version?

The adapter before/ after resizing and IP conflict information are shown as the attachment.

Revision history for this message
Adrian Vladu (avladu) wrote :

Hello,

This is a Hyper-V compute driver issue, as on cold-migration, the pci ids and other hardware related information is not kept as a new instance is spawned on another hyper-v node.

Thank you,
Adrian Vladu

Revision history for this message
Adrian Vladu (avladu) wrote :

This issue is currently tracked by bug: https://bugs.launchpad.net/os-win/+bug/1536742

Revision history for this message
Adrian Vladu (avladu) wrote :

Update to my last comment:

This bug is tracked by https://bugs.launchpad.net/nova/+bug/1663238

Adrian Vladu (avladu)
Changed in cloudbase-init:
status: New → Opinion
Changed in os-win:
status: New → Invalid
Revision history for this message
Lucian Petrut (petrutlucian94) wrote :

This can be closed for compute-hyperv, which no longer recreates the instance from scratch during cold migrations/resizes. The VM is now imported on the destination, preserving the PCI ids.

This was addressed by I01efbc312d8ea81c3a4e1fd82cccc695c7472b5f.

Changed in compute-hyperv:
status: New → Incomplete
status: Incomplete → Fix Committed
Changed in compute-hyperv:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.