-
Notifications
You must be signed in to change notification settings - Fork 1.8k
zfs destroy's and zfs rollback's error messages do not list blocking snapshots sorted #12751
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
Comments
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions. |
I was able to confirm the unsorted error message on
The unsorted list seems to be pulled and printed at line 1381 in |
Okay, sorry for the long pause, i have some private stuff going on that is slowing me down a lot. Anyways i read through some of the code and the line i mentioned earlier (line 1381 in zfs_main.c) is calling destroy_print_snapshots, which in turn is calling zfs_iter_snapshots_sorted_v2 which utilizes zfs_snapshot_compare from libzfs_iter.c which already sorts snapshots by creation time, so probably somewhere while passing the sorted list of snapshots they get unsorted. I will look further into it. This is indeed a good first issue, since i am slowly starting to become familiar with the Source Tree! |
Hi there. I am Artem from OSS Revival. If no one is mind, I will deal with this issue. |
Signed-off-by: Artem-OSSRevival <[email protected]>
System information
Describe the problem you're observing
When multiple snapshots prevent the destruction/rollback of the respective dataset/snapshot/volume via
zfs destroy
orzfs rollback
, the respective error message does not list the blocking snapshots sorted according to their order of creation.Describe how to reproduce the problem
The commands
result in the following error message:
Equivalent behaviour occurs when trying to roll back to a blocked snapshot, e.g. via
zfs rollback MyPool/Test@Snap1
Notice how, as mentioned, the resulting error message does not list the snapshots 1-6 in the order of their creation. This results in the error message being somewhat confusing/less intuitive and less informative and thus less useful. It also results in a less uniform behaviour, as
zfs list -t snap MyPool/Test
in contrast sorts the blocking snapshots in the order of their creation already:Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: