http://bugzilla.suse.com/show_bug.cgi?id=1089823
Bug ID: 1089823 Summary: YaST can silently fail to run snapper during installation Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.0 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Installation Assignee: yast2-maintainers@suse.de Reporter: fvogt@suse.com QA Contact: jsrain@suse.com Found By: --- Blocker: ---
Created attachment 767377 --> http://bugzilla.suse.com/attachment.cgi?id=767377&action=edit y2logs
Installation with the live media and snapshots enabled fails: https://openqa.opensuse.org/tests/657353#step/await_install/21
This is because snapper is not installed in the installation system, so the snapper installation-helper is missing. So YaST needs to add a hard dependency there.
The bigger issue is that YaST didn't care that the binary is not present though (found in y2log-3):
[libstorage] ActiongraphImpl.cc:584 Commit Action "Mounting /dev/vda2 at /" [sid:59, first] [libstorage] SystemCmd.cc:67 constructor SystemCmd("/usr/lib/snapper/installation-helper --step '1' --device '/dev/vda2' --description 'first root filesystem'") [libstorage] SystemCmd.cc:186 SystemCmd Executing:"/usr/lib/snapper/installation-helper --step '1' --device '/dev/vda2' --description 'first root filesystem'" [libstorage] SystemCmd.cc:187 timestamp [295.985073], 2018-04-17 02:15:45 GMT, 2018-04-16 22:15:45 EDT [libstorage] SystemCmd.cc:660 Adding Line 1 "/bin/sh: /usr/lib/snapper/installation-helper: No such file or directory" [libstorage] SystemCmd.cc:626 pid:4219 added lines:1 stderr:true [libstorage] SystemCmd.cc:492 THROW: Command not found: "/usr/lib/snapper/installation-helper --step '1' --device '/dev/vda2' --description 'first root filesystem'" [libstorage] SystemCmd.cc:416 stopwatch 0.010977s for "/usr/lib/snapper/installation-helper --step '1' --device '/dev/vda2' --description 'first root filesystem'" [libstorage] SystemCmd.cc:436 system() Returns:127 [libstorage] SystemCmd.cc:678 stderr:/bin/sh: /usr/lib/snapper/installation-helper: No such file or directory [libstorage] SystemCmd.cc:67 constructor SystemCmd("/sbin/udevadm settle --timeout=20")
As can be seen, YaST notices the error but ignores it. Similar output for step 2.
http://bugzilla.suse.com/show_bug.cgi?id=1089823
Arvin Schnell aschnell@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aschnell@suse.com
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c1
Steffen Winterfeldt snwint@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(aschnell@suse.com | |)
--- Comment #1 from Steffen Winterfeldt snwint@suse.com --- Arvin, could you check?
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c2
Arvin Schnell aschnell@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED Flags|needinfo?(aschnell@suse.com | |) |
--- Comment #2 from Arvin Schnell aschnell@suse.com --- This is a KDE Live ISO. AFAIS snapper is not included there. I have no idea how this is supposed to work.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c3
--- Comment #3 from Fabian Vogt fvogt@suse.com --- (In reply to Arvin Schnell from comment #2)
This is a KDE Live ISO. AFAIS snapper is not included there. I have no idea how this is supposed to work.
Yup - I expect it to work if I add manually again.
Still, YaST shouldn't ignore the return status as the installation helper might fail for valid reasons.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c4
Steffen Winterfeldt snwint@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jsrain@suse.com Flags| |needinfo?(jsrain@suse.com)
--- Comment #4 from Steffen Winterfeldt snwint@suse.com --- Not sure what yast-storage should do here. Include snapper in the the feature check, gray out snapshots, show an error when creating snapshots, add a package requires on snapper, ...
OTOH, yast *does* show an error already. So for me this looks fine. Just the KDE Live iso needs fixing.
But anyway, Jiri, please advise.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c5
Jiri Srain jsrain@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(jsrain@suse.com) |
--- Comment #5 from Jiri Srain jsrain@suse.com --- YaST should IMO show an error if snapper could not be run from whatever reason.
OTOH: There is no need to make a hard dependency on snapper - not all systems want snapshots enabled.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c6
--- Comment #6 from Fabian Vogt fvogt@suse.com ---
OTOH, yast *does* show an error already. So for me this looks fine. Just the KDE Live iso needs fixing.
It's not fine.
The error is *after* the installation.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c7
--- Comment #7 from Fabian Vogt fvogt@suse.com --- (In reply to Jiri Srain from comment #5)
YaST should IMO show an error if snapper could not be run from whatever reason.
OTOH: There is no need to make a hard dependency on snapper - not all systems want snapshots enabled.
I agree - but a hard dependency in yast2-installation should be fine as normally yast2-installation isn't installed.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c8
Steffen Winterfeldt snwint@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium URL| |https://trello.com/c/TtsLqJ | |Ah Assignee|yast2-maintainers@suse.de |yast-internal@suse.de
--- Comment #8 from Steffen Winterfeldt snwint@suse.com --- Tracking in YaST scrum board.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c9
--- Comment #9 from Fabian Vogt fvogt@suse.com --- (In reply to Steffen Winterfeldt from comment #8)
Tracking in YaST scrum board.
There seems to be a misunderstanding - it shouldn't just detect that snapper is missing. That would be incomplete and miss the point of this bug report.
It needs to look at the return value of the snapper installation-helper.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c10
Jiri Srain jsrain@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fvogt@suse.com Flags| |needinfo?(fvogt@suse.com)
--- Comment #10 from Jiri Srain jsrain@suse.com --- (In reply to Fabian Vogt from comment #7)
(In reply to Jiri Srain from comment #5)
YaST should IMO show an error if snapper could not be run from whatever reason.
OTOH: There is no need to make a hard dependency on snapper - not all systems want snapshots enabled.
I agree - but a hard dependency in yast2-installation should be fine as normally yast2-installation isn't installed.
Please, no hard dependency. YaST does not require any file system specific tools because the respective filesystem can be used.
(In reply to Fabian Vogt from comment #6)
OTOH, yast *does* show an error already. So for me this looks fine. Just the KDE Live iso needs fixing.
It's not fine.
The error is *after* the installation.
What does "after installation" mean?
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c11
Fabian Vogt fvogt@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(fvogt@suse.com) |
--- Comment #11 from Fabian Vogt fvogt@suse.com --- (In reply to Jiri Srain from comment #10)
(In reply to Fabian Vogt from comment #7)
(In reply to Jiri Srain from comment #5)
YaST should IMO show an error if snapper could not be run from whatever reason.
OTOH: There is no need to make a hard dependency on snapper - not all systems want snapshots enabled.
I agree - but a hard dependency in yast2-installation should be fine as normally yast2-installation isn't installed.
Please, no hard dependency. YaST does not require any file system specific tools because the respective filesystem can be used.
Fair enough, but then YaST should not allow those filesystems to be used. If it breaks hard if a tool is not used, it's a hard dependency.
(In reply to Fabian Vogt from comment #6)
OTOH, yast *does* show an error already. So for me this looks fine. Just the KDE Live iso needs fixing.
It's not fine.
The error is *after* the installation.
What does "after installation" mean?
If you look at the linked openQA screenshot, the installation is at 99%, which means except for the snapshot creation it's complete. The system would probably boot fine.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c12
--- Comment #12 from Jiri Srain jsrain@suse.com --- (In reply to Fabian Vogt from comment #11)
(In reply to Jiri Srain from comment #10)
(In reply to Fabian Vogt from comment #7)
(In reply to Jiri Srain from comment #5)
YaST should IMO show an error if snapper could not be run from whatever reason.
OTOH: There is no need to make a hard dependency on snapper - not all systems want snapshots enabled.
I agree - but a hard dependency in yast2-installation should be fine as normally yast2-installation isn't installed.
Please, no hard dependency. YaST does not require any file system specific tools because the respective filesystem can be used.
Fair enough, but then YaST should not allow those filesystems to be used. If it breaks hard if a tool is not used, it's a hard dependency.
I believe that this has never been handled properly for live installer; for standard installation YaST just automatically selects the needed packages (which is not possible with the live image).
(In reply to Fabian Vogt from comment #6)
OTOH, yast *does* show an error already. So for me this looks fine. Just the KDE Live iso needs fixing.
It's not fine.
The error is *after* the installation.
What does "after installation" mean?
If you look at the linked openQA screenshot, the installation is at 99%, which means except for the snapshot creation it's complete. The system would probably boot fine.
OK, so still within the installation :-) My point was: some weeks ago, there were too many places when on command execution failure YaST just crashed; compared to that, current behavior of this particular step is correct - error reported.
Avoiding the otherwise correctly handled situation is a different topic - and this is what should be addressed.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c13
--- Comment #13 from Fabian Vogt fvogt@suse.com --- (In reply to Jiri Srain from comment #12)
(In reply to Fabian Vogt from comment #11)
(In reply to Jiri Srain from comment #10)
(In reply to Fabian Vogt from comment #7)
(In reply to Jiri Srain from comment #5)
YaST should IMO show an error if snapper could not be run from whatever reason.
OTOH: There is no need to make a hard dependency on snapper - not all systems want snapshots enabled.
I agree - but a hard dependency in yast2-installation should be fine as normally yast2-installation isn't installed.
Please, no hard dependency. YaST does not require any file system specific tools because the respective filesystem can be used.
Fair enough, but then YaST should not allow those filesystems to be used. If it breaks hard if a tool is not used, it's a hard dependency.
I believe that this has never been handled properly for live installer; for standard installation YaST just automatically selects the needed packages (which is not possible with the live image).
Well, the only difference is that on the live media a full openSUSE is used instead of installation-images.
(In reply to Fabian Vogt from comment #6)
OTOH, yast *does* show an error already. So for me this looks fine. Just the KDE Live iso needs fixing.
It's not fine.
The error is *after* the installation.
What does "after installation" mean?
If you look at the linked openQA screenshot, the installation is at 99%, which means except for the snapshot creation it's complete. The system would probably boot fine.
OK, so still within the installation :-) My point was: some weeks ago, there were too many places when on command execution failure YaST just crashed; compared to that, current behavior of this particular step is correct - error reported.
The error is not reported.
The only message you get is that the snapper config is missing, which is highly misleading as it should've been created at the very beginning of the installation, just after the mkfs.btrfs.
There was no handling of that error at all.
Avoiding the otherwise correctly handled situation is a different topic - and this is what should be addressed.
It's not handled correctly in any way.
http://bugzilla.suse.com/show_bug.cgi?id=1089823 http://bugzilla.suse.com/show_bug.cgi?id=1089823#c14
--- Comment #14 from Fabian Vogt fvogt@suse.com --- I'll try to explain the bug again.
At the beginning of the installation, YaST basically does the following:
mkfs.btrfs <device> ... [...] /usr/lib/snapper/installation-helper --step 1 /mnt ... ^ This fails. Ignored. /usr/lib/snapper/installation-helper --step 2 /mnt ... ^ This fails. Ignored. [...] Download and install packages into /mnt. Do some configuration in /mnt. Install the bootloader. [...]
At the end, YaST does /usr/lib/snapper/installation-helper --step 3 /mnt ... ^ This fails. Ignored. /usr/lib/snapper/installation-helper --step 4 /mnt ... ^ This fails. Ignored. chroot /mnt snapper --no-dbus set-config KEY=value ^ This fails. Not ignored.
There is no error message at all about any failed calls to installation-helper.
https://bugzilla.suse.com/show_bug.cgi?id=1089823 https://bugzilla.suse.com/show_bug.cgi?id=1089823#c15
Stefan Hundhammer shundhammer@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(aschnell@suse.com | |)
--- Comment #15 from Stefan Hundhammer shundhammer@suse.com --- Arvin, is this still a problem today? This was 4 years ago.
https://bugzilla.suse.com/show_bug.cgi?id=1089823 https://bugzilla.suse.com/show_bug.cgi?id=1089823#c16
Arvin Schnell aschnell@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|yast-internal@suse.de |aschnell@suse.com Flags|needinfo?(aschnell@suse.com | |) |
--- Comment #16 from Arvin Schnell aschnell@suse.com --- I doubt that this is overall a problem. Anyway, the error is still ignored. I can change that.
https://bugzilla.suse.com/show_bug.cgi?id=1089823
Arvin Schnell aschnell@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |IN_PROGRESS
https://bugzilla.suse.com/show_bug.cgi?id=1089823 https://bugzilla.suse.com/show_bug.cgi?id=1089823#c17
Arvin Schnell aschnell@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED Target Milestone|--- |Leap 15.5
--- Comment #17 from Arvin Schnell aschnell@suse.com --- SR: https://build.suse.de/request/show/292992