/srv/irclogs.ubuntu.com/2017/06/13/#upstart.txt

IOMonsterHello all! Quick question about pre-stop scripts - is there a way to tell Upstart to not restart an app if it closes while the pre-stop script is running?17:12
IOMonsteras part of my pre-stop script i have to send a kill signal to the process upstart is supervising, and upstart sees the application end and restarts it17:13
IOMonster(i'm using upstart 0.6.5, and trying to work around an issue where runuser only gives my application 2 seconds to clean up before it gets SIGKILL'd)17:14
IOMonsterso my pre-stop script sends a SIGTERM to the process upstart is supervising and waits for it to clean up17:14
=== JanC_ is now known as JanC
IOMonstery'know, nevermind. i just realized that i should be using "expect fork" so upstart doesn't track runuser's pid17:25
IOMonstersometimes, the simple solution is the one you don't think of until you've done something the hard way :)17:25
AnrDaemonIOMonster: I'm afraid it's a problem in your version.17:59
AnrDaemonIOMonster: Also, if it is at all possible, don't run your applications in forking mode under supervising init daemons.18:00
IOMonsterAnrDaemon: indeed, the application isn't actually forking18:11
IOMonsterthe script section does "exec runuser <blah>"18:11
AnrDaemonWTF18:11
AnrDaemonWHY?18:11
IOMonster<blah> doesn't fork, it runs exec java18:11
IOMonsterhm?18:12
AnrDaemonJust start daemon directly with upstart.18:12
IOMonsterunfortunately18:12
IOMonsteri need to run this as a user other than 'root'18:12
IOMonsterso, runuser is required18:12
AnrDaemonDO THAT WITH UPSTART18:12
AnrDaemonrunuser is useless.18:12
IOMonsterno need for all caps :)18:12
IOMonsterupstart 0.6.5 doesn't have user options18:12
AnrDaemonThen upgrade your shit already, it's well over six years.18:13
IOMonsterhttp://upstart.ubuntu.com/cookbook/#stanzas-by-category18:13
IOMonstersetgid is only 1.418:13
IOMonsterunfortunately i'm not in control of the init version my OS is using18:13
AnrDaemon$ init --version18:13
AnrDaemoninit (upstart 1.12.1)18:13
AnrDaemonAnd it's a 4 years old version.18:14
AnrDaemonThen use a different OS.18:14
IOMonsteryep, amazon linux is based off cent5, which is indeed ancient18:14
IOMonsterhowever18:14
AnrDaemonLOL18:14
IOMonsterit's what i've QA'd18:14
AnrDaemonGet a better hosting. Seriosuly.18:14
AnrDaemonIt's beyond stupid.18:14
IOMonsterchanging OS just because upstart is ancient in this version isn't an option18:14
IOMonsterthis isn't a hobby project18:15
AnrDaemonThe more stupid it sounds.18:15
IOMonsterhaha18:15
AnrDaemonIf you are unable to use nromal, quality software, this is just… not sane.18:15
IOMonsterthanks for your input18:15
IOMonsteri am using quality software, it's been QA'd by myself and amazon ec2 engineers18:16
IOMonsteri'm not going to re-QA a whole OS just because i can't use a specific option18:16
IOMonsterif this was my home box, sure, i'd switch to fedora or something more recent18:16
IOMonsterbut a full review of all configurations, applications, and even kernel modules would cost me time i don't have18:17
AnrDaemonYou know, what? Nobody is going to help you with extremely outdated, probably insecure versions of software.18:17
IOMonsterok, i'm trying to be nice here, but seriously why are you so aggressive?18:17
IOMonsteri asked a question, answered it myself and wasn't rude18:18

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