/srv/irclogs.ubuntu.com/2015/06/29/#ubuntu-devel.txt

pittiGood morning05:29
=== work_alkisg is now known as alkisg
Unit193pitti: 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
dholbachgood morning06: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
hallynpitti: mbiebl_: hi, around?16:53
mbiebl_I am16:53
hallynmbiebl_: 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
hallynin particular,16:54
hallynlxc-net.service is a type=oneshot which runs a script which starts a dnsmasq.16:54
hallynthat 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
hallynwell it sets up and configures a bridge16:55
hallyni didn't even consider making that a daemon, maybe it should...16:55
hallynhttps://github.com/hallyn/lxc/blob/testing/config/init/systemd/lxc-net.service.in  is the current job fwiw16:55
mbiebl_and how does it start the dnsmasq daemon?16:55
hallynand https://github.com/hallyn/lxc/blob/testing/config/init/common/lxc-net.in is the script16:56
mbiebl_hallyn: if it starts a daemon, it shouldn't be a oneshot type service16:56
hallynThe 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-authoritative16:56
hallynmbiebl_: lemme try that.  so it should be 'simple'?16:56
hallynor, 'forking'?  /me reads16:57
mbiebl_depends on what your daemon does16:57
hallynmbiebl_: so if i make it type=simple, and lxc starts After=lxc-net,16:57
hallynoh wait.  i've made it worse than you think.16:58
hallynso the dameon is started during the ExecStartPre16:58
mbiebl_type=simple has one downside16:58
hallynbecause it needs to complete before lxc, which is After=lxc-net, starts16:58
hallynuh, "completes"16:58
mbiebl_the service will be considered started as soon as the process has been spawned16:58
mbiebl_it doesn't wait for the service "to be up"16:58
hallynright16:58
hallynso 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 behaviour16:59
ubottuDebian 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 question17:01
hallyn1. wlil the daemon started during ExecStartPre get killed,17:01
hallyn2. will the service be deemed failed bc ther eis no ExecStart,17:01
hallyn3. will lxc then not start unitl the ExecStartPre script is complete17:02
mbiebl_ExecStartPre is not supposed to be used to start long running daemon17:02
hallynmaybe i'll just call the lxc-net start script from the 'lxc' execstartpre17:02
hallynthat seems to make more sense17:03
mbiebl_isn't that what you do today?17:03
mbiebl_ExecStartPre=@LIBEXECDIR@/lxc/lxc-net start17:03
mbiebl_that seems wrong to me17:03
mbiebl_ExecStartPre is to to setup your daemon environment17:03
mbiebl_the actual daemon should be started via ExecStart17:04
mbiebl_from the systemd.service man page17:04
mbiebl_           Note that ExecStartPre= may not be used to start long-running processes. All processes forked off by processes17: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 page17:06
mbiebl_hallyn: gotta run now17:06
hallynmbiebl_: thanks!17:07
hallynhm, that  still causes the dnsmasq to get killed17:11
hallynapparently ExecStartPre cannot start long-running daemons17:11
hallynhrmp.  "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!