ceph ephemeral info not updated during live migrate
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
rbdimages information isn't updated during a live migration.
I have a user that has updated their ceph cluster and added a new monitor IP.
He adds a new monitor to his ceph cluster and updates ceph.conf on all of the openstack nodes to reflect the new monitor IP.
They have running VMs that are boot from ceph volume and also has attached ceph volumes.
He does a live migration to try and get nova to update the libvirt.xml and it seems that only the volumes section is updated, not the vms section.
This is a copy of xml after the live migrate.
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<auth username='nova'>
<secret type='ceph' uuid='820ccd0b-
</auth>
<source protocol='rbd' name='vms/
<host name='192.
<host name='192.
<host name='192.
<host name='192.
<host name='192.
</source>
<
<target dev='vda' bus='virtio'/>
<alias name='virtio-
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<auth username='nova'>
<secret type='ceph' uuid='820ccd0b-
</auth>
<source protocol='rbd' name='volumes/
<host name='192.
<host name='192.
<host name='192.
<host name='192.
<host name='192.
<host name='192.
</source>
<
<target dev='vdb' bus='virtio'/>
<
<alias name='virtio-
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
tags: | added: live-migration volumes |
description: | updated |
tags: | added: libvirt |
tags: | removed: volumes |
lyarwood has pointed this out before in IRC, but I wanted to mention it again here for clarity: the difference in those disks is one is an ephemeral disk based on the libvirt rbd imagebackend code in nova, and that one gets its values from nova.conf. The other is a volume and nova gets the config values from the cinder connection_info which gets refreshed during the live migration here:
https:/ /github. com/openstack/ nova/blob/ 74deea4d8f66a85 e66ec79c72c9f25 7f562d5afd/ nova/virt/ libvirt/ migration. py#L149
It appears we don't have something similar happening during live migration for ephemeral disk configuration with the rbd imagebackend.
During live migration from the source node, this is where we get the new xml for the guest to send to the destination node:
https:/ /github. com/openstack/ nova/blob/ 74deea4d8f66a85 e66ec79c72c9f25 7f562d5afd/ nova/virt/ libvirt/ driver. py#L6306
This code will get the ephemeral disk configuration:
https:/ /github. com/openstack/ nova/blob/ 74deea4d8f66a85 e66ec79c72c9f25 7f562d5afd/ nova/virt/ libvirt/ driver. py#L3603
And that's called from _get_guest_ storage_ config:
https:/ /github. com/openstack/ nova/blob/ 74deea4d8f66a85 e66ec79c72c9f25 7f562d5afd/ nova/virt/ libvirt/ driver. py#L3637
And we don't call either of those methods during a live migration so we don't get updated ephemeral disk config prior to starting the live migration.