Project

General

Profile

Bug #63801

Ensure iocage checks that snapshot exists before destroying it

Added by Waqar Ahmed 8 months ago. Updated 5 months ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Severity:
Low Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

In iocage if we want to remove a snapshot, we don't check if it exists. We should first check and if it exists then remove it.

root@freenas[~]# iocage snapremove -n snaptest/root cloned_jail_renamed
could not find any snapshots to destroy; check snapshot names.
Command '['zfs', 'destroy', '-r', '-f', 'vol1/iocage/jails/cloned_jail_renamed@snaptest/root']' returned non-zero exit status 1.

Risk
We risk breaking removal of snapshots in iocage for a jail

Acceptance Criteria
If a snapshot doesn't exist, we should raise an exception appropriately and it should be made sure that we haven't broken removal of snapshots. So an existing snapshot should be removed and ensured that it works

History

#1 Updated by Bug Clerk 8 months ago

  • Status changed from In Progress to Ready for Testing

#2 Updated by Dru Lavigne 7 months ago

  • Target version changed from 11.3 to 11.3-BETA1

#3 Updated by Dru Lavigne 7 months ago

  • Subject changed from Check snapshot exists before destroying it to Ensure iocage checks that snapshot exists before destroying it
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#6 Avatar?id=55038&size=24x24 Updated by Zackary Welch 5 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Confirmed in 11.3-BETA1.

#7 Updated by Dru Lavigne 5 months ago

  • Status changed from Passed Testing to Done

#8 Updated by Dru Lavigne 5 months ago

  • Target version changed from 11.3-BETA1 to 11.3-ALPHA1

Also available in: Atom PDF