On Sat, 12.03.11 20:52, Andrey Borzenkov (arvidj...@gmail.com) wrote: > 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.
Is it? Just because the configuration language changed the daemon shouldn't. In fact we emphasize that SysV and systemd units should bear the same name if possible, to simplify upgrading. And one of the reasons we do this is to make things like this very easy. > 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 I'd consider this an example that shows awesome systemd is: you upgrade from pre-systemd to systemd packages, and systemd hanldes that properly and even detects what your main pid is! Really, I'd consider this a feature, not a bug. Seamless upgrades on configuration changes, how awesome is that! Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel