Bug 1111786 - quit() tries to remove current snapshot
quit() tries to remove current snapshot
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kubic
Current
Other Other
: P5 - None : Major (vote)
: ---
Assigned To: Ignaz Forster
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-15 07:21 UTC by Thorsten Kukuk
Modified: 2021-06-14 06:16 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
transactional-update.log (102.36 KB, text/x-log)
2018-10-15 07:21 UTC, Thorsten Kukuk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Kukuk 2018-10-15 07:21:28 UTC
Created attachment 785936 [details]
transactional-update.log

g126.suse.de is running openSUSE Kubic with nightly automatic updates and reboots via rebootmgrd.

In the logs I saw know:

2018-10-13 00:36 Trying to rebuild kdump initrd
2018-10-13 00:36 transactional-update finished - rebooting machine
2018-10-13 00:36 Removing snapshot #26...
Deleting snapshot failed.
2018-10-13 00:36 Removing snapshot #25...
2018-10-13 00:36 transactional-update finished


That's the "quit()" routine, why does it thinks it has to remove the current snapshot?
Comment 1 Ignaz Forster 2018-10-15 08:58:58 UTC
quit() is called when prematurely exiting the application, so it will try to revert everything it has done. On successful completion the teardown() routine is used instead.

Is this error happening with the upstream transactional-update, or is this a modified version? I've just verified that every time quit() is called an error message is printed, so the attached log should not be possible...
Comment 2 Thorsten Kukuk 2018-10-15 09:24:25 UTC
g126:~ # rpm -qi transactional-update 
Name        : transactional-update
Version     : 2.6
Release     : 2.1
Architecture: x86_64
Install Date: Tue Oct  2 07:12:02 2018

It's what currently is in Factory, it was a plain openSUSE Kubic installation.
And I agree that this log should not be possible,that's why I created the bug ...

Could it be that the log file is not written in the correct order?

reboot_via_systemd() {
    log_info "transactional-update finished - rebooting machine"
    sync
    systemctl reboot |& tee -a ${LOGFILE}
    exit 0
}

Or is it coming from the self-update?
Comment 3 Thorsten Kukuk 2018-10-15 09:25:43 UTC
2018-10-13 00:36 Removing snapshot #26...
Deleting snapshot failed.
2018-10-13 00:36 Removing snapshot #25...

Snapshot #25 is clearly missing on the system.
Comment 4 Ignaz Forster 2018-10-15 14:39:54 UTC
That's interesting. There's exactly one condition when quit is called without a message in the log file, and this is when it receives a termination signal. It seems systemd is faster to send termination signals to all processes than the transactional-update Bash script can complete the next line where it would just exit.
Comment 6 Ignaz Forster 2018-10-23 14:45:48 UTC
Fixed by unsetting the error handling traps before initiating a reboot.

Will be available in transactional-update 2.10 (https://github.com/openSUSE/transactional-update/commit/6c9359fb6841ffea835fc7e2c0d56dac5da1260d)
Comment 7 Swamp Workflow Management 2018-11-23 14:31:03 UTC
This is an autogenerated message for OBS integration:
This bug (1111786) was mentioned in
https://build.opensuse.org/request/show/651388 15.0 / transactional-update
Comment 8 Swamp Workflow Management 2018-12-07 23:10:03 UTC
openSUSE-RU-2018:4027-1: An update that has 6 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1088676,1097619,1105992,1111319,1111321,1111786
CVE References: 
Sources used:
openSUSE Leap 15.0 (src):    transactional-update-2.11-lp150.2.9.1
openSUSE Backports SLE-15 (src):    transactional-update-2.11-bp150.2.6.1
Comment 9 Ignaz Forster 2018-12-11 11:04:15 UTC
Fix released in all affected products.