This patch changes how Nova interacts with volumes at attach time. Nova should rely upon Cinder's os-reserve to determine if the state of the volume is in a good/valid state for attaching. This fixes a race between when nova fetches the volume and calls os-reserve. This refactors the volume_api.check_attach a bit and adds a new check_availability_zone, which is still done on the Nova side. When Cinder's os-reserve supports passing in the availability zone, then this check can also be removed. This patch handles the volume attach API, which is not checked again in the compute manager. Future patches will handle other operations like boot from volume and swap volume. Partial-Bug: #1581230 Change-Id: I5b069ba3480257c061541fc6c19e044c31417b5e
20 KiB
20 KiB