Browse Source

Merge "Volume transfers: Remove duplicate policy check"

changes/93/804293/2
Zuul 4 months ago committed by Gerrit Code Review
parent
commit
23494a6d6c
  1. 3
      cinder/volume/api.py
  2. 7
      releasenotes/notes/fix-transfer-accept-policy-7594806372b14284.yaml

3
cinder/volume/api.py

@ -53,7 +53,6 @@ from cinder.policies import snapshot_metadata as s_meta_policy
from cinder.policies import snapshots as snapshot_policy
from cinder.policies import volume_actions as vol_action_policy
from cinder.policies import volume_metadata as vol_meta_policy
from cinder.policies import volume_transfer as vol_transfer_policy
from cinder.policies import volumes as vol_policy
from cinder import quota
from cinder import quota_utils
@ -913,8 +912,6 @@ class API(base.Base):
new_user: str,
new_project: str,
no_snapshots: bool = False) -> dict:
context.authorize(vol_transfer_policy.ACCEPT_POLICY,
target_obj=volume)
if volume['status'] == 'maintenance':
LOG.info('Unable to accept transfer for volume, '
'because it is in maintenance.', resource=volume)

7
releasenotes/notes/fix-transfer-accept-policy-7594806372b14284.yaml

@ -0,0 +1,7 @@
---
fixes:
- |
`Bug #1950474 <https://bugs.launchpad.net/cinder/+bug/1950474>`_: Fixed
policy authorization for transfer accept API. Previously, setting
``enforce_new_defaults=True`` in oslo_policy section would break the
transfer accept API which is fixed in this release.
Loading…
Cancel
Save