[systemd-devel] how-to run instantiated units from templates one after the other

2015-09-18 Thread Dmitry Karpov
I have a template for creating the backup: backup@.service [Unit] Description=Instance %i [Service] ExecStart=/bin/sh -c "echo do backup job for %i" [Install] WantedBy=maintenance.target and some target: maintenance.target [Unit] Description=target for maintenance

Re: [systemd-devel] a problem about the order of service shudown in systeamd

2015-09-18 Thread Reindl Harald
Am 18.09.2015 um 11:51 schrieb lucien xin: On Fri, Sep 18, 2015 at 5:11 PM, Reindl Harald wrote: Am 18.09.2015 um 11:03 schrieb lucien xin: is there a options that can define some common shutdown/boot order priority? not through dependence( After= and Before= you

Re: [systemd-devel] a problem about the order of service shudown in systeamd

2015-09-18 Thread Andrei Borzenkov
On Fri, Sep 18, 2015 at 10:44 AM, lucien xin wrote: > I have some services which need to start after "network.target", and > shutdown before "network.target". but systemd didn't know "teamd" also > belongs to "network.target", so it won't shutdown the service before >

Re: [systemd-devel] a problem about the order of service shudown in systeamd

2015-09-18 Thread lucien xin
On Fri, Sep 18, 2015 at 3:55 PM, Andrei Borzenkov wrote: > On Fri, Sep 18, 2015 at 10:44 AM, lucien xin wrote: >> I have some services which need to start after "network.target", and >> shutdown before "network.target". but systemd didn't know "teamd"

Re: [systemd-devel] a problem about the order of service shudown in systeamd

2015-09-18 Thread Reindl Harald
Am 18.09.2015 um 10:34 schrieb lucien xin: Just order teamd before network.target sorry, I cannot follow you. After=network.target I mean, now my A.service is shutdown before network.target. but I also wnat A.service to be shutdown before teamd, define "After=teamd@team0.service

Re: [systemd-devel] a problem about the order of service shudown in systeamd

2015-09-18 Thread Andrei Borzenkov
On Fri, Sep 18, 2015 at 12:03 PM, lucien xin wrote: > > is there a options that can define some common shutdown/boot order > priority? not through dependence( After= and Before= you mentioned). > > for example, A.service maybe 5, network.target and teamd are 1, the > service

Re: [systemd-devel] a problem about the order of service shudown in systeamd

2015-09-18 Thread lucien xin
> > yes > > while it make sno difference if you define Before= in one unit or After= in > the other, if a service at shutdown should be stopped before another one it > needs just to be startet afterward at boot > > and it makes sense > > * something needs networking > * so it is started after

Re: [systemd-devel] Systemd 226: Neither machinectl login nor machinectl shell works

2015-09-18 Thread Michael Biebl
2015-09-18 22:34 GMT+02:00 Tobias Hunger : > > Any progress yet on the "very soon now" release? This fix is supposed to be part of the v226 release, which was released on 2015-09-08. You raised this issue on 2015-09-05, so you didn't have v226 back then. -- Why is it

Re: [systemd-devel] Systemd 226: Neither machinectl login nor machinectl shell works

2015-09-18 Thread Tobias Hunger
On Sun, Sep 6, 2015 at 12:13 PM, Lennart Poettering wrote: > This should be fixed with git now. And we'll do a new release very > soon now. Any progress yet on the "very soon now" release? Building systemd manually and then integrating that into a newly installed copy

[systemd-devel] PATCH: src/udev/ata_id/ata_id.c: WWN recognition fails on big-endian systems

2015-09-18 Thread Tom Lyon
--- a/src/udev/ata_id/ata_id.c +++ b/src/udev/ata_id/ata_id.c @@ -485,6 +485,10 @@ int main(int argc, char *argv[]) disk_identify_fixup_uint16(identify.byte, 90); /* time required for enhanced SECURITY ERASE UNIT */ disk_identify_fixup_uint16(identify.byte,

Re: [systemd-devel] Question related to cgroup and systemd

2015-09-18 Thread Francis Moreau
Hello Lennart, On Fri, Sep 18, 2015 at 2:24 PM, Lennart Poettering wrote: > B1;4002;0cOn Fri, 18.09.15 14:11, Francis Moreau (francis.m...@gmail.com) > wrote: > >> Hi, >> >> I'm trying to understand how cgroup is used by systemd and having the >> following behaviour that

[systemd-devel] Reason for logind using DRM_IOCTL_DROP_MASTER?

2015-09-18 Thread Andrei Borzenkov
I have weird case where attempt to start program on discrete card fails with [ 1064.755339] [DEBUG][XORG] (--) using VT number 7 [ 1064.755345] [DEBUG][XORG] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration [ 1064.755351]

[systemd-devel] Question related to cgroup and systemd

2015-09-18 Thread Francis Moreau
Hi, I'm trying to understand how cgroup is used by systemd and having the following behaviour that I don't understand. I've created a slice "myslice.slice" with this resource constraint "MemoryLimit=1024" and started it. I was expecting to find a trace of myslice in /sys/fs/cgroup/memory folder

Re: [systemd-devel] Question related to cgroup and systemd

2015-09-18 Thread Lennart Poettering
B1;4002;0cOn Fri, 18.09.15 14:11, Francis Moreau (francis.m...@gmail.com) wrote: > Hi, > > I'm trying to understand how cgroup is used by systemd and having the > following behaviour that I don't understand. > > I've created a slice "myslice.slice" with this resource constraint >

Re: [systemd-devel] a problem about the order of service shudown in systeamd

2015-09-18 Thread lucien xin
On Fri, Sep 18, 2015 at 5:11 PM, Reindl Harald wrote: > > > Am 18.09.2015 um 11:03 schrieb lucien xin: >> >> is there a options that can define some common shutdown/boot order >> priority? not through dependence( After= and Before= you mentioned). > > > no, and it makes no

[systemd-devel] a problem about the order of service shudown in systeamd

2015-09-18 Thread lucien xin
I have some services which need to start after "network.target", and shutdown before "network.target". but systemd didn't know "teamd" also belongs to "network.target", so it won't shutdown the service before "teamd". to workaround it, I need to define "After=teamd@team0.service

Re: [systemd-devel] a problem about the order of service shudown in systeamd

2015-09-18 Thread Andrei Borzenkov
On Fri, Sep 18, 2015 at 11:44 AM, Reindl Harald wrote: > > > Am 18.09.2015 um 10:34 schrieb lucien xin: >>> >>> Just order teamd before network.target >> >> >> sorry, I cannot follow you. > > > After=network.target > Actually I meant that teamd should have

Re: [systemd-devel] a problem about the order of service shudown in systeamd

2015-09-18 Thread lucien xin
On Fri, Sep 18, 2015 at 4:44 PM, Reindl Harald wrote: > > > Am 18.09.2015 um 10:34 schrieb lucien xin: >>> >>> Just order teamd before network.target >> >> >> sorry, I cannot follow you. > > > After=network.target > >> I mean, now my A.service is shutdown before

Re: [systemd-devel] Modifying systemd dependency tree during boot

2015-09-18 Thread Andrei Borzenkov
18.09.2015 17:58, Vivenzio Pagliari пишет: However, these additionally added services are not started, when trying to reach multi-user.target. After boot, I can see that the dependencies where added correctly (e.g. doing "systemctl list-dependencies multi-user.target" lists the newly created

[systemd-devel] systemd-firstboot skip root password initialisation if /etc/shadow is present

2015-09-18 Thread Francis Moreau
Hi, I find odd that systemd-firstboot skips root password init if /etc/shadow exists because AFAICS this file is always part of a minimal rootfs after being setup by an installer. Indeed it's populated during package installation. So I can't see a case where systemd-firstboot would prompt for a

[systemd-devel] Modifying systemd dependency tree during boot

2015-09-18 Thread Vivenzio Pagliari
Hi, we face a problem with systemd when we attempt to dynamically add dependencies to units during bootup. In other words, we want to add services during boot (by means of some service that is run during boot) and via "systemctl daemon-reload" we want to notify systemd about this new units and

Re: [systemd-devel] Question related to cgroup and systemd

2015-09-18 Thread Lennart Poettering
On Fri, 18.09.15 14:45, Francis Moreau (francis.m...@gmail.com) wrote: > > # systemd-run --slice=my-deep-slice.slice -p MemoryLimit=3G /bin/sleep 9 > > > > It creates the specified slice, and places the new service in it, then > > adds the process in it and sets the memory.limit_in_bytes=