/srv/irclogs.ubuntu.com/2018/09/16/#ubuntu-server.txt

fooIf I have something in /etc/init - I forget, is that systemd ?16:21
jellyfoo: /etc/init is for upstart, but if files merely exists that's not proof they're used and upstart is actually running16:26
foojelly: how can I be sure? This is a system that has been online for 5+ years. I believe upstart is older and systemd is newer?16:30
jellyfoo: which ubuntu release is this16:32
jellylsb_release -a16:33
JanCif it has been online for 5+ years, it's probably out of support...16:34
foojelly: Ubuntu 14.04.5 LTS16:35
fooJanC: not yet, I've been keeping an eye on that16:35
jellyfoo: that one used upstart.16:35
fooI mean, it's getting there, but... :)16:35
JanCwell, not 5+ years then16:35
foojelly: thank you16:35
fooJanC: I've still been upgrading over those 5 years. :)16:35
jellydpkg -S /sbin/init16:35
JanCor you upgraded it16:35
fooJanC: give a foo some credit! ;)16:36
foojelly: aha, thank you: upstart: /sbin/init16:36
fooso, if I was to do a fresh install of ubuntu lts today, that would not use upstart - right?16:36
jelly16.04 was the first LTS that switched over to systemd16:36
foogot it. I believe systemd can support deps, can upstart do that as well? eg. I have a handful of processes I either want to associate with 1 parent, or I want to have one of the children depend on the other children16:37
JanCupstart uses events to start/stop services based on what other services started/stopped16:39
JanCin addition to the manpages, http://upstart.ubuntu.com/cookbook/ is probably the best source for upstart knowledge16:39
fooJanC: perfect, I'll take a look there - thanks. I wrote some python code to manually do "service ___ start/stop" ... but recently was advised to do this all in my git-hook and take it out of python. Makes sense. Actually, if I do it in a git-hook, I guess I don't need to make the services depend on a parent to make it easy, I'll simply add a new service there16:40
fooin the git-hook16:41
* foo scratches head16:41
JanC"service" has the advantage of working with (almost) every init system, but you probably want to restart only one service, and have all dependent service restarted automatically too16:45
fooJanC: yup, that would certainty be helpful at this point in time. I assume that's in the cookbook, checking now16:50
foo6.33.2   Start depends on another service16:53
foostart on started other-service16:53
fooDoes that mean: A) the service won't start if the other one isn't running or B) the service will start and it'll automatically start the other-service ?16:53
JanCit means the service will be started after the other-service has started16:57
JanCso more or less A)16:57
fooAha, ok16:59
fooI don't think there is a way, with upstart at least, to say "if this service starts, start this other service too if it's not running" - correct?16:59
fooCan't seem to find that, anyway17:00
JanCyou'd define that in the configuration of other-service17:00
JanCor you can start it in pre-start script17:01
fooJanC: how would I define it in the other-service is what I don't seem to be able to find17:01
fooah, pre-start17:01
fooJanC: specifically, I'm looking at python long-running processes17:02
JanCin the configuration of other-service, you put "start on starting service" (where "service" is the first service)17:02
fooahh, so the child is told when to start, not a parent conf that says to start children17:03
fooJanC: thank you! that distinction makes sense, I think I'm following now17:03
fooJanC: now, I wonder if it makes sense to have A) dummy parent, that doesn't really do much, but several children start when parent starts or B) just pick a child and make other children start when it starts. Is there a best practice/preference here?17:04
fooWe basically have 1 piece of software that has 4 long running python processes associated with it (eg. services)17:04
JanCyou might want to look at the other services on the system to see how they depend on each other17:04
JanCif the 4 processes have no clear dependency on each other it might work to have some sort of meta-service indeed17:07
fooJanC: yeah, they don't have a clear dependency, which is why I'm leaning towards that... but I'm wondering, is there shorthand for making a meta-service?17:07
fooeg. I can create a bash script that does nothing but sleep every second... but I'm wondering if there is something less hack-ish17:07
JanCjust don't have an exec statement in it17:22
foooh, heh, easy enough17:26
fooI thought there was something, thank you Jan!17:26
JanCyou would have "start on starting meta-service" and "stop on stopping meta-service" in each of the "subservices", or something like that17:31
fooJanC: yup, that would do the trick. When I upgrade to the latest ubuntu early next year, I suspect I'll have to change this for systemd17:35

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!