[systemd-devel] service status has to be reset on upgrade SysV => native

Andrey Borzenkov arvidjaar at gmail.com
Sat Mar 12 09:52:13 PST 2011


I am working on set of RPM helper scripts for system unit packaging
and migration. One thing noted - when we migrate "running" SysV
service to unit with the same name, systemd status becomes quite
confused. It now accounts processes started by old SysV script as
belonging to new native unit. This is wrong. New unit may be split in
a totally different wat, use completely different start/stop commands
and be completely incompatible with old SysV script. Cf.

{pts/1}% sudo rpm -Uvh RPMS/noarch/foo-1-1-mdv2011.0.noarch.rpm
Подготовка...     ########################################### [100%]
   1:foo                    ########################################### [100%]
{pts/1}% sudo service foo start
Starting foo (via systemctl):                                   [   ОК  ]
{pts/1}% systemctl status foo.service
foo.service - LSB: foo
          Loaded: loaded (/etc/rc.d/init.d/foo)
          Active: active (running) since Sat, 12 Mar 2011 20:48:56
+0300; 11s ago
         Process: 11641 ExecStart=/etc/rc.d/init.d/foo start
(code=exited, status=0/SUCCESS)
        Main PID: 11648 (sleep)
          CGroup: name=systemd:/system/foo.service
                  └ 11648 /bin/sleep 100000000
{pts/1}% sudo rpm -Fvh RPMS/noarch/*
Подготовка...     ########################################### [100%]
   1:foo                    ########################################### [100%]
{pts/1}% systemctl status foo.service
foo.service - Foo Service
          Loaded: loaded (/lib/systemd/system/foo.service)
          Active: active (running) since Sat, 12 Mar 2011 20:49:31 +0300; 3s ago
        Main PID: 11648 (sleep)
          CGroup: name=systemd:/system/foo.service
                  └ 11648 /bin/sleep 100000000


More information about the systemd-devel mailing list