Wrong discard value after online volume migration

Bug #2023078 reported by Gorka Eguileor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

Nova incorrectly sets the libvirt XML after an online volume migration (swap volume) when the source is a backend that doesn’t support discard (Cinder doesn't return `discard: true` in the connection dictionary) to one that does.

It seem like Nova doesn't rebuild the disk XML, so it's missing the discard=unmap that should have for the new volume.

This bug results in the trimming/unmapping commands not working on the new volume until the next time Nova connects the volume.

For example an instance reboot will not be enough, but a shelve and unshelve will do the trick and fstrim will work again.

Gorka Eguileor (gorka)
description: updated
Revision history for this message
Gorka Eguileor (gorka) wrote :

I was told by Sean Mooney on IRC that this is not something that should be changed on a volume swap operation.

So we briefly discussed that maybe we should enable discard for most cinder volumes even if the backend doesn't actually support it so we don't have this issue when migrating

Revision history for this message
Gorka Eguileor (gorka) wrote :

I think it should work for the reboot use case though, because the OS would be able to detect the change.

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.