Bug 682245 - glibc-2.13.90-5.x86_64 Non-fatal POSTIN scriptlet failure
Summary: glibc-2.13.90-5.x86_64 Non-fatal POSTIN scriptlet failure
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 15
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 683628 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-04 15:28 UTC by Clyde E. Kunkel
Modified: 2011-04-16 20:24 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-08 00:50:29 UTC
Type: ---


Attachments (Terms of Use)

Description Clyde E. Kunkel 2011-03-04 15:28:26 UTC
Description of problem:
during update of Fedora 15

   Updating   : glibc-2.13.90-5.x86_64                             3/82
> Non-fatal POSTIN scriptlet failure in rpm package glibc-2.13.90-5.x86_64
> /usr/sbin/glibc_post_upgrade: While trying to execute /sbin/service 
> child exited with exit code 1
> warning: %post(glibc-2.13.90-5.x86_64) scriptlet failed, exit status 1


Version-Release number of selected component (if applicable):
glibc-2.13.90-5.x86_64

How reproducible:
Two different hardware sets, both on Fedora 15

Steps to Reproduce:
1. yum update
2.
3.
  
Actual results:
As above

Expected results:
no scriptlet failure

Additional info:
From Jakob Jelinek on test list:

Possibly glibc_post_upgrade needs some hacks for systemd.

  /* Check if telinit is available and either SysVInit fifo,                                                                                       
     or upstart telinit.  */                                                                                                                       
  if (access ("/sbin/telinit", X_OK)                                                                                                               
      || ((!!access ("/dev/initctl", F_OK))                                                                                                        
          ^ !access ("/sbin/initctl", X_OK)))                                                                                                      
    _exit (0);                                                                                                                                     
  /* Check if we are not inside of some chroot, because we'd just                                                                                  
     timeout and leave /etc/initrunlvl.  */                                                                                                        
  if (readlink ("/proc/1/exe", initpath, 256) <= 0 ||                                                                                              
      readlink ("/proc/1/root", initpath, 256) <= 0)                                                                                               
    _exit (0);                                                                                                                                     
                                                                                                                                                   
  if (check_elf ("/proc/1/exe"))                                                                                                                   
    verbose_exec (116, "/sbin/telinit", "/sbin/telinit", "u");                                                                                     
                                                                                                                                                   
  /* Check if we can safely condrestart sshd.  */                                                                                                  
  if (access ("/sbin/service", X_OK) == 0                                                                                                          
      && access ("/usr/sbin/sshd", X_OK) == 0                                                                                                      
      && access ("/etc/rc.d/init.d/sshd", X_OK) == 0                                                                                               
      && access ("/bin/bash", X_OK) == 0)                                                                                                          
    {                                                                                                                                              
      if (check_elf ("/usr/sbin/sshd"))                                                                                                            
        verbose_exec (-121, "/sbin/service", "/sbin/service", "sshd", "condrestart");                                                              
    }                                                                                                                                              

It wants to telinit u (to avoid unclean shutdown) and
condrestart sshd (if both exists and it isn't inside of a chroot
and the corresponding init is running and be able to handle telinit u
and service sshd condrestart has also chance of working.

If this changed somehow with systemd, it needs to be tweaked.

	Jakub

Comment 1 Andreas Schwab 2011-03-04 15:47:00 UTC
# service sshd stop
Stopping sshd (via systemctl):                             [  OK  ]
# service sshd condrestart
Restarting sshd (via systemctl):  Job failed. See system logs and 'systemctl status' for details.
                                                           [FAILED]

Comment 2 Jóhann B. Guðmundsson 2011-03-04 16:51:54 UTC
If the service is not running while you run "service $foo condrestart" or systemd equalent the "systemctl try-restart $foo.service" it will always fail.

See relevant restart/reload section in man systemctl for what you expected to happened there

Comment 3 Jakub Jelinek 2011-03-04 16:56:12 UTC
While systemctl can behave any way it likes, service ought to stay compatible with older service implementations and not to fail condrestart if the service is not running.

Comment 4 Bill Nottingham 2011-03-04 16:57:48 UTC
If the point is to handle 'condrestart' as an option for compatibility, then it should probably have the same semantics.

Comment 5 Jóhann B. Guðmundsson 2011-03-04 17:18:09 UTC
What is expected to happen here? 

The condrestart is behaving exactly as it did before. 

SSH has not been ported to nativity systemd service file yet so it executes the old init scripts 

So if you turn off the ssh service in F14 and then do service ssh condrestart it will fail exactly the same way. ( as expected of it )

The update is doing exectly what it supposed try to restart the service after the update and if is not running failing ( you dont want to start turning on service that have been turned off or aren running for some other reason).

If you expect any kind of other behaviour I suggest you fix the condrestart is being done in etc/rc.d/init.d/sshd ?

Comment 6 Jakub Jelinek 2011-03-04 17:24:40 UTC
On F14, I see:

# service sshd status
openssh-daemon (pid  1836) is running...
# service sshd condrestart; echo $?
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]
0
# service sshd stop
Stopping sshd:                                             [  OK  ]
# service sshd condrestart; echo $?
0

In /etc/rc.d/init.d/sshd condrestart starts with:
rh_status_q || exit 0
so it is going to return 0 if it is not running already.

Comment 7 Jóhann B. Guðmundsson 2011-03-04 17:57:11 UTC
Yup working as it ought to be.

If it is expected that it ought to be restarted regardless of it was running before or not you would use service ssh force-reload but that is something I expect that you dont want to do since you will start a service that could have been turned off for one reason or another... 

From my perspective that code snippet that was posted in comment 1 should be fixed to check first if the relevant service is running then proceeds to condrestart or do something else...

Comment 8 Jakub Jelinek 2011-03-04 18:02:14 UTC
condrestart is restart if it was already running before, otherwise do nothing.
In the former case, it should succeed as command if the restart succeeded, in the latter case it should just succeed.  From the start of this bugreport it looks like it fails in the latter case, which is incorrect implementation of condrestart.

Comment 9 Lennart Poettering 2011-03-08 00:50:29 UTC
systemd git will no longer return an error in "systemctl condrestart" if the service isn't running right now. This should resolve the issue.

Upload to F15 will follow shortly.

Comment 10 Andreas Schwab 2011-03-10 07:27:16 UTC
*** Bug 683628 has been marked as a duplicate of this bug. ***

Comment 11 Wr4tH.h0m0nCuLu5 2011-04-13 07:42:46 UTC
The non fatal error still happens with glibc-2.13.90-8.x86_64 while upgrading from F15 to Rawhide. My system is usable but I got various errors like not being able to access software sources in PackageKit, Control-Center won't open when I click on System Settings, etc

Comment 12 Martin Kho 2011-04-16 20:02:46 UTC
Hi,

glibc-2.13.90-9 also shows the above non fatal error. Running service sshd condrestart is not the problem (Restarting sshd (via systemctl) OK). So there seems to be an (-other) issue with glibc it self. When updating using yum I saw elf errors related to atlas-3.8.3-18-fc14. This package is installed in the KDE nightly spin[1].

Martin Kho

[1] http://koji.fedoraproject.org/koji/taskinfo?taskID=2997244

Comment 13 Martin Kho 2011-04-16 20:24:17 UTC
Hi,

Reinstalling glibc(-common) solved the issue.

Sorry for the noise :-$

Martin Kho


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