/srv/irclogs.ubuntu.com/2010/07/14/#upstart.txt

luke-jrhow can I get upstart to log all output to a file?04:02
dude__I'm searching for a way to disable upstart jobs via a command, is this possible?09:00
frederickjhAnyone know a method to run a upstart job as another user and still have it run with an exec command in the .conf file?14:45
frederickjhWhen ever I try to pass the username to run it as it then gets interpreted by the shell and then running  status <jobname> tells me it is not running, but ps -C <jobname> shows it is running.14:48
JanCfrederickjh: what do you use to run it as a certain user?18:10
JanCand the difference between status & ps is probably because you need another 'expect' stanza in the job file18:11
frederickjhJanC I am using sudo -u username command to run the job.18:43
frederickjhWhat is a 'expect' stanza?  Where do I find more info about it, JanC?18:44
frederickjhI have not come across that command in any of the upstart docs/info I have found.18:44
JanCit's in the manual page18:45
JanCinit(5) manpage18:46
frederickjhok18:46
frederickjhI will check it out.18:46
JanCso, run 'man 5 init'18:46
frederickjhwhy the 5?18:46
frederickjhwhy not man init ?18:46
JanCbecause there are manpages for init in more than 1 category18:48
frederickjhI see it brings up a different man page.18:48
JanCsee 'man man' for more info about these categories18:48
frederickjhok18:48
frederickjhthansk18:48
frederickjhthanks!18:48
JanCe.g. 5 is for file format description 18:49
frederickjhok18:49
frederickjhok I am using expect fork now that I reread my job maybe in need expect daemon as that is what the processes are.18:51
JanCfrederickjh: if you look at the default 'man init', you'll see init(8) at the top right, meaning that one is in section 8, and at the bottom it lists init(5) in the SEE ALSO list18:51
frederickjhok18:52
JanCmight be useful for other programs in the future  ☺18:52
frederickjhyes18:55
frederickjhone other question.  Right now I am specifying the username in the command but I would like to some how pass it to the command without a variable.18:56
frederickjhAs, when I use a variable it get interpreted by the shell and the status never shows it running, but maybe the expect daemon will fix that.18:57
Kasukowhat does "stop on runlevel" mean in a job? My upstart isn't running rc-sysinit properly and as such anything depending on runlevel or any old style sysvinit scripts aren't executed.18:57
Kasukoruning Ubuntu 10.0419:00
JanC"stop on runlevel 5" will stop a job when the "runlevel 5" event is emitted (by telinit, normally)19:02
KasukoI know but what is "stop on runlevel" with no number19:03
JanCI don't think that's supposed to make sense19:04
Kasuko"stop on runlevel" is in my rc-sysinit.conf job19:05
JanCright19:06
Kasukoso thats not the problem?19:06
JanCno19:06
KasukoDang!19:07
KasukoThought I was close19:07
Kasukoanyway to debug what upstart has done? initctl list doesnt return anything19:07
ionIt stops the job on any runlevel event.19:08
Kasukoso basically when it's done it's job stop. Makes sense. But I am never getting the telinit 2 that should be running (or if I am it's not being registered)19:09
ionhttps://bugs.launchpad.net/ubuntu/+source/upstart/+bug/543506 perhaps19:10
Kasukosorta Looks similar but they are all getting output from initctl list where I get nothing19:15
ionHuh. That’s strange.19:17
ionWhat does, say, ‘status rc’ output?19:17
Kasukomediapc-desktop.root ~: initctl list19:18
Kasukomediapc-desktop.root ~: status rc19:18
Kasukomediapc-desktop.root ~: return 119:18
Kasukomediapc-desktop.root ~:                                                       119:18
Kasukoif you see there is a 1 to the right of the last line, thats the error code. I am getting no output AND no error codes19:19
ionecho foo; >&2 echo bar19:21
Kasukomediapc-desktop.root ~: echo foo; >&2 echo bar                                119:25
Kasukofoo19:25
Kasukobar19:25
KasukoShould I be posting a bug report?19:31
ionPlease run ‘strace -o strace.initctl status rc’ first and share strace.initctl via a pastebin or equivalent.19:33
KasukoI dont need pastebin, nothing is returned19:38
ionstrace.initctl is empty?19:40
Kasukoah my bad, it's output to a file, my apologies19:44
Keybukcompare "status rc" as a user and as root?19:49
KasukoSorry for delay, something came up. http://pastebin.com/UTuYdNYg20:28
Kasukomediapc-desktop.root ~: status rc20:29
Kasukomediapc-desktop.root ~: exit20:29
Kasukomediapc-desktop.kasuko ~: status rc20:29
Kasukomediapc-desktop.kasuko ~:20:29
Kasukono difference20:29
Kasukoanything? 20:54
Keybukno idea, your strace makes it look like an empty executable21:23
ionkasuko: What distro are you running?21:24
Kasukoanything? ubuntu 10q.0421:26
Kasukooops sorry about thee repeat21:26
Keybukstatus --help ?21:27
ionPlease pastebin the output of apt-cache policy upstart; md5sum /sbin/initctl; grep sbin/initctl /var/lib/dpkg/info/upstart.md5sums21:29
Kasukostatus --help displays the standard help output21:32
Kasukohttp://pastebin.com/4TKeWN6X21:34
Kasukothey aren't the same21:34
Kasukobut I have tried apt-get install --reinstall upstart earlier today21:37
ionls -l /sbin/initctl; file /sbin/initctl; dpkg-divert --list '*initctl*'21:37
Kasukolrwxrwxrwx 1 root root 9 2010-05-12 21:34 /sbin/initctl -> /bin/true21:38
Kasuko/sbin/initctl: symbolic link to `/bin/true'21:38
Kasukolocal diversion of /sbin/initctl to /sbin/initctl.distrib21:38
Kasukoare you kidding me?21:38
Kasukowtf21:39
Kasukoya running initctl.distrib list gives me the proper output21:40
Kasukoso why would that happen?21:41
ionGood question21:42
ionkeybuk: I take it upstart maintscripts have never done any diversions in the past?21:43
Keybuknope21:45
Keybukpeople do it in chroots21:45
Keybukfor fun, profit, and to take over the world21:45
KasukoThis isn't a chroot though, nor am I in it for profits or taking over the world ... but that would be nice21:48
ionkasuko: I take it you’re the only one with root access to the box? :-)21:49
KasukoYes21:49
KasukoWhy, should I be worried?21:49
Kasukomaybe I'm not the only one with root access anymore :S21:50
Keybukseems an odd thing to do21:50
KasukoThere are no erroneus users and I never changed the root password from randomly generated21:52
ionI’m out of ideas for now.21:52
KasukoI'm just more curious if I should be reporting it as a bug somewhere or if it was a one time thing21:53
Keybukdebootstrap does it, but it usually undoes it21:53
Keybukbug where?  until you know what made the diversion, nowhere to file the bug21:53
Keybukunless we can file "something strange is afoot" bugs on the universe?21:53
Keybukfor example21:53
Keybuk<fx: best police officer's voice>21:53
KeybukWhat were you doing on, or around, the 12th of May at approximately 9.34 pee emm ?21:54
KasukoTrue, well I just linked initctl to initctl.distrib but that just solves the list. Now I am going to try the work around from that bug report21:54
ionThe proper way to remove the diversion is dpkg-divert --rename --remove /sbin/initctl21:57
ionRunning the two commands listed in https://wiki.ubuntu.com/LucidLynx/ReleaseNotes#Upstart%20jobs%20cannot%20be%20run%20in%20a%20chroot would result precisely in what your system has. How that has ended up happening is unclear.22:01
luke-jrhow can I get upstart to log all output to a file?22:08
Keybukit logs to syslog by default22:09
luke-jrthere is no syslog on this machine22:10
Keybukin that case, it logs to the console22:10
luke-jrI know that. It scrolls by too fast to read.22:10
luke-jrthat's why I need it in a file22:10
Keybukso install syslog22:13
Keybukor something that captures the console output22:13
luke-jrI've found it basically impossible to capture console output since Upstart reopens /dev/console22:15
luke-jrrather than using the stdin/out it inherits from pre-init22:15
Keybuksure you can22:16
Keybuke.g. bootlogd22:16
luke-jrany idea where i can get bootlogd? :/22:18
KasukoI can confrim that the work around in 543506 fixed the other issue. Thank you22:21
luke-jrfound one, but bootlogd seems to require CONFIG_LEGACY_PTY, which I cannot provide it... (or can I?)22:23

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