nova/releasenotes/notes/remove-check-attach-68b9ec781ad184ff.yaml
Ildiko Vancsa 63805735c2 Remove check_attach
This patch finishes to remove the 'check_attach' call from Nova
completely. As Cinder already performs the required checks as part
of the 'reserve_volume' (os-reserve) call it is unnecessary to check the
statemachine in Nova also and it can lead to race conditions.

The missing 'reserve_volume' call is added to the BFV flow. In case of
build failure the volume will be locked in 'attaching' state until the
instance in ERROR state is cleaned up.

We also check AZ for each volume attach operation which we haven't
done for unshelve. A release note is added to enable 'cross_az_attach'
in case the user does not care about AZ.

The compute service version had to be bumped as the old computes still
perform 'check_attach', which will fail when the API reserves the
volume and the volume state moves to 'attaching'. If the computes
are not new enough the old check will be called as opposed to
'reserve_volume'.

Closes-Bug: #1581230
Change-Id: I3a3caa4c566ecc132aa2699f8c7e5987bbcc863a
2017-02-26 20:34:05 -05:00

27 lines
1.3 KiB
YAML

---
fixes:
- |
Fixes `bug 1581230`_ by removing the internal ``check_attach`` call from
the Nova code as it can cause race conditions and the checks are handled by
``reserve_volume`` in Cinder. ``reserve_volume`` is called in every volume
attach scenario to provide the necessary checks and volume state validation
on the Cinder side.
other:
- |
By removing the ``check_attach`` internal call from Nova, small behavioral
changes were introduced.
``reserve_volume`` call was added to the boot from volume scenario. In case
a failure occurs while building the instance, the instance goes into ERROR
state while the volume stays in ``attaching`` state. The volume state will
be set back to ``available`` when the instance gets deleted.
Additional availability zone check is added to the volume attach flow,
which results in an availability zone check when an instance gets
unshelved. In case the deployment is not sensitive to availability zones
and not using the AvailabilityZoneFilter scheduler filter the current
default settings (cross_az_attach=True) are allowing to perform unshelve
the same way as before this change without additional configuration.
.. _`bug 1581230`: https://bugs.launchpad.net/nova/+bug/1581230