Skip to content

Improve output when delete_snapshot is blocked by task#6

Open
eherot wants to merge 2 commits intoflant:mainfrom
invaluable:improve_safe_to_snap_output
Open

Improve output when delete_snapshot is blocked by task#6
eherot wants to merge 2 commits intoflant:mainfrom
invaluable:improve_safe_to_snap_output

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.

1 participant