Fix restore failing silently when fstab uses LABEL= entries#556
Open
HannahPeuckmann wants to merge 1 commit into
Open
Fix restore failing silently when fstab uses LABEL= entries#556HannahPeuckmann wants to merge 1 commit into
HannahPeuckmann wants to merge 1 commit into
Conversation
is_for_system_directory() only recognized /dev/* and UUID= device strings, and find_device_in_list() only stripped the UUID= prefix before comparing against known devices. Any fstab entry using LABEL= (the default on Ubuntu cloud images, e.g. LABEL=cloudimg-rootfs) was filtered out before device resolution ever ran, so dst_root was never set. For --restore --scripted against the currently running system, this meant mount_target_devices() bailed out at its dst_root null-check before the real rsync restore ever started, with no error, a restore that appeared to run but silently did nothing. Recognize label=/partuuid=/partlabel= alongside /dev/ and uuid= in is_for_system_directory(), and strip label= before comparing in find_device_in_list(), the same way uuid= already is. Signed-off-by: Hannah Peuckmann <hannah.peuckmann@canonical.com>
Author
|
Without the fix (it just stops and does nothing): With the fix: I have only been able to test this on an amd64 vm, I tried testing on arm64 and s390x vms but due to #523 this was not possible. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
is_for_system_directory() only recognized /dev/* and UUID= device strings, and find_device_in_list() only stripped the UUID= prefix before comparing against known devices. Any fstab entry using LABEL= (the default on Ubuntu cloud images, e.g. LABEL=cloudimg-rootfs) was filtered out before device resolution ever ran, so dst_root was never set.
For --restore --scripted against the currently running system, this meant mount_target_devices() bailed out at its dst_root null-check before the real rsync restore ever started, with no error, a restore that appeared to run but silently did nothing.
Recognize label=/partuuid=/partlabel= alongside /dev/ and uuid= in is_for_system_directory(), and strip label= before comparing in find_device_in_list(), the same way uuid= already is.