Bug 1254335 - initial-setup cleanup script hung during a dnf upgrade from f22 to f23
initial-setup cleanup script hung during a dnf upgrade from f22 to f23
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-08-17 14:15 EDT by Bruno Wolff III
Modified: 2016-07-19 13:32 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-19 13:32:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bruno Wolff III 2015-08-17 14:15:48 EDT
Description of problem:
While doing an upgrade from f22 to f23 the cleanup script for initial setup hung which blocked the upgrade from proceding until I manually killed the script.
It would be better for the script to fail than hang indefinitely when something goes wrong.

Version-Release number of selected component (if applicable):

How reproducible:
I am not sure, since I don't have spare systems to practice upgrading from f22 to f23.

Steps to Reproduce:
1. dnf distro-sync --releasever=23 --allowerasing

Actual results:
^M  Cleanup     : initial-setup-0.3.31-1.fc22.x86_64                  22516/34856 ^M
/var/tmp/rpm-tmp.P7eo76: line 6: 20709 Hangup                  systemctl try-restart initial-setup-text.service > /dev/null 2>&1^M
Comment 1 Vratislav Podzimek 2015-08-18 02:42:57 EDT
This looks to me like a systemd bug because here's what initial-setup does:

%systemd_preun initial-setup-text.service

%systemd_postun_with_restart initial-setup-text.service

%post gui
%systemd_post initial-setup-graphical.service

%preun gui
%systemd_preun initial-setup-graphical.service

%postun gui
%systemd_postun_with_restart initial-setup-graphical.service

$ rpm --eval '%{systemd_postun_with_restart}'

systemctl daemon-reload >/dev/null 2>&1 || : 
if [ $1 -ge 1 ] ; then 
        # Package upgrade, not uninstall 
        systemctl try-restart  >/dev/null 2>&1 || : 

and systemctl(1) says:
       try-restart PATTERN...
           Restart one or more units specified on the command line if the units are running. This does nothing if units are not running. Note that, for compatibility with Red Hat init scripts, condrestart
           is equivalent to this command.

Since the intial-setup-text.service is not running in the time of the upgrade, the try-restart should do nothing. And if daemon-reload hangs, we can hardly do anything about it.
Comment 2 Gary Gatling 2015-10-05 15:48:46 EDT
I am seeing this on a fresh install of fedora 23 x86_64 MATE spin while doing the first "dnf update" command post install on a laptop. 

I also did a pair of installs into KVM virtual machines and did NOT see a problem on i686. So something is different between a i686 KVM machine and a x86_64 real laptop PC. Also saw it hang on Cleanup on KVM on x86_64 so maybe its a x86_64 only bug...

The problem I'm seeing is with initial-setup-0.3.35-1.fc23.x86_64  It gets stuck in the "Cleanup" part on the lenovo Y470 and x86_64 virtual machine.
Comment 3 Jacob Keller 2016-06-17 16:20:42 EDT
As a work around, you can find the systemctl process and kill it. It's not really ideal but it gets the cleanup un-hung so that you can finish the upgrade process. It definitely hands on the try-restart, which may just be a bug or a fluke of the particular unit.
Comment 4 Fedora End Of Life 2016-07-19 13:32:36 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.