When you attach a volume to a running instance, only the running
xml is updated in libvirt. This is due to the usage of the
VIRT_DOMAIN_AFFECT_CURRENT flag passed to attach device. What we
really want is to affect both the config and the running xml. There
is no combination of flags that works in all states, so we explicitly
set the right combination of flags depending on the running state
of the vm.
Includes a test to test_virt_drivers to ensure the flags are passed
correctly.
Reviewed: https:/ /review. openstack. org/14795 github. com/openstack/ nova/commit/ 814e7f8c827aa21 a87a62594d5b641 3bb49e31e1
Committed: http://
Submitter: Jenkins
Branch: master
commit 814e7f8c827aa21 a87a62594d5b641 3bb49e31e1
Author: Vishvananda Ishaya <email address hidden>
Date: Wed Oct 24 16:14:36 2012 -0700
libvirt: persist volume attachments into config
When you attach a volume to a running instance, only the running DOMAIN_ AFFECT_ CURRENT flag passed to attach device. What we
xml is updated in libvirt. This is due to the usage of the
VIRT_
really want is to affect both the config and the running xml. There
is no combination of flags that works in all states, so we explicitly
set the right combination of flags depending on the running state
of the vm.
Includes a test to test_virt_drivers to ensure the flags are passed
correctly.
Fixes bug 1071069
Change-Id: I1992748b08daf9 9cf03dfeb0937ad 42457fff1a3