asdaf | Hi all | 15:53 |
---|---|---|
asdaf | I was wondering if there is any way in upstart to reload a job description from file | 15:54 |
Keybuk | yes | 16:02 |
Keybuk | just change the file | 16:02 |
Keybuk | Upstart will automatically reload it | 16:02 |
Keybuk | if the job is running, you will need to stop it - let it stop, and then start it again | 16:02 |
asdaf | ok, this works if inotify works, but I have a read-only filesystem and would like to use links for some job files placed in a writable location | 16:11 |
asdaf | so if I change the target file of the symlink, inotify is not aware of it | 16:12 |
Keybuk | right | 16:12 |
asdaf | do you think it would be possible to add an event to force reload, something like 'initctl emit reload myjob' | 16:14 |
asdaf | ? | 16:14 |
Keybuk | it'll be present in trunk | 16:15 |
Keybuk | everything necessary to do it is there | 16:16 |
Keybuk | probably just a general "reload" command though to reload all jobs | 16:16 |
asdaf | great! | 16:16 |
jdong | Keybuk: can Upstart start Upstart? ;-) | 16:22 |
Keybuk | jdong: yes | 16:22 |
Keybuk | jdong: kill -TERM 1 | 16:24 |
* jdong doesn't dare figure out what that actually does :D | 16:24 | |
Keybuk | it makes upstart re-exec itself | 16:25 |
jdong | cool | 16:25 |
Keybuk | you have to get the running upstart to do it so that the new copy still has pid 1 | 16:25 |
Keybuk | upstart --replace isn't possible | 16:25 |
jdong | ah | 16:26 |
brendan_ | Keybuk: is that job reloading something that was recently fixed? | 18:29 |
brendan_ | in 0.3.8 it doesn't seem to ever reload the job description | 18:30 |
brendan_ | at least, in my environment | 18:30 |
Keybuk | it should | 18:31 |
Keybuk | 0.3.8 is largely the same as 0.3.9 | 18:31 |
brendan_ | oh, is it using inotify to see that the file changed? | 19:30 |
brendan_ | that could be my problem, since the /etc filesystem is on nfs and i don't change the files on the host running upstart | 19:31 |
Keybuk | it does use inotify, yes | 19:52 |
tannewt | are upstart init scripts shutdown and started up upon suspend and resume? | 21:00 |
tannewt | in ubuntu? | 21:01 |
mbiebl | tannewt: no | 21:23 |
tannewt | mbiebl: so I should not write them as upstart init files but legacy init? | 21:24 |
mbiebl | tannewt: why should they? suspend/resume != start/shutdown | 21:24 |
tannewt | mbiebl: true, but my daemon needs to be restarted on resume | 21:25 |
mbiebl | tannewt: hook that up with pm-utils | 21:25 |
tannewt | mbiebl: hmm, okay, I was looking in /etc/acpi/{suspend,resume}.d. are those scripts different than regular init? | 21:26 |
mbiebl | yes | 21:27 |
tannewt | ok, so I'd write inits for that and upstart for startup/shutdown? | 21:28 |
mbiebl | they serve a different purpose | 21:28 |
mbiebl | You could set up pm-utils to emit shutdown / resume events | 21:28 |
mbiebl | Then your upstart job can react on this. | 21:29 |
mbiebl | Or, if your daemon is started via a legacy sysv init script, create a hook for pm-utils and use the restartservice method. | 21:29 |
tannewt | mbiebl: oh, all right, sweet that sounds good, thanks | 21:30 |
=== keesj is now known as k-way |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!