=== jamescarr_ is now known as jamescarr
=== jamescarr_ is now known as jamescarr
=== muh-die-1uh is now known as muh-die-kuh
Screwbaxnox: You around?12:42
xnoxScrewba: yeap =) what's up?12:43
Screwbaxnox: you helped me the other day and stated "You mostly likely want your job to start at network-interface IFACE!=lo and before runlevel job is executed."  Would my `start on` statement look like "start on started network-interface IFACE!=lo and starting rc RUNLEVEL=[2345]"12:44
xnoxScrewba: looks right.12:44
Screwbaxnox: cool...going to give it a test by just having a script which polls for the IP and pauses for 2 mins writing the IP and timing to a /tmp/mytest.log file12:45
Screwbaxnox: I should not have to `emit` anything correct?12:46
xnoxScrewba: nope.12:47
Screwbaxnox: just write my screwbas_event.conf file in the /etc/init folder with a script section calling my /usr/local/bin/screwbas_script12:47
Screwbaxnox:  YOU ROCK !!!  If this works for me, then YOU RULE !!!12:48
Screwbaxnox: it is not working for me...   =(13:21
xnoxincrease debugging and see what events are emitted.13:22
xnoxjodh: is "starting rc" ever emitted?13:22
jodhxnox: yes13:22
xnoxScrewba: boot with --debug kernel arg and see what happens - e.g. order of the events.13:24
Screwbaxnox:  this is my /etc/init/mytesttask.conf file  http://pastebin.com/MW8657ew  maybe something wrong there in my script section?13:24
Screwbaxnox:  will try the --debug option now13:25
jodhScrewba: that should be "start on net-device-up IFACE !=lo" or "start on started network-interface INTERFACE != lo".13:25
Screwbajodh: thanks, I will change my conf in a min and test again...   =)13:31
Screwbajodh: sorry, should it be both or one or the other?13:31
jodhScrewba: you should use "start on started network-interface INTERFACE!=lo and starting rc RUNLEVEL=[2345]"13:35
Screwbajodh:  testing now13:37
Screwbaxnox:  I added the --debug option to Grub but it does not seem like I am getting any debug info...I made the change permanent by editing /etc/default/grub and I also removed the quiet and splash options13:38
xnox... and run update-grub ?13:41
Screwbaxnox:  LoL...sorry, brain fart this morning13:42
Screwbarebooting now...13:42
Screwbajodh: that sort of worked, I have a 1 minute pause in my /usr/local/bin/testsjy.sh script, but it appears that the script only hits about 40 secs then maybe UpStart is killing it?13:42
Screwbajodh/xnox:  testing again now...13:42
Screwbajodh/xnox:  only ran for about 35 seconds this time13:45
Screwbajodh/xnox:  New paste  http://pastebin.com/9V7G4B7E13:53
Screwbaupdated with my testsjy.sh script and the updated .conf file13:53
jodhScrewba: you need to get debug enabled. --debug gives a firehose of debug output that will get redirected by rsyslog depending on your config.13:54
jodhScrewba: take a look at /var/log/upstart/$your_job.log too13:54
Screwbajodh:  --debug enabled, powering off machine and rebooting in a min13:58
Screwbajodh:  there is only a .1.gz file in /var/log/upstart/mytesttask.conf and that is an old version, seems like it is not logging there13:58
Screwbaback in a bit13:58
jodhScrewba: your script isn't producing output then13:58
Screwbajodh: it is only echo'ing to my /tmp/testjsy.log file, not sure if that would be output13:59
Screwbajodh: or if I need to modify it so UpStart sees something else13:59
linuxnewbiei'm having some trouble with an ts3 upstart script http://pastebin.com/ijFBrZnL ...it starts the server but it gives me wrong PID ..and status ts3 shows me ts3 stop/waiting14:32
linuxnewbieif anyone have an idea what I do wrong please answer :)14:32
Screwbajodh / xnox: I added a line to my script which just echo's to the console, it would appear that my script is running fully now but it does not seem to 'hold/pause' the boot sequence for the 1 minute that the script should run...does the `sleep` command work in the UpStart {script/end script} section?15:10
Screwbajodh / xnox: I am now getting a log file in /var/log/upstart/mytesttask.log15:11
Screwbaxnox: it is not 'stopping' the boot sequence until my script finishes, I have now confirmed that.  My script continues to run even after logging in.  I used initctl2dot and created a graph, my script is definately dependant on network-interface and rc.15:59
Screwbaxnox / jodh: is it possible to totally pause the boot up between network-interface and rc until my script totally finishes?16:00
jodhScrewba: if you look at upstart-events(7), you'll see that to do that you'd need to specify "start on starting network-interface ...". The 'starting' event blocks, whereas the 'started' event does not.16:24
Screwbajodh:  ahhhhhhhh...so my start on should look like:  start on starting network-interface INTERFACE!=lo16:25
Screwbajodh:  or the full string `start on starting network-interface INTERFACE!=lo and starting rc RUNLEVEL=[2345]`16:27
jodhScrewba: the latter I think (although I don't have the full context of what you're trying to do).16:28
Screwbajodh:  or possibly just the `start on starting network-interface` and from there, I poll to wait for an actual IP address to be assigned to the NIC, then do my work and exit 016:28
Screwbajodh:  I have a configuration script which I want to run on first boot up of an Ubuntu machine.  The script will mount a floppy and read information from files on there, then rename the host, join it to an Active Directory domain and configure a few other things on the system.  With CentOS/Red Hat it is easy because they are still using SysV init, with Ubuntu and Debian, it is harder since UpStart is the boot init16:30
jodhScrewba: sounds like you want to use cloud-init. That solves your problem in a generic manner: https://launchpad.net/cloud-init16:31
Screwbajodh:  xnox suggested I look at cloud-init but that is something else that I would have to teach to 'others' who may be using this.  I would really like to just get it done via UpStart natively since it is there by default and everything in my configuration script uses default/built-in utilities16:32
jodhScrewba: cloud-init runs on centos too fwiw.16:32
xnoxScrewba: you still didn't tell us what you want to do. And upstart spend a lot of work speeding up the boot and parallelising. Not inserting 1 minute sleeps blocking everyone =)16:33
Screwbajodh:  hmmmmmmm...I could not find any really good configuration scripts which would show the host rename and some other things.  I looked at the site but the docs seem to be lacking16:33
jodhScrewba: maybe ping smoser then?16:34
Screwbaxnox / jodh :  Thanks a lot, I will tackle the cloud-init side of things and report back.   =)16:35
Screwbajodh:  I will try that as well16:35
xnoxScrewba: do note that e.g. cloud-init runs in parallel, such that there is login prompt but cloud-init may still be running remaining parts of configuration (e.g. upgrading packages) but the generic stuff is done by that time (e.g. networking configuration & setting hostname)16:36
jodhScrewba: also note that cloud-init runs earlier. it specifies 'start on mounted MOUNTPOINT=/' (note that mounted also blocks - see upstart-events(7) again).16:37
Screwbathanks guys16:39
Screwbathe biggest thing with my script is joining the AD Domain, that usually takes 2 - 5 mins using the `net ads join` command16:39
ScrewbaI really need this done before the GUI login is shown16:40
xnoxScrewba: echo "start on started my-ad-task" >> /etc/init/lightdm.override16:41
xnoxScrewba: lightdm will not come up, until my-ad-task is finished & thus no-one will be able to login.16:42
Screwbaxnox:  but does that mean I need another task (/etc/init/my-ad-task.conf) created first?16:43
xnoxScrewba: yes, that would be where you run your scripts to do AD stuff.16:43
Screwbaxnox:  is there a rc.override as well?16:43
xnoxScrewba: you can .override any  .conf file16:44
Screwbaxnox:  you see what I am getting at...   ;-)16:44
Screwbaxnox:  excellent...will give it a go16:44
xnoxScrewba: and it overlays config. It's documented in man pages & the cookbook......16:44
Screwbathanks again guys for your information and especially your PATIENCE with me...   =)16:44
Screwbathanks again16:44
Screwbaall:  what does `instance $JOB` do?  I see it but when I try to use it, I get an error when I do a `status myjob`20:52
Screwbahow does the script get the $JOB variable populated?  is it internal to UpStart?20:55
=== jamescarr_ is now known as jamescarr

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