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

Improve output when delete_snapshot is blocked by task #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eherot
Copy link

@eherot eherot commented Oct 24, 2022

Currently if another snapshot task is blocking delete_snapshot, the task action is logged as DEBUG only and following is logged at the INFO level:

Unable to delete snapshot(s) because a snapshot is in state "IN_PROGRESS"

If there is actually another snapshot in progress, this message is accurate, but this message is also thrown if there are any other tasks with actions containing the word "snapshot" in the tasks list.

This PR makes the following changes:

  1. In utils/find_snapshot_tasks: Return the whole task object instead of True if there is an active snapshot task
  2. In utils/safe_to_snap: Print the contents of the active snapshot task object if there is one.
  3. In actions/DeleteSnapshots/do_action: Change the wording of the error message to allow for failure due to "other snapshot activity" (and not just in progress snapshots).

safe_to_snap can fail because of snapshot tasks (and not just a snapshot being "IN PROGRESS" as the error message implies). This updates the wording of the error message to account for both scenarios.
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.

None yet

1 participant