-
Notifications
You must be signed in to change notification settings - Fork 251
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
Include dmsetup
and dmeventd
unconditionally
#2748
Conversation
2eb44c6
to
c726886
Compare
Similar problem was reported for another case outside the context of ReaR where grub2-mkconfig is executed in a chroot with udev running outside the chroot: the Debian installer. The result is the same: it hangs forever when executing |
In order to show the problem the system must not use any LVM, thus the previous code did not include |
In general when programs are useful in any case in the recovery system |
Only FYI: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsmeix I agree. This case of |
2b9a1ec
to
d59a17d
Compare
There should be no problem adding something to PROGS or REQUIRED_PROGS several times
and even without |
When there are no objections I would like to merge it today afternoon. |
d59a17d
to
cf865b0
Compare
usr/share/rear/conf/GNU/Linux.conf
Outdated
# GRUB2 installation is performed in a chroot after the data have already | ||
# been recovered. ReaR would call grub-mkconfig which calls os-prober | ||
# which then executes dmsetup. However, it would never receive the response | ||
# trough host's udev as the rescue system would not have dmsetup present |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*through, and while at it you can say that the expected response is in the form of releasing a SysV semaphore by dmsetup executed from udev and reference the related debian-installer bugs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thinking about it, the response is more "from udev processing" than "through udev" as it bypasses the udev control socket and is sent directly from one dmsetup to another via sysvipc.
Changes usr/share/rear/conf/GNU/Linux.conf Older releases of os-prober (1.74 and below) use dmsetup as a fallback solution for mounting when grub-mount is missing. However, dmsetup was included in the rescue image if and only if LVM, multipath or encryption were detected. Thus, BIOS machines that do not use these but still have dmsetup present, would block indefinitely on the "Installing GRUB2 boot loader..." step. GRUB2 installation is performed in a chroot after the data have already been recovered. ReaR would call grub-mkconfig which calls os-prober which then executes dmsetup. However, it would never receive the expected response in the form of releasing a System V semaphore by dmsetup executed by udevd outside the chroot as rescue system would not have dmsetup present. related https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853927
cf865b0
to
e5a84fd
Compare
I assume the description is OK now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am satisfied with the explanation now, @jsmeix hope it is understandable - I participated in the debugging of the problem, so I am not a good outside observer.
@lzaoral @pcahyna I think I understand "something" but the main point is that one understands |
Technically, this is not 100% true. You can copy dmsetup from the restored chroot to the running rescue ramdisk and restart rear recover, so this is one of the less disastrous errors that may happen (there are other ways to add missing stuff to the ramdisk, even a forgotten backup client can be added). But in this case the problem is really mysterious and it took us days to even figure out that dmsetup is what one needs (debian / ubuntu were never able to debug this problem in their installer and they rather requested removal of the problematic code from os-prober entirely), so it is very unlikely that one would find out the workaround. |
Pull Request Details:
Type: Bug Fix
Impact: High
Reference to related issue (URL): None
How was this pull request tested?
Successful recovery of a RHEL 8.5 VM with BIOS without encryption, LVM
or multipath with this patch applied and unsuccessful recovery of the same
machine without it. RHEL 8.5 has
os-prober
1.74 and does not shipgrub-mount
binary.Changes usr/share/rear/conf/GNU/Linux.conf
Older releases of
os-prober
(1.74 and below) usedmsetup
as a fallbacksolution for mounting when
grub-mount
is missing.However,
dmsetup
was included in the rescue image if and only if LVM,multipath or encryption were detected. Thus, BIOS machines that do
not use these but still have
dmsetup
present, would block indefinitelyon the "Installing GRUB2 boot loader..." step.
GRUB2 installation is performed in a chroot after the data have already
been recovered. ReaR would call
grub-mkconfig
which callsos-prober
which then executes
dmsetup
. However, it would never receive the responsetrough host's udev as the rescue system would not have
dmsetup
presentto send it.
EDIT: reworded the description (thanks @pcahyna for suggestions!)
EDIT2: usr/share/rear/conf/GNU/Linux.conf is now being changed.