Skip to content
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

Add --force flag when removing snapshots #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paz
Copy link

@paz paz commented Feb 12, 2025

Allow to force removal of snapshots if specified

I tested this on our production cluster and seems to be working well. I had an issue where a heap of our VMs deleted the ZFS snapshot but not the snapshot in Proxmox, not sure why.

Allow to force removal of snapshots if specified
Copy link
Owner

@apprell apprell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please update the README file accordingly to reflect this change.

@@ -236,6 +237,8 @@ def remove_snapshot(vmid: str, virtualization: str, label: str = 'daily', keep:
if old_snapshots:
for old_snapshot in old_snapshots:
params = [virtualization, 'delsnapshot', vmid, old_snapshot]
if FORCE:
params.extend(["--force", "true"])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! The general code style uses single quotes. Could you replace the double quotes in --force and true with single quotes to keep it consistent? Thanks!

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.

2 participants