/srv/irclogs.ubuntu.com/2013/10/18/#upstart.txt

ansuhey all :) I'm trying to run this command in an upstart script. Does anyone of you see whats wrong with it? "exec start-stop-daemon --start -c youtrack --exec /usr/bin/java -jar /usr/local/youtrack/youtrack.jar 10002"07:17
jodhxnox, stgraber: could you take a look at the o/s MPs when you get a chance?09:18
elmojodh: ' If a job is running, the changes to the definition will not occur until the job has been stopped; for instance jobs, all instances must be stopped. '12:45
elmojodh: what does 'instance job' mean there?12:45
elmojodh: and will 'initctl reload' override the above?12:45
elmojodh: never mind, the job I care about is an instance job12:47
elmojodh: or rather, ignore the first question; I'd love to know if 'initctl reload' enough to overide12:48
jodhelmo: 'initctl reload' simply sends the reload signal (SIGHUP by default) to the job. If you change a .conf file, Upstart gets notified immediately, but if a job is actually running, *it* won't get a new copy of the configuration unless you stop and then restart it.12:52
elmojodh: so, the issue is I have a ceph osd instance job12:52
elmojodh: and I *really* don't want to restart all 11 of them12:52
elmojodh: is there no way to get upstart to use the new ceph-osd.conf for any future restarts?12:53
elmo(short of stopping all 11)12:53
elmojodh: e.g could I use 'initctl reload ceph-osd' without risk of it stop/starting all the instances?12:57
Spadsjodh: I suspect there's some reload vs reload-configuration confusion propagated by http://upstart.ubuntu.com/faq.html#reload13:03
jodhelmo: yes, are you talking about reloading the upstart (.conf) config, or the ceph config (assuming there is one?)13:03
Spadsjust the upstart config13:04
Spadsbasically right now it's starting up the OSDs with incorrect command-line arguments calculated in the upstart conf itself13:04
Spadswe fixed that13:04
Spadsbut if someone bounces one of these, it'll come back with incorrect settings (to potentially disastrous results)13:05
Spadsand I'd expect that diagnosing that problem would be nigh impossible without the context we just got about how upstart caches the configuration just now13:06
jodhSpads: confused - I thought you said you fixed the issue and that the running instance(s) have the wrong arguments?13:06
jodhSpads: the whole point of upstart instances is that they are "templates" - every instance is "identical", atleast to upstart, apart from the value of the 'instance' variable(s).13:06
Spadsjodh: yes, that's what we're saying.  We fixed ceph-osd.conf, but when we restart an individual instance job it uses the bad information from the old broken conf13:06
Spadssure13:07
Spadshow do we make them all use the new version of the config without taking them all down together?13:07
jodhSpads: you need to stop, tehn start not "restart".13:07
Spadsyes, we stopped, slept for ten seconds, then started13:07
Spadsfor one instance job13:07
Spadsstop ceph-osd id=${id}; sleep 10; start ceph-osd id=${id}13:07
jodhright, but since there were presumably other instances still running, upstart will not give the newly started instance the *new* config since that would mean the newly started instance would/could be completely different from the running instances (bad).13:08
Spadsand that start caused it to start with the same broken arguments (which are not the ones in the conf on disk any more)13:08
Spadssure13:08
Spadshow do we tell upstart to switch to the new one while we do rolling restarts of the instance jobs?13:08
jodhstop all instances (which allows upstart to propagate the new config), then start the new instances.13:09
Spads13:09
Spadsis there not even a hacky way to force the issue here?13:10
jodhwe don't like hacks :) seriously, not that I can think of, sorry.13:12
SpadsHm, no way to (say) take an instance job down and start it up in a new instance group somehow?13:14
Spadssome kind of staging upstart job for these to live in for a time?13:14
* Spads is clutching at straws13:14
xnoxSpads: you can cheat!13:45
Spadsxnox: Tell me how.13:45
xnoxSpads: cp /etc/init/ceph-osd.conf /etc/init/seph-osd-transition.conf13:45
* Spads nods13:45
xnoxSpads: stop 5 instances of ceph-osd, and start 5 instances of ceph-osd-transition13:45
Spadsthat's what I was hoping would work.  have you done this?13:45
xnoxSpads: stop remaining 5 instances of ceph-osd, start 5 instances of ceph-osd (new config)13:46
xnoxSpads: stop & delete all ceph-osd-transition13:46
xnoxSpads: start ramaining 5 of ceph-osd.13:46
xnoxSpads: but you just need to make sure that the first 5 instance of ceph-osd-transition are operational and do cephy things that ceph-osd is suppose to do.13:46
* Spads nods13:48
jodhactually, that technique is in the cookbook (http://upstart.ubuntu.com/cookbook/#using-expect-with-script-sections), but maybe we should elevate it to its own section :)13:52
Spadsinteresting.14:00

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