[openstack-dev] [nova] Will unshelving an offloaded instance respect the original AZ?
Matt Riedemann
mriedemos at gmail.com
Sat Feb 18 18:46:24 UTC 2017
I haven't fully dug into testing this, but I got wondering about this
question from reviewing a change [1] which would make the unshelve
operation start to check the volume AZ compared to the instance AZ when
the compute manager calls _prep_block_device.
That change is attempting to remove the check_attach() method in
nova.volume.cinder.API since it's mostly redundant with state checks
that Cinder does when reserving the volume. The only other thing that
Nova does in there right now is compare the AZs.
What I'm wondering is, with that change, will things break because of a
scenario like this:
1. Create volume in AZ 1.
2. Create server in AZ 1.
3. Attach volume to server (or boot server from volume in step 2).
4. Shelve (offload) server.
5. Unshelve server - nova-scheduler puts it into AZ 2.
6. _prep_block_device compares instance AZ 2 to volume AZ 1 and unshelve
fails with InvalidVolume.
If unshelving a server in AZ 1 can't move it outside of AZ 1, then we're
fine and the AZ check when unshelving is redundant but harmless.
[1] https://review.openstack.org/#/c/335358/38/nova/virt/block_device.py@249
--
Thanks,
Matt Riedemann
More information about the OpenStack-dev
mailing list