Skip to content

Allow snapshots to be independent #158

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

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

hemna
Copy link

@hemna hemna commented Dec 5, 2022

This patch allows a snapshot creation request go through the scheduler to pick a pool for the snapshot to live on. The backend picked by the scheduler is added to the snapshot metadata. This metadata field '__cinder_internal_backend' is filtered out of requests fetching the snapshot information, so end users will never see it.

To enable this ability a new config option is added to the scheduler and is defaulted to be False or disabled.

sap_allow_independent_snapshots

This allows creating a snapshot from a volume to happen on a completely different pool than the source volume.

This patch also alters create volume from snapshot, to allow a volume to be created from a different pool than the source volume that the snapshot was created from.

All of this is not how upstream works or allows.

Fix snapshot view filtering

This patch fixes an issue iterating over the metadata from the snapshot views API. The code is supposed to filter out and remove the __cinder_internal keys in the metadata. This patch looks for the keys to remove first and then deletes them instead of iterating over the metadata array and trying to delete them while iterating over the metadata, which causes a python exception.

This patch allows a snapshot creation request go through the
scheduler to pick a pool for the snapshot to live on.
The backend picked by the scheduler is added to the snapshot
metadata.  This metadata field '__cinder_internal_backend'
is filtered out of requests fetching the snapshot information,
so end users will never see it.

To enable this ability a new config option is added to the
scheduler and is defaulted to be False or disabled.

sap_allow_independent_snapshots

This allows creating a snapshot from a volume to happen on a
completely different pool than the source volume.

This patch also alters create volume from snapshot, to allow a volume
to be created from a different pool than the source volume that
the snapshot was created from.

All of this is not how upstream works or allows.

Fix snapshot view filtering

This patch fixes an issue iterating over the metadata
from the snapshot views API.  The code is supposed to filter out
and remove the __cinder_internal keys in the metadata.  This patch
looks for the keys to remove first and then deletes them instead
of iterating over the metadata array and trying to delete them while
iterating over the metadata, which causes a python exception.
@hemna hemna force-pushed the wallaby_independent_snapshots branch from 5b70bb0 to c6f18d4 Compare December 5, 2022 16:17
@hemna hemna merged commit da60e86 into stable/wallaby-m3 Dec 5, 2022
@hemna hemna deleted the wallaby_independent_snapshots branch December 5, 2022 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant