Skip to content

[SAP] Allow FCD migration to down pools #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: stable/wallaby-m3
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cinder/scheduler/filters/sap_pool_down_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,18 @@ class SAPPoolDownFilter(filters.BaseBackendFilter):

def backend_passes(self, backend_state, filter_properties):

valid_ops = ['migrate_volume', 'find_backend_for_connector']
spec = filter_properties.get('request_spec', {})

# For FCD based volumes, we want to allow a volume migration
# to the same pool, even if it's marked down draining.
# As the migration is nothing more than a registration to a
# new host. The volume is already on the pool.
if backend_state.pool_state == 'up':
return True
elif spec.get('operation') in valid_ops:
LOG.debug("Allow migration to a down/drain pool.")
return True
else:
LOG.debug("%(id)s pool state is not 'up'. state='%(state)s'",
{'id': backend_state.backend_id,
Expand Down