NFS volume snapshot does not update volume attachment format to qcow2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
In Progress
|
Medium
|
melanie witt | ||
OpenStack Compute (nova) |
In Progress
|
Undecided
|
melanie witt |
Bug Description
This was reported downstream when a customer hit the issue [1].
They found that after performing a volume snapshot on a stopped instance, that instance could no longer boot.
The instance XML had the correct disk format "qcow2" after the snapshot while it was still stopped. However, when someone then tries to start the instance, the regenerated XML contains the wrong disk format "raw" (nova regenerates fresh XML on hard reboot, boot from shutoff) and that prevents the instance from booting.
While tracing the issue I noticed that after the snapshot, the volume attachment still showed the format "raw". It should have been "qcow2" after the snapshot, I think.
The customer found that rebuilding the instance resulted in a booting instance despite the underlying volume (snapshot) being the same. Rebuild generates a new volume attachment and that volume attachment reflected the correct format "qcow2".
Based on this, it appeared to me that volume attachment format was not being updated from "raw" to "qcow2" after the volume snapshot was created as qcow2 and was made the active volume for the instance.
AFAICT, there is not a way for nova to update the volume attachment format.
Repro steps:
$ openstack volume create --image f8e5b23e-
$ openstack server create --flavor c1 --volume my_volume --network private --wait my_server
$ openstack server stop d97a6178-
(Instance has disk format "raw" and volume attachment also shows format "raw")
(To check this:
$ virsh dumpxml d97a6178-
$ openstack --os-volume-
)
$ openstack volume snapshot create --volume d5c71e24-
(Instance has correct disk format "qcow2" at this point, volume attachment shows format "raw")
$ openstack server start d97a6178-
(Instance now has incorrect disk format "raw" and volume attachment still shows format "raw")
To see the effect of a rebuild:
$ openstack server rebuild d97a6178-
(Instance has disk format "qcow2" and volume attachment also shows format "qcow2")
(Volume attachment is newly created with new ID etc)
Changed in cinder: | |
importance: | Undecided → Medium |
tags: | added: drivers nfs |
Changed in cinder: | |
assignee: | nobody → Sofia Enriquez (lsofia-enriquez) |
Changed in cinder: | |
assignee: | Sofia Enriquez (lsofia-enriquez) → melanie witt (melwitt) |
Fix proposed to branch: master /review. opendev. org/c/openstack /cinder/ +/857528
Review: https:/