pitti | Good morning | 05:29 |
---|---|---|
=== work_alkisg is now known as alkisg | ||
Unit193 | pitti: I have a wily hardware computer that uses this same kernel with kdbus, so I could do some testing there too if it'd help. | 06:32 |
dholbach | good morning | 06:40 |
=== marcusto_ is now known as marcustomlinson | ||
=== vrruiz_ is now known as rvr | ||
=== pete-woods1 is now known as pete-woods | ||
=== greyback is now known as greyback|doc | ||
=== alkisg is now known as work_alkisg | ||
=== MacSlow is now known as MacSlow|lunch | ||
=== greyback|doc is now known as greyback | ||
=== MacSlow|lunch is now known as MacSlow | ||
=== attente_ is now known as attente | ||
=== pgraner is now known as pgraner-dr | ||
=== _salem is now known as salem_ | ||
=== zyga_ is now known as zyga | ||
=== Malsasa_ is now known as Malsasa | ||
=== henrix_ is now known as henrix | ||
hallyn | pitti: mbiebl_: hi, around? | 16:53 |
mbiebl_ | I am | 16:53 |
hallyn | mbiebl_: cool! i wanted to ask if there is default behavior for systemd oneshot units where anything started by them is killed when the job is done? | 16:54 |
hallyn | in particular, | 16:54 |
hallyn | lxc-net.service is a type=oneshot which runs a script which starts a dnsmasq. | 16:54 |
hallyn | that dnsmasq seems to just be disappearing; but if i run the same command by hand as root it persists (as it should) | 16:54 |
mbiebl_ | why is it oneshot if it starts a daemon? | 16:55 |
hallyn | well it sets up and configures a bridge | 16:55 |
hallyn | i didn't even consider making that a daemon, maybe it should... | 16:55 |
hallyn | https://github.com/hallyn/lxc/blob/testing/config/init/systemd/lxc-net.service.in is the current job fwiw | 16:55 |
mbiebl_ | and how does it start the dnsmasq daemon? | 16:55 |
hallyn | and https://github.com/hallyn/lxc/blob/testing/config/init/common/lxc-net.in is the script | 16:56 |
mbiebl_ | hallyn: if it starts a daemon, it shouldn't be a oneshot type service | 16:56 |
hallyn | The dnsmsq command is: Kdnsmasq -u lxc-dnsmasq --strict-order --bind-interfaces --pid-file=/run/lxc/dnsmasq.pid --conf-file=/dev/null --listen-address 10.0.3.1 --dhcp-range 10.0.3.2,10.0.3.254 --dhcp-lease-max=253 --dhcp-no-override --except-interface=lo --interface=lxcbr0 --dhcp-leasefile=/var/lib/misc/dnsmasq.lxcbr0.leases --dhcp-authoritative | 16:56 |
hallyn | mbiebl_: lemme try that. so it should be 'simple'? | 16:56 |
hallyn | or, 'forking'? /me reads | 16:57 |
mbiebl_ | depends on what your daemon does | 16:57 |
hallyn | mbiebl_: so if i make it type=simple, and lxc starts After=lxc-net, | 16:57 |
hallyn | oh wait. i've made it worse than you think. | 16:58 |
hallyn | so the dameon is started during the ExecStartPre | 16:58 |
mbiebl_ | type=simple has one downside | 16:58 |
hallyn | because it needs to complete before lxc, which is After=lxc-net, starts | 16:58 |
hallyn | uh, "completes" | 16:58 |
mbiebl_ | the service will be considered started as soon as the process has been spawned | 16:58 |
mbiebl_ | it doesn't wait for the service "to be up" | 16:58 |
hallyn | right | 16:58 |
hallyn | so what does starting it in ExecStartPre do with respect to that? | 16:59 |
mbiebl_ | hallyn: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778913 has some more details on that behaviour | 16:59 |
ubottu | Debian bug 778913 in openssh-server "openssh-server: init (at least systemd) doesn't notice when sshd fails to start and reports success" [Important,Open] | 16:59 |
mbiebl_ | <hallyn> so what does starting it in ExecStartPre do with respect to that? → I don't quite understand that question | 17:01 |
hallyn | 1. wlil the daemon started during ExecStartPre get killed, | 17:01 |
hallyn | 2. will the service be deemed failed bc ther eis no ExecStart, | 17:01 |
hallyn | 3. will lxc then not start unitl the ExecStartPre script is complete | 17:02 |
mbiebl_ | ExecStartPre is not supposed to be used to start long running daemon | 17:02 |
hallyn | maybe i'll just call the lxc-net start script from the 'lxc' execstartpre | 17:02 |
hallyn | that seems to make more sense | 17:03 |
mbiebl_ | isn't that what you do today? | 17:03 |
mbiebl_ | ExecStartPre=@LIBEXECDIR@/lxc/lxc-net start | 17:03 |
mbiebl_ | that seems wrong to me | 17:03 |
mbiebl_ | ExecStartPre is to to setup your daemon environment | 17:03 |
mbiebl_ | the actual daemon should be started via ExecStart | 17:04 |
mbiebl_ | from the systemd.service man page | 17:04 |
mbiebl_ | Note that ExecStartPre= may not be used to start long-running processes. All processes forked off by processes | 17:04 |
mbiebl_ | invoked via ExecStartPre= will be killed before the next service process is run. | 17:04 |
mbiebl_ | hallyn: I suggest reading the systemd.service man page | 17:06 |
mbiebl_ | hallyn: gotta run now | 17:06 |
hallyn | mbiebl_: thanks! | 17:07 |
hallyn | hm, that still causes the dnsmasq to get killed | 17:11 |
hallyn | apparently ExecStartPre cannot start long-running daemons | 17:11 |
hallyn | hrmp. "Note that ExecStartPre= may not be used to start long-running processes. All processes forked off by processes invoked via ExecStartPre= will be killed before the next service process is run." | 17:12 |
=== pgraner-dr is now known as pgraner | ||
=== pgraner is now known as pgraner-dr | ||
=== salem_ is now known as _salem |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!