unixpro1970is it possible to send a dbus event to upstart?  I am having issues with PID tracking ( the app forks more than twice )  My app generates a pid file so I wish to send a dus message to change the PID that upstarts has stored for my service.  However when I issued a dbus-send it mentioned the PID field is READ-ONLY for my upstart application.02:48
SpamapSunixpro1970: no, thats not really possible.03:13
SpamapSunixpro1970: why does your service fork twice to daemonize?03:13
unixpro1970It forks multiple times and I don't have controll over the amount of times it forks.  Someone else wrote it and I am not allowed to modify the functionality. :-(03:15
unixpro1970Due to this the PID tracking is off.03:15
SpamapSunixpro1970: yeah, you're out of luck. Use pre-start and post-stop to start/stop the daemon.03:16
SpamapSunixpro1970: oh, and write a nasty email to the author.03:16
unixpro1970Tried that without luck.03:16
unixpro1970The other possible solution I was thinking of developing, was creating a proxy program that will catch upstart signals and can foward them.03:17
unixpro1970basically creating my own signal handler to catch the upstart signals and forward them using the pid file.03:18
SpamapSunixpro1970: thats a waste of your time honestly03:18
SpamapSunixpro1970: you can use pid files with upstart. Just use pre-start and post-stop.03:18
unixpro1970how can I force upstart to associate the PID within the pidfile?03:19
unixpro1970I have seen the start-stop-daemon example but I don't see how that will fix the upstart pid tracking problem.03:20
unixpro1970exec start-stop-daemon --pidfile03:21
SpamapSunixpro1970: no don't use exec. In pre-start, start it the same way you would start it in a sysvinit, and in post-stop, the same way sysvinit would stop it03:24
SpamapSunixpro1970: if you already have a sysvinit script, you can just call that in those methods. This is only useful if you need to coordinate other services with this one.03:24
unixpro1970but it will still track the incorrect PID even without exec keyword03:25
unixpro1970remember it forks more than twice03:26
unixpro1970the application creates a pidfile that contains the correct pid which I can read.  Howeve can I force upstart to use it?03:27
unixpro1970In other words, overwrite the PID that upstart thinks it is using.03:27
drebolohi... I have some questions... I'm trying to create a user job in a ubuntu server but initctl is not seeing my jobs at $HOME/.init10:28
dreboloI'm using upstart 1.510:29
dreboloI try to do the same thing in my desktop also with upstart 1.5 and worked10:29
dreboloboth machines are Ubuntu 12.04.2 LTS10:32
drebolothe main difference is that the server doesn't have X installed10:32
dreboloany ideas ?10:35
drebolothis is just a test script: "task10:36
drebolo    sleep 510:36
dreboloend script10:36
dreboloinit-checkconf returns "syntax ok"10:37
xnoxdrebolo: user jobs are not enabled by default.13:22
xnoxdrebolo: and user jobs have been removed in the recent 1.7 upstart in raring.13:22
xnoxdrebolo: one needs to do a full login to initialise user session over dbus.13:23
xnoxdrebolo: there were tricks of doing it on the server but i can't quite remember how it was done.13:23
xnoxdrebolo: it is usually recommend to simply use setuid/setgid to change username/group.13:23
drebolohum... that's the problem....13:24
xnoxdrebolo: what are you trying to do? maybe there is another way to do it better =)13:24
dreboloI don't do a full login... I just do su - username from root13:24
dreboloI want to start a pinto server (https://metacpan.org/module/Pinto) from a specific user13:28
dreboloI tried to do it from root but it keeps failing when I do ". /some/bashrc", and  If I managed to do it for that user I would not need to do that...13:34
monkeynippleshow can i give a unprivileged user the ability to run a specific upstart job ?14:05
monkeynipplesto start/stop/restart it14:05
ionTake a look at sudoers(5)14:06
monkeynipplesion: something like sudo -u username /etc/init/job.conf ? 14:07
ionThe user won’t need -u username, it defaults to root. The user will use sudo start jobname.14:08
xnoxmonkeynipples: you can use policykit to grant users to work/do actions to specific jobs14:09
xnoxmonkeynipples: by adjusting /etc/dbus-1/system.d/Upstart.conf14:10
xnoxmonkeynipples: granting sudo might be a bit "haevy-weight" as granting sudo on "start" command will allow that user to start _any_ job.14:10
monkeynipplesmaybe just restart ? 14:11
monkeynipplesxnox: i'll look into policykit thanks14:11
monkeynippleshttp://askubuntu.com/questions/229809/allow-non-sudo-group-to-control-upstart-job is a good link for anyone else interested14:15
ionxnox: Of course you would limit the parameters to exactly the specific jobname and nothing else.14:16
monkeynipplesxnox: i tried adding https://gist.github.com/jarradh/1458fe6f105b561683f4 to /etc/dbus-1/system.d/Upstart.conf, rebooted server and tried to run it as testuser stop: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory14:31
xnoxhmm... not sure. jodh ^ do you know how to fiddle those settings?14:33
xnoxor maybe we can poke pitti about it?14:33
monkeynipplesI don't want to cause a fuss :S14:34
xnoxmonkeynipples: no fuss =) this stuff should just work™ and it doesn't seem like it's documented well enough in the cookbook.15:14
X-warriorif upstart is not tracking my PID correctly is it possible to set upstart to use a PID inside a file?16:52
ionPID files are horrible and unreliable.16:56
ionCan you make the process not daemonize?16:56
X-warriornot right now 17:13
X-warriorand the daemon/fork doesn't works17:14
Jeeves_I've got a mysqld that's not starting and an upstart that does not accept my explicit call to stop starting mysqld.18:30
Jeeves_Any hints?18:30
SpamapSJeeves_: what version of Ubuntu?20:32
SpamapSJeeves_: the mysql upstart job in 10.04 is quite tempermental.20:32
Jeeves_fixed it by chmod -x /usr/sbin/mysqld20:37
Jeeves_upstart lets me down 20:38
SpamapSJeeves_: erm..20:40
SpamapSJeeves_: there was nothing in /var/log/syslog, /var/log/upstart/mysql.log ?20:40
Jeeves_that mysql couldn't start21:03
Jeeves_and it would try to start it again21:03
SpamapSJeeves_: so, it told you the truth, and that is letting you down?21:04
SpamapSJeeves_: /usr/sbin/mysqld not being executable is *not* a normal situation.21:05
Jeeves_SpamapS: No, I told it to stop trying to start mysqld, which it refused to do21:08
Jeeves_'stop ' would just hang21:08
Jeeves_It's not Upstarts problem mysql doesn't start, it's Upstarts problem that it will not stops trying to start it, even though I ask for it21:09
Jeeves_And I know -x on mysqld is not normal. But was the only way to stop mysqld21:10
=== Md_ is now known as Md
SpamapSJeeves_: the stop not responding is also not normal21:24
SpamapSJeeves_: did you happen to see what 'status mysql' showed?21:24
Jeeves_Kinda lost that in my terminal..21:26
SpamapSJeeves_: so stop will wait 300 seconds for mysqld to respond to its SIGTERM21:27
SpamapSJeeves_: however if it was in respawn/post-start , it would be waiting for that section to exit presumably indefinitely.21:28
SpamapSJeeves_: I think at most, that would have been 30 seconds21:29
SpamapSJeeves_: what version of mysql-server-5.5 do you have installed btw?21:30
SpamapSJeeves_: one other possibility is that there is something on your system 'start on stopping mysql', that will cause stop to hang.21:33
Jeeves_the only thing in /etc/init/ mentioning mysql is mysql.conf21:37
SpamapSJeeves_: ok, its hard to debug this w/o knowing the status.. but likely was stuck in post-start21:51

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