Native upstart scripts – implemented

Elan Ruusamäe glen at delfi.ee
Sun May 9 10:39:14 CEST 2010


On Friday 07 May 2010 16:33:21 Jacek Konieczny wrote:
> Hello,
>
> Your volunteer has done his job :)

seems there's some deadlock with initctl emiting

also seems the "nice service name" is lost there (see sshd part).

also seems there's no our typical restart service after package upgrade,
if you've upgrading upstart-enabled service.
%define upstart_post() \
    if [ -f /var/lock/subsys/"%1" ] ; then \
        /sbin/service --no-upstart "%1" stop \
        /sbin/service "%1" start \
    fi

anyway, ps of stall:
root     25974  0.4  0.5  15596  6064 pts/3    S+   11:23   0:00          \_ poldek -u upstart --up --sn carme openssh-server-upstart syslog-ng-upstart
root     27078  0.4  0.5  12516  5804 pts/3    S+   11:24   0:00              \_ 
rpm --upgrade -vh --root / /var/cache/poldek/http_carme.pld-linux.org..glen.th.i686/syslog-ng-3.0.5-2.1.i
root     27181  0.0  0.0   1872   584 pts/3    S+   11:24   0:00                  \_ /bin/sh /home/users/glen/tmp/rpm-tmp.59975 2
root     27184  0.0  0.0   1872   604 pts/3    S+   11:24   0:00                      \_ /bin/sh /sbin/service syslog-ng restart
root     27187  0.0  0.0   2000   808 pts/3    S+   11:24   0:00                          \_ /bin/sh /etc/rc.d/init.d/syslog-ng restart
root     27321  0.0  0.0   5716   972 pts/3    S+   11:24   0:00                              \_ /sbin/initctl emit started JOB=syslog-ng SERVICE=syslog

and terminal output:

11:23:03 root[load: 5.81; cpu: 68c]@ravenous ~# poldek -u upstart --up --sn carme openssh-server-upstart syslog-ng-upstart
...
Preparing...                ########################################### [100%]
   1:rc-scripts             ########################################### [ 25%]
   2:openssh                ########################################### [ 50%]
   3:openssh-server         ########################################### [ 75%]
 * Reloading OpenSSH service.......................................[ DONE ]
   4:openssh-server-upstart ########################################### [100%]
 * Stopping OpenSSH service........................................[ DONE ]
 * Starting sshd service...........................................[ DONE ]

Installing set #2
Processing dependencies...
syslog-ng-upstart-3.0.5-2.1.i686 marks syslog-ng-3.0.5-2.1.i686 (cap syslog-ng = 3.0.5-2.1)
 syslog-ng-3.0.5-1.i686 obsoleted by syslog-ng-3.0.5-2.1.i686
There are 2 packages to install (1 marked by dependencies), 1 to remove:
I syslog-ng-upstart-3.0.5-2.1.i686
D syslog-ng-3.0.5-2.1.i686
R syslog-ng-3.0.5-1.i686
This operation will use 423.0B of disk space.
Need to get 2.7MB of archives (2.7MB to download).

Retrieving carme::syslog-ng-3.0.5-2.1.i686.rpm...
.............................. 100.0% [2.7M (450.6K/s)]                      
Retrieving carme::syslog-ng-upstart-3.0.5-2.1.i686.rpm...
.............................. 100.0% [4.2K (4.2K/s)]                   
Executing rpm --upgrade -vh --root /...
error: failed to stat /mnt/docs: Host is down
Preparing...                ########################################### [100%]
   1:syslog-ng              ########################################### [ 50%]
 * Stopping syslog-ng service......................................[ DONE ]
 * Starting syslog-ng service......................................[ DONE ]

# strace -p 27321  
Process 27321 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>

# lsof -p 27321  
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/users/glen/.gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() cifs file system /mnt/docs
      Output information may be incomplete.
COMMAND   PID USER   FD   TYPE     DEVICE  SIZE/OFF     NODE NAME
initctl 27321 root  cwd    DIR      254,0      4096      128 /
initctl 27321 root  rtd    DIR      254,0      4096      128 /
initctl 27321 root  txt    REG      254,0    121084 50978235 /sbin/initctl
initctl 27321 root  mem    REG      254,0 109740720   142782 /usr/lib/locale/locale-archive
initctl 27321 root  mem    REG      254,0    117047 34830808 /lib/libpthread-2.11.1.so
initctl 27321 root  mem    REG      254,0     26512 35528163 /lib/librt-2.11.1.so
initctl 27321 root  mem    REG      254,0   1339736 33654733 /lib/libc-2.11.1.so
initctl 27321 root  mem    REG      254,0    214980 34344577 /lib/libdbus-1.so.3.4.0
initctl 27321 root  mem    REG      254,0     33996 33600976 /lib/libnih-dbus.so.1.0.0
initctl 27321 root  mem    REG      254,0     83156 33632425 /lib/libnih.so.1.0.0
initctl 27321 root  mem    REG      254,0    132403 33596389 /lib/ld-2.11.1.so
initctl 27321 root    0r  FIFO        0,8       0t0  1228197 pipe
initctl 27321 root    1u   CHR      136,7       0t0       10 /dev/pts/7
initctl 27321 root    2u   CHR      136,7       0t0       10 /dev/pts/7
initctl 27321 root    3u  unix 0xdb670a00       0t0  1228587 socket

-- 
glen


More information about the pld-devel-en mailing list