#upstart 2006-10-30
<Cale> Hi, how do I get upstart to display what it is doing as it does it, during bootup and shutdown? I'd just like to be made aware of what's actually happening as it goes on.
<Cale> The little progress bar is cute, but it's not really all that informative.
<Cale> (I'm using Edgy)
<_ion> less /var/log/boot
<Cale> yeah, how do I get that printed as the machine is actually booting?
<_ion> Probably by adding 'console output' to /etc/event.d files that contain 'exec /etc/init.d/rc...'
<jc-denton> hi all
<jc-denton> i have the strange problem that / is sometimes suddenly mounted read only
<jc-denton> and i cannout mount it rw with -o remount
<jc-denton> also / is uncommented in /etc/fstab
<jc-denton> why?
<johnnybuoy> why is commented?
<Keybuk> commented?
<jc-denton> yes
<jc-denton> http://rafb.net/paste/results/9TtK1412.html
<Keybuk> I don't understand?
<jc-denton> # /dev/hda1 UUID=2232ef2d-5684-429b-8618-d31a881e55ab /               ext3    defaults,errors=remount-ro 0       1
<jc-denton> it's commented out
<Keybuk> you've edited the file and pressed "j" on that line, then saved it
<Keybuk> (in vi)
<jc-denton> no
<Keybuk> or edited it in some other editor, and joined the two lines, however you did that
<jc-denton> i did a fresh install of edgy
<jc-denton> and did nothing with /etc/fstab until i got trouble
<Keybuk> "until you got into trouble" ?
<jc-denton> however i installed it when rc2 was out
<jc-denton> it was suddenly mounted read only
<Keybuk> so you edited /etc/fstab
<Keybuk> and broke it
<jc-denton> the lin break is just there because i copied that thing
<jc-denton> look i also checked it out on some other edgy installtion
<Keybuk> all I'm hearing here is "it was working fine until I broke it"
<Keybuk> if the edgy system booted the first time, then the file must have been correct on first installation
<Keybuk> (and, btw, this has nothing to do with upstart)
<jc-denton> ok
<jc-denton> so is /etc/fstab generated by something
<jc-denton> or can i simply edit it by hand
<jc-denton> and also what is this UUID?
<Keybuk> generated by the installer, but then edited by hand
<Keybuk> the UUID is the UUID of the filesystem you want to mount
<Keybuk> you can get it with "vol_id", e.g. "vol_id /dev/hda1"
<jc-denton> Keybuk: thx so far..
<jc-denton> humm
<jc-denton> but mount doesn't get these UUIDs
<jc-denton> so what does edgy use to mount it
<Keybuk> mount
<jc-denton> if i remove the # at the beginning
<jc-denton> and type mount -a
<Keybuk> then you'll get an invalid /etc/fstab
<jc-denton> yes
<jc-denton> so it cannot be mounted by mount
<Keybuk> # /dev/hda1
<Keybuk> UUID=2232ef2d-5684-429b-8618-d31a881e55ab  /  ext3  defaults,errors=remount-ro  0  1
<jc-denton> maybe i need to ask different
<Keybuk> # /dev/hda2
<jc-denton> what reads these lines?
<Keybuk> UUID=ab2da10b-b58d-4f52-9291-2c39391e9996  none  swap  sw  0  0
<Keybuk> is what that should look like
<Keybuk> jc-denton: mount.
<Keybuk> the problem isn't that there's a "#" before "/dev/hda1"
<Keybuk> the problem is that you've joined that line ("# /dev/hda1" with the line that should appear below it "UUID=..../...ext3..." etc.)
<jc-denton> now i'm completely confused
<Keybuk> evidently
<jc-denton> http://rafb.net/paste/results/9TtK1412.html
<jc-denton> so the line for /dev/hda2 is correct
<wasabi_> Am I the only one who doesn't really like UUIDs?
<jc-denton> but the one for /dev/hda1 not
<Keybuk> jc-denton: the TWO LINES for /dev/hda2 are correct
<Keybuk> wasabi_: what would you prefer?
<jc-denton> ok
<Keybuk> jc-denton: the fact there's only one line for /dev/hda1 is what's wrong
<wasabi_> Keybuk: Unfortunatly I have no answer to that. Probably static device names. ;0
<jc-denton> but
<Keybuk> jc-denton: tip: make it look like the /dev/hda2 TWO LINES
<Keybuk> wasabi_: device names aren't static
<jc-denton> that's not how the syntax for /etc/fstab is defined
<Keybuk> jc-denton: yes it is
<wasabi_> Why shouldn't they be though?
<wasabi_> My problem with UUIDs is they ignore some odd corner cases.
<wasabi_> Such as md1 vols.
<Keybuk> wasabi_: because part of the name is a number, which implies enumeration of devices, which implies a fixed device set
<_ion> wasabi: If we want everything to just work with static device names, the device names must contain some kind of a UUID. :-)
<wasabi_> but they don't just ignore it in a way as to make it not work, it continues to work, wrong.
<Keybuk> wasabi_: hmm?  md volumes contain an equivalent to a UUID or LABEL which can be used to mount them
<wasabi_> Sure... I guess my main complaint is that the UUIDs come from the FS itself.
<wasabi_> Which may actually have multiple paths to reach it.
<Keybuk> wasabi_: multiple paths is irrelevant, multiple views is the problem there
<jc-denton> hrmm
<wasabi_> Sure? You've got the underlying md device... which is mountable!
<wasabi_> But you should never mount it.
<jc-denton> UUID=asdfasdf is a device or what
<Keybuk> wasabi: what decides that one md is 0 and the other is 1 ?
<jc-denton> and what i would like to know
<jc-denton> is this documented somewhere
<wasabi_> Keybuk: Hmm?
<Keybuk> jc-denton: yes
<Keybuk> jc-denton: yes
<Keybuk> wasabi_: well, if you're going to rely on something which is md0 and something which is md1
<Keybuk> wasabi_: what decides which is 0 and which is 1? :)
<wasabi_> Well, either way, it's a problem. When edgy switched to UUIDs, I couldn't boot. With my weird ass md + lvm + evms setup. :0
<Keybuk> wasabi_: we mucked up md/lvm/evms because the developer who's supposed to care about that is a lazy idiot
<Keybuk> ;)
<wasabi_> Keybuk: I'd name the md device statically based on the ID of the *md device*
<wasabi_> not of the FS on it.
<Keybuk> wasabi_: right, where's that ID stored?
<wasabi_> In the MD metadata hopefully.
<jc-denton> Keybuk: i did man fstab
<wasabi_> Which is unviewbale unless the md vol is composed.
<Keybuk> wasabi_: so that should be picked up, and placed in /dev/disk/by-id ?
<jc-denton> and there  is still the page from 2004
<jc-denton> Keybuk: where?
<Keybuk> jc-denton: yes... fstab has supposed mounting by UUID or LABEL for a long time
<_ion> wasabi: If you're using LVM, why use UUIDs instead of /dev/vgname-lvname? They already have a unique, static identifier.
<wasabi_> Maybe I'm mis understanding something. Where *does* the uuid come from?
<Keybuk> wasabi_: make sure you're subscribed to the udev-* specs for MTV :p
<wasabi_> _ion: Mostly because it forced me too. ;)
<Keybuk> wasabi_: the filesystem/device/block device/container/whatever's appropriate
<wasabi_> I have subscribed.
<wasabi_> Hmm.
<wasabi_> I guess that's maybe my core question.
<wasabi_> In my case, where does the uuid come from.
<wasabi_> The FS, the container, etc?
<Keybuk> wasabi_: right now, errrr
<Keybuk> ls -l /dev/disk/by-id
<Keybuk> sorry
<wasabi_> At some point in the past it came from the FS, because I had two, that conflicted.
<Keybuk> ls -l /dev/disk/by-uuid
<wasabi_> And it mounted the wrong one.
<wasabi_> Looking in /dev/disk/bu-uuid looks right now.
<wasabi_> only one pointer to md1, no pointers to it's underlying devices.
<Keybuk> you had two, identical, Universally UNIQUE Ids? :p
<wasabi_> Yes. Two paths to the same file system.
<wasabi_> It's was a MIRROR
<Keybuk> right
<wasabi_> MD metadata is at the end.
<wasabi_> The underlying devices are still usable.
<Keybuk> so the MD itself should have an ID different to any of its exposed filesystems
<Keybuk> e.g.
<Keybuk> MD = abcdef, composed of two disks
<jc-denton> Keybuk: ok
<Keybuk> hda1 = 123456
<Keybuk> hda2 = 123456
<jc-denton> but this is the first time i see that
<Keybuk> you'd mount root=UUID=abcdef
<wasabi_> In the past, it wasn't like that.
<jc-denton> is that linux only?
<Keybuk> jc-denton: yes
<wasabi_> Keybuk: In the past, I had UUID=12345, which was valid for 3 different devices... /dev/sda3, /dev/sdb3, and /dev/md0
<Keybuk> unless, of course, there's a way to tell by just looking at hda1 that it's part of an MD
<wasabi_> And I guess the link was whatever the last one detected was. ;)
<Keybuk> (without having yet composed the MD)
<wasabi_> Or first one?
<wasabi_> Also, I use XFS, which does have it's own UUID.
<wasabi_> Maybe it decided to use that.
<Keybuk> this is precisely what we need to discuss at MTV, and understand how it fits together
<wasabi_> It looks fine now though. ;)
<Keybuk> and then make sure it works
<wasabi_> Yeah.
<jc-denton> ok i think i got it
<jc-denton> thanks so far for the infos
<jc-denton> but it should be mentioned somewhere
<jc-denton> does edgy has release notes or so
<Keybuk> jc-denton: it is mentioned, in many places
<wasabi_> It made no UUIDs to my evms devices at all though
<jc-denton> but i could not find it
<wasabi_> But it did overwrite fstab to use uuids.
<Keybuk> wasabi_: yeah, we don't migrate MD, EVMS, LVM, etc. because we took the safety approach
<Keybuk> jc-denton: it's in the man page for fstab!
<wasabi_> Heh. You did migrate them. ;)
<Keybuk> wasabi_: at first, yes
<wasabi_> "oops"
<Keybuk> then we decided that it was a bad idea given we didn't understand them
<jc-denton> ah ok
<jc-denton> :)
<wasabi_> Well, to be clear, I don't mind UUIDs in the sense that I believe using a universally unique id is the right approach.
<wasabi_> I just know I was burned a few times during the migration.
<Keybuk> sure
<wasabi_> Shit. I'm a MS guy. I'm used to GUIDs all over the place.
<jc-denton> This  will  make  the  system  more robust: adding or removing a SCSI disk changes the disk device name but not the filesystem volume label.
<Keybuk> that's cause we don't understand LVM, EVMS, MD, etc.
<jc-denton> ah ok
<wasabi_> Can't wait to talk about em. :0
<Keybuk> we have specs to understand them, write it down, and then fix it :p
<jc-denton> so that ensures that another disk is not mounted on a specified mount point
<wasabi_> I do some crazy shit with md/lvm/evms. I'd love to see that crazy shit supportable.
<Keybuk> jc-denton: and, more pointedly, it makes your system robust against installing (for example) another controller card
<Keybuk> it should be
<Keybuk> from what I understand, we basically just need to make sure
<Keybuk> a) uevents are generated
<Keybuk> b) which uevents mean we need to run certain tools
<Keybuk> c) how to obtain a unique identifier for the fs/container/device/wibble
<_ion> jc-denton: Also, in (maybe not so) distant future, the kernel may switch to the libata PATA implementation. Then hd* will change to sd*.
<Keybuk> _ion: RSN
<Keybuk> I believe it was merged into 2.6.19
<_ion> Ok, cool.
<_ion> The edgy kernel already uses libata for PATA disks connected to my SATA+PATA controller.
<wasabi_> I guess the trick is figuring out which information from which devices to seed a uuid with.
<wasabi_> For a md device, it should be the md metadata of the composed vol.
<wasabi_> evms, it should be the evms metadata of the composed volume.
<wasabi_> etc etc
<wasabi_> Which is interesting because you can't actually obtain the MD metadata by looking at the md device itself.
<hunger> Keybuk: Things get interesting with encrypted devices I think.
<hunger> Keybuk: block device comes up -> need to check whether it contains files for loopback -> those turn into new block devs -> get mapped to yet another blockdev -> that needs to get mounted.
<Keybuk> this is easy :)
<Keybuk> it's a nice logical sequence of events
<wasabi_> Keybuk: I have some questions about UMV. Curious how this plays out. These specs are driving out schedules and stuff right?
<wasabi_> What do we all just end up in a room at a certain time sitting around a table?
<wasabi_> And then the guy who registered the specs speaks up or something?
#upstart 2006-10-31
<yani> hi
<yani> does anyone know why 6.10 seems to be stuck while booting?
<yani> has a very high boot time
<yani> any ideas?
<yani> ?
<rgl> hello
#upstart 2006-11-01
<rgl> hello
<rgl> anyone running upstart on a linux-vserver guest?  I can't get it to run at all :/
<Keybuk> what does it do?
<rgl> I really dunno, but it seems it doesnt do anything, it just sits there wating for something :|
<rgl> I also tried to use the --versbose switch, but it doesn't output anyting at all
<rgl> err verbose
<rgl> also, it doesn't quit unless I send it the KILL signal
<Keybuk> have you got anything in /etc/event.d ?
<Keybuk> does --debug reveal any insights?
<rgl> humm the --debug switch doesn't show up in the init --help
<rgl> lemme try it :D
<rgl> humm nope, no output.  I have to say, that there us no /dev/console in the guest
<rgl> s,us,is
<Keybuk> the lack of /dev/console will be why :)
<Keybuk> do you have anything in /etc/event.d in the guest?
<rgl> Keybuk, http://paste.linux-vserver.org/607
<Keybuk> could you add /dev/console to the guest (and /dev/null)
<Keybuk> and try then?
<rgl> I'll have to see how to do it heheh  gimme a sec :D
<Keybuk> mknod .../dev/console c 5 1
<rgl> its not that simple.
<rgl> oh its seems there is no way to have it inside a guest :(
<Keybuk> ?!
<rgl> you known linux-vserver.org?
<rgl> I maean, do you use it :D
<Keybuk> I don't know it, no
<Keybuk> is that the one that doesn't start init as process #1 ?
<rgl> it does
<rgl> is there a way to make upstart write in a file instead?
<Keybuk> if you don't mind changing the code ... sure
<Keybuk> main() in init/main.c ... comment out this bit:
<Keybuk>         for (i = 0; i < 3; i++)
<Keybuk>                 close (i);
<Keybuk>         process_setup_console (NULL, CONSOLE_OUTPUT);
<Keybuk>         if (! restart)
<Keybuk>                 reset_console ();
<rgl> lemme see if I can build it :D
<Keybuk> (that code's probably bogus anyway, we should let the kernel assign our stdin/out/err
<Keybuk> but there's a bug in the ubuntu initramfs ;p)
<rgl> this is not using initramfs at all
<rgl> its just running /sbin/init in a different namespace
<Keybuk> yes, I mean the reason that code is there is because our initramfs assumed that init re-opened /dev/console (sysvinit also does) -- I plan to fix *that*, so upstart just uses whatever it's given
<rgl> sorry, but how do _I build a ubuntu package in place?  will debian/rules binary do the trick?
<Keybuk> debian/rules build
<Keybuk> fakeroot debian/rules binary
<Keybuk> or just dpkg-buildpackage -rfakeroot
<rgl> You?  oh are you the upstream developer? :))
<Keybuk> of upstart, yes
<rgl> cool, nice to meet you :)
<phsdv> Hi, a short question, can I currently (upstart 0.3.0) define a function within the 'script' 'end script' block?
<_ion> It's a sh script.
<Keybuk> phsdv: sure, you can only use it within that block though
<phsdv> ok, thanks, than my problem lies somewhere else.
<Keybuk> phsdv: careful not to use bashisms, /bin/sh may not be bash :)
<phsdv> my first script (start on startup) terminates with code 1
<phsdv> my bin/sh is a links to bash
<phsdv> s/links/link
<Keybuk> sladen: so rgl is having some problems getting upstart to run inside a vserver
<Keybuk> debugging is made harder by the lack of /dev/console in there ...
<Keybuk> I remember a bug that "kill 1" doesn't work in a vserver guest ... is init assigned PID 1 ?
<sladen> rgl: IIRC, vserver calls  /etc/init.d/rc  directly, unless you specify 'fakeinit' in which case vserver calls /sbin/init instead
<rgl> sladen, but it can directlly call init :)
<rgl> sladen, and that way I can use all the nice features of upstart :D
<sladen> Keybuk: PID 1 (other pids aren't) is virtualised inside a context so that, the init process always /appears/ as pid 1
<Keybuk> sladen: if it calls getpid() does it get 1?
<sladen> Keybuk: should do; but.  that might be good to check
<rgl> you guys known which packages provides the strings command?
<Keybuk> binutils
<sladen> Bertl (current vserver maintainer) appears to be asleep
<sladen> Keybuk: does upstart query its own pid?
<sladen> Keybuk: and be speffial if it isn't?
<Keybuk> sladen: yes
<Keybuk> if getpid() != 1, then it execs /sbin/telinit instead
<rgl> Keybuk, still no luck, no output :(
<rgl> oh, I just commented to code you pasted here, but maybe I should open up a file instead
<sladen> rgl: can you try compiling http://www.paul.sladen.org/ubuntu/tmp/getpid.c and saving as /sbin/init ?
<rgl> sladen, it is 1 ;)
<rgl> sladen, I've already tried that
<sladen> rgl: and the parent pid?
<rgl> oh that I dunno :|
<rgl> I'll run that getpid then :)
<rgl> sladen, its this:
<rgl> argv[0] : "/sbin/init"
<rgl> getpid(): 1
<rgl> getppid(): 8081
<rgl> everytime I run it, the ppid is different
<sladen> Keybuk: you don't check the parent pid aswell do you?
<sladen> Keybuk: seems that /isn't/ virtualised
<Keybuk> no
<Keybuk> no reason to check that
<Keybuk> I assume that the parent id of everything else shows up as 1?
<Keybuk> and that vserver doesn't break the "init gets SIGCHLD for everything" semantics?
<rgl> Keybuk, sladen: I've added some printfs and it seems to run till nih_main_loop (), now I don't known what happens inside of it
<sladen> Keybuk: does sysvinit also reply on getting SIGCHLD for everything?
<rgl> can't get it to work, I've change it to write stdout/stderr to a file, but upstart never writes anything to stdout :(
<sladen> Keybuk: ^^what crack are you doing with file i/o ?
<sladen> rgl: I don't have a recent vserver box setup, if can you give me SSH access to a machine I can have a quick look at it
<rgl> sladen, I can give you access to a vmware instance that I have here, gimme 10 mins or so to set it up
<sladen> rgl: yup that would work
<Keybuk> sladen: "with file i/o" ?  how do you mean?
<sladen> Keybuk: "I've change it to write stdout/stderr to a file, but upstart never writes anything to stdout"
<sladen> rgl: stdout is probably buffered btw
<rgl> sladen, humm, my printf work fine, because stdout only seems to be line buffered
<rgl> sladen, oh, this is taking some time to setup, cause this instance didnt have build-essential installed :(
<sladen> rgl: there isn't a hurry, don't worry
<sladen> setvbuf(...) should get you a non-buffered stdout
<sladen> or you can call flush() lots of times
<Keybuk> sladen: it uses syslog() and openlog(LOG_CONS) for most output
<Keybuk> is it possible that's busted? :)
<sladen> rgl: just check to see if the syslog output is turning up in the root server...
<rgl> sladen, it can't communicate with root server syslog
<rgl> sladen, oh well, I'm having trouble getting to the ssh port from inet to this vmware :((
<sladen> rgl: syslog is a syscall, did you check...?
<sladen> thought I'm not entirely sure what goes via libc and what via the kernel
<rgl> sladen, on the guest there are no new messages
<rgl> err on the host
<rgl> or root server
* sladen grrrghs when the top google results are his own from 2003
<sladen> my http://www.paul.sladen.org/vserver/fix0r.txt list says "fix: We need to write a fake `console' driver that can pipe to a file.
<sladen> for that other issue
<Keybuk> sladen: how much effort do you put into supporting unix datagram sockets, credential parsing, etc.?
<Keybuk> I assume you mangle the credentials to reflect the vserver fake pid 1?
<Keybuk> and does each vserver guest have an independent copy of the unix abstract namespace?
<Keybuk> (as every upstart instance would try to bind to \0/com/ubuntu/upstart
<sladen> Keybuk: pretty much all of that stuff was virtualised by a few years back;  since namespaces came in they got used to
<Keybuk> ok
<sladen> ppid of init not being virtualised to be '1' aswell surprisedme
<sladen> but all of these things could do with double checking
<sladen>  /etc/init.d/rc: line 165: /dev/console: No such file or directory
<sladen> so that's actually rc
<Keybuk> I don't think it's unreasonable for anything to assume that /dev/console exists
<rgl> sladen, Herbert (aka Bertl) is on #vserver ;)
<sladen> Keybuk: it doesn't in this case :-P
<sladen> Keybuk: one reason the Unix kernel succeeded was by simiplfying the internal design, such that syscalls were *allowed* to fail
<sladen> Keybuk: userspace should not assume anything.  Be Liberal in what you accept and Conversative in what you (the program) assumes.
<sladen> Keybuk: you're also trying to make a backwards compatible sysvinit replacement, if it's not, that's a bug
<Keybuk> from your own notes, sysvinit also assumes /dev/console exists
<Keybuk> so upstart is behaving the same as sysvinit in this case :)
<Keybuk> and it's not true that upstart is intended to be a drop-in sysvinit replacement
<Keybuk> for example, it doesn't listen on /dev/initctl
<Keybuk> it's intended to be compatible from a user tools and application stand-point, so that you don't need to re-teach your fingers, or fix apache
<Keybuk> but that is done by replacing those parts with new ones, not by talking to the old ones
<rgl> sladen, did you manage to find anything wrong with it?
<sladen> rgl: sorry, I got waylaid with other stuff
<rgl> sladen, ah ok.  will'll have some time today to see it?
<sladen> rgl: "/etc/vservers/edgy/apps/init/cmd.start" no such file?
<rgl> sladen, that appear after executing what command?
<concept10> does upstart use the same debian type run-levels?
<rgl> sladen, ping :D
#upstart 2006-11-02
<sladen> rgl: yup
* IRCD=dancer CAPAB CHANTYPES=# EXCEPTS INVEX CHANMODES=bdeIq,k,lfJD,cgijLmnPQrRstz CHANLIMIT=#:20 PREFIX=(ov)@+ MAXLIST=bdeI:50 MODES=4 STATUSMSG=@ KNOCK NICKLEN=16 :are supported by this server 
* SAFELIST CASEMAPPING=ascii CHANNELLEN=30 TOPICLEN=450 KICKLEN=450 KEYLEN=23 USERLEN=10 HOSTLEN=63 SILENCE=50  are supported by this server
* #ubuntu-laptop  You can't join that many channels
-NickServ(NickServ@services.)- This nickname is owned by someone else
-NickServ(NickServ@services.)- If this is your nickname, type /msg NickServ IDENTIFY <password>
-ChanServ(ChanServ@services.)- [#ubuntu]  Welcome to #ubuntu! Please read the channel topic and consider spending some time on the FAQ mentioned there
* Signon time  :    Thu Oct 26 06:50:17 2006
* Signoff time :    Thu Nov  2 15:25:13 2006
* Total uptime :    7d  9h 34m 56s
* Starting logfile irclogs/upstart.log
-ChanServ(ChanServ@services.)- [#ubuntu-server]  Ubuntu Server Discussions (development and support)
-ChanServ(ChanServ@services.)- [#ubuntu]  Welcome to #ubuntu! Please read the channel topic and consider spending some time on the FAQ mentioned there
<Keybuk> it's a replacement, not a clone ;)
<Keybuk> there wouldn't be much point cloning it, no?
<AlexExtreme> exactly
<AlexExtreme> but i think he's got the wrong idea because the rc*.d folders and symlinks in there still exist in edgy
<AlexExtreme> i've explained to him that there isn't a replacement set of jobs yet :)
<Keybuk> right, we just replaced the stuff that was in inittab directly
<Keybuk> it doesn't make sense to *not* be backwards compatible with /etc/rc*.d
<Keybuk> we need to support that for most software to work without modification
<Keybuk> otherwise on day #1, we need to write upstart jobs for everything
<Keybuk> by supporting it, we can write upstart jobs one at a time (until they are all done)
<AlexExtreme> of course, because there are programs such as vmware which provide init scripts and stick 'em in rc*.d
<AlexExtreme> there will always be a need to support rc*.d, until upstart because a "standard"
<_ion> Well, unless they're packaged for the distribution.
<AlexExtreme> *becomes
<AlexExtreme> yes
<_ion> Which they should be, instead of allowing stuff just to throw stuff all around the filesystem.
<AlexExtreme> frugalware has a program called repoman, which allows there to be build scripts in the source repo, but the packages aren't in the package repository. the user can build these packages with repoman. that gets around license issues and such, yet making sure that it doesn't break stuff
<AlexExtreme> bbl, food
<rgl> hello
<AlexExtreme> hi rgl
#upstart 2006-11-03
<twb> Hi, I'm trying to create modified livecd images of Edgy.  Is policy-rc.d supported by upstart?
<twb> Hmm, /usr/share/doc/sysv-rc/README.policy-rc.d.gz is still there, so I guess it does.
<twb> Yep, avahi-daemon fails to remove itself because it's violating policy.
#upstart 2006-11-04
<spitfireaus_> Hi, I'm having trouble finding a list of implemented events for upstart on edgy.
<spitfireaus_> Has network edge events been implemented?
[bmonty(n=bmontgom@ubuntu/member/bmonty)]  help
<DarkWizzard> hello all
<DarkWizzard> I really need help
<DarkWizzard> I just sudo apt-get ed upstart
<DarkWizzard> donno why
<DarkWizzard> maybe because I was stupid
<DarkWizzard> and now after reboot
<DarkWizzard> nothing will start
<AlexExtreme> which distro?
<DarkWizzard> it says the system has reached a point where there are no jobs running
<DarkWizzard> Kubuntu Edgy
<DarkWizzard> and asks for the root password
<AlexExtreme> ok
<AlexExtreme> wait a sec
<DarkWizzard> ok
<AlexExtreme> do you have a livecd?
<AlexExtreme> like, the kubuntu desktop cd
<DarkWizzard> yes
<AlexExtreme> boot it up, mount your kubuntu partition, sudo cp /etc/resolv.conf <mountpoint>/etc/ , chroot to it (sudo chroot <mount point> /bin/bash) and do this:
<AlexExtreme> sudo apt-get install startup-tasks system-services upstart-compat-sysv upstart-logd
<AlexExtreme> then exit and reboot
<AlexExtreme> then your system should boot again
<DarkWizzard> ok I'll try
<DarkWizzard> I think I jumped in this too fast
<DarkWizzard> is upstart in development status ?
<DarkWizzard> or is it usable ?
<AlexExtreme> yes it's usable, in fact it should be default if you're using edgy
<DarkWizzard> strange
<DarkWizzard> I upgraded from dapper
<DarkWizzard> but it didn't install it
<_ion> Did you not use the update-manager's distribution upgrade feature?
<AlexExtreme> that's probably it
<_ion> Using apt-get dist-upgrade causes problems.
<DarkWizzard> well I noticed
<DarkWizzard> but on the release site those were the commands
<DarkWizzard> ok
<DarkWizzard> thanks guys I hope I can get it working if not I'll be back
<_ion> sudo apt-get install ubuntu-minimal ubuntu-standard
<_ion> That makes sure you have all the things you should have for a working Ubuntu system.
<AlexExtreme> he's using kubuntu
<_ion> alexextreme: Yes.
<AlexExtreme> so that'll be kubuntu-minimal kubuntu-standard
<AlexExtreme> or not?
<DarkWizzard> I think I only got the minimal
<DarkWizzard> I'm under windows right now
<DarkWizzard> I'll boot it up
<DarkWizzard> the live cd that is
<DarkWizzard> ok
<AlexExtreme> ok, do what both of us said (run _ion's command after you chroot)
<DarkWizzard> thanks
<DarkWizzard> ok
<_ion> You don't need the live CD to boot the system and install packages.
<_ion> Sigh.
<AlexExtreme> meh, it's easier than pratting around bringing up the system (he only got a sulogin prompt) to the state where you can install stuff
<_ion> Well, it's only 2 commands.
<AlexExtreme> is it? hmm.
<AlexExtreme> then feel free to slap me ;)
<_ion> /etc/init.d/rcS && /etc/init.d/rc 2
<AlexExtreme> that's a very good point
<DarkWizzard> you guys rule!
<DarkWizzard> this is amazing
<DarkWizzard> works
<DarkWizzard> thank you very much
<_ion> You would have been able to start the system without the live CD, though.
<DarkWizzard> how ?
<_ion> In the sulogin prompt, /etc/init.d/rcS && /etc/init.d/rc 2
<DarkWizzard> I'll remember that one
<_ion> Or if you are unable to get to the sulogin prompt, boot with init=/bin/bash and then run that.
<DarkWizzard> I've been using linux for a while and it never fails to amaze me
<DarkWizzard> this is so fast
<DarkWizzard> thanks again
<DarkWizzard> bye
#upstart 2006-11-05
<_ion> ^X^C? He must surely mean :q
<kung> hi
<kung> I just noticed, that my distro uses upstart instead of sysvinit
<kung> nevertheless I'd like to run some of my old scripts...is there a way just to place them somewhere or do I have to rewrite them?
<AlexExtreme> which distro?
<AlexExtreme> Ubuntu?
<kung> yea, edgy
<kung> kubuntu actually
<AlexExtreme> well, currently edgy will just run the existing sysvinit scripts, so you won't need to do anything to them
<AlexExtreme> at least, until feisty is released.
<kung> okay..then it must be another problem, why my scripts are no more executed..;)
<kung> they worked for dapper, though.
<kung> thx anyways
<kung> :)
<AlexExtreme> incorrect permissions, maybe?
<AlexExtreme> what runlevel are they in? /etc/rc2.d?
<kung> /etc/rc3.d
<coNP> kung: do you ever switch to runlevel 3?
<AlexExtreme> add them to rc2.d
<AlexExtreme> then it should work
<kung> hmm okay, it worked there in dapper...
<kung> well and in hoary...
<kung> ;)
<kung> I'll move then to rc2..
<kung> maybe I changed something to the runlevels back then..dunno
<DarkWizzard> hello all
<DarkWizzard> need help
<DarkWizzard> I can't start my system
<DarkWizzard> I'm under windows right now
<DarkWizzard> it says rcS killed by signal 11
<DarkWizzard> and rc-default killed by signal 11
<DarkWizzard> thats all
<_ion> It's segmentation fault.
<DarkWizzard> before that suddenly it started segfaulting
<_ion> Faulty RAM? Overclocked, overheating system?
<DarkWizzard> I went to recovery mode
<DarkWizzard> dont think so
<DarkWizzard> windows works fine
<DarkWizzard> Kubuntu edgy
<DarkWizzard> this is strange
<DarkWizzard> edgy is getting stranger by time
<_ion> The first thing i'd run when programs start to segfault randomly is memtest86. You have it already installed, just select it from the grub menu.
<DarkWizzard> ok
<DarkWizzard> what does it do ?
<_ion> It tests the RAM.
<DarkWizzard> thats logical
<DarkWizzard> ok I'll run it and come back
<DarkWizzard> brb
<DarkWizzard> back
<DarkWizzard> my RAM is ok
<DarkWizzard> I'm from a live cd
<DarkWizzard> right now
<DarkWizzard> I have no ideea what is causing that problem
<DarkWizzard> maybe a reinstall of my init scripts would do the job
<_ion> It completed all the tests in... 19 minutes?
<DarkWizzard> not all
<DarkWizzard> but I dont have that time
<DarkWizzard> besides the live cd boots
<thom> 19 minutes is useless for memtest in general
<DarkWizzard> its not a hardware problem
<DarkWizzard> I'm sure of that
<DarkWizzard> E: Sub-process /usr/sbin/dpkg-preconfigure --apt || true received a segmentation fault.
<DarkWizzard> I chrooted to the installed system
<_ion> You could run debsums from the Live-CD to check for corrupted libraries.
<DarkWizzard> how ?
<DarkWizzard> I'm thinking about a clean install but first I have to revive my system and save the data
<DarkWizzard> to bad this live cd can't write to ntfs partitions
<DarkWizzard> *too
<johnnybuoy> ntfs is proprietary
<johnnybuoy> ...
<DarkWizzard> what do you mean ?
<johnnybuoy> too bad you use ntfs...
<DarkWizzard> well yeah
<johnnybuoy> well, you can't write in a language you don't know, can you..
<DarkWizzard> its from the windows times
<DarkWizzard> ntfs is writable
<DarkWizzard> with ntfs-3g
<_ion> Copy etc/apt/sources.list from your HDD to /etc/apt on the Live-CD, apt-get update, apt-get install debsums, debsums -s -r /your_hdd_mountpoint
<_ion> (Any of those shouldn't be run inside the chroot)
<johnnybuoy> DarkWizzard<> what is ntfs-3g?
<DarkWizzard> a nice little program to handle ntfs filesystems under linux
<_ion> johnnybuoy: apt-cache show
<DarkWizzard> it makes them writable
<johnnybuoy> hmm
<johnnybuoy> not bad...
<johnnybuoy> (gentoo here...)
<_ion> I guess you can install ntfs-3g in a Live-CD session as well.
<Keybuk> DarkWizzard: if dpkg is also segfaulting, I'd say you have either a corrupted libc, dynamic link loader, or hardware problem, e.g hard drive or RAM
<_ion> ...And corrupted libraries are likely caused by such a hardware problem. :-)
<cortana> DarkWizzard: if i were you i'd install debsums and check the integrity of as much as you can
<cortana> could be tricky on the dodgy system in question tho
<cortana> doh!
<_ion> Well, if he was able to start a Live-CD session and a Windows session, running debsums might not be a problem.
<DarkWIzzard> back
<DarkWIzzard> LiveCD gone wild
<DarkWizzard> so I need to install debsums
<DarkWizzard> man I had a hell of a day
<DarkWizzard> and now this
<_ion> Please define "gone wild".
<DarkWizzard> well it stopped spinning
<DarkWizzard> its an old rewritable cd
<DarkWizzard> and the system was doing to much
<DarkWizzard> and nothing responded
<DarkWizzard> so I just rebooted manually
<DarkWizzard> sorry I dont have logs on the live cd
<DarkWizzard> how do I use debsums ?
<_ion> Copy etc/apt/sources.list from your HDD to /etc/apt in the Live-CD session, apt-get update, apt-get install debsums, debsums -s -r /your_hdd_mountpoint
<DarkWizzard> ok
<DarkWizzard> in progress
<_ion> Run all of that outside any chroot.
<DarkWizzard> ok
<DarkWizzard> so it searches for corrupted libraryes ?
<_ion> Well, yes.
<DarkWizzard> I always liked kubuntu
<DarkWizzard> but this release caused far to many problems
<DarkWizzard> the upgrade was hell
<DarkWizzard> tomorow I'm going to do a fresh install
<DarkWizzard> debsums has a lot of output
<DarkWizzard> debsums: checksum mismatch coreutils file /media/hda3/bin/mv
<DarkWizzard> and a big list of it
<DarkWizzard> but I know whats causing it
<DarkWizzard> I had problem with coreutils
<DarkWizzard> back in dapper
<DarkWizzard> mkdir suddenly segfaultedd
<DarkWizzard> and stty and sleep
<DarkWizzard> so I built it from source
<DarkWizzard> and after that it worked
<_ion> Seems like you've had a hardware problem for a long time, and it's causing more and more visible problems.
<DarkWizzard> I have the strangest problems
<DarkWizzard> hmmm
<DarkWizzard> well this was long ago
<DarkWizzard> after that everything worked fine
<DarkWizzard> my pc isn't the best one
<_ion> (Btw, *never* just install stuff all around the filesystem without the package manager knowing about it.)
<DarkWizzard> how can I tell the package manager that I installed something from source ?
<DarkWizzard> debsums: no md5sums for initscripts
<_ion> Well, for starters, instead of installing coreutils from source you should have identified the faulty piece of hardware and replaced it, and reinstalled the coreutils binary package.
<DarkWizzard> how do you explain that after installing from source it worked
<DarkWizzard> if I have faulty hardware ?
<_ion> It's not like faulty hardware corrupts every single file a program write to the hard disk.
<_ion> writes
<DarkWizzard> We'll see if I keep on getting segfaults after a clean install
<DarkWizzard> I just need to somehow install ntfs-3g on the live cd
<_ion> Perhaps not immediately, but the system will keep getting more and more unstable, until it's unusable again.
<DarkWizzard> well this is strange
<_ion> Install smartmontools, run smartctl -a /dev/hda, watch for errors. Perhaps run a long self-test (smartctl -t long /dev/hda, wait, smartctl -a /dev/hda). Leave memtest running overnight.
<DarkWizzard> what does smartctl do ?/
<_ion> (SMART isn't guaranteed to find a fault even if your HDD, the ATA controller or the cable has one, but it might.)
<_ion> apt-cache show smartmontools
<DarkWizzard> but how could I temporary revive my system  ?
<DarkWizzard> does debsums repair anything or only search ?
<_ion> You might get a temporarily working system by reinstalling packages that debsums complains about.
<thom> it just tells you what doesn't match
<DarkWizzard> well
<DarkWizzard> I cant reinstall from chroot
<DarkWizzard> you must have guessed why
<DarkWizzard> dpkg segfaults
<_ion> Outside chroot: dpkg --root /mountpoint -i package.deb
<thom> if dpkg segfaults you _definitely_ have flaky hardware
<_ion> Begin by reinstalling libc6
<DarkWizzard> ok
<DarkWizzard> I just need to get some sleep
<DarkWizzard> thanks for your help
<DarkWizzard> good night all (even if its daytime there)
<_ion> I'd like to emphasize again: you really need to replace the faulty piece of hardware. Otherwise you'll be running to the same  perhaps bigger  problems again and again.
<DarkWizzard> ok I'll replace it if I'll have the buget
<DarkWizzard> you know :)
<_ion> You've had the problem since the first segfaults you got from the coreutils programs.
<DarkWizzard> thats the biggest problem
<DarkWizzard> maybe the os was buggy
<DarkWizzard> windows never complained about hardware
<_ion> Sigh.
<DarkWizzard> and I spend much time under it
<DarkWizzard> ok ok I understand
<DarkWizzard> thanks for your help
<DarkWizzard> bye all
<_ion> At least leave memtest running overnight.
<theCore> I think I found a bug/annoyance in upstart
<theCore> if you login in GDM really fast
<theCore> HAL doesn't have the time to start, therefore GNOME complains that HAL isn't initialized
<Keybuk> that's not a bug in upstart
<_ion> That doesn't have to do anything to do... keybuk was faster. :-)
<Keybuk> that's just a bug in the ubuntu init script ordering
<_ion> s/to do/with/
<_ion> Argh, wrong again. :-)
<theCore> ah, that's right
<theCore> I always forget
<Md> Keybuk: I need help with #397002
<theCore> ok, then I fill that for Ubuntu package
<Keybuk> Md: that's kinda interesting ... you check for /dev/console ?
<Keybuk> uh, I mean assume stdin==/dev/console
<Keybuk> RUNLEVEL and PREVLEVEL will be set
<Md> warn_if_interactive() {
<Md>   if [ "$RUNLEVEL" = "S" -a "$PREVLEVEL" = "N" ] ; then
<Md>     return
<Md>   fi
<Md>   TTY=$(my_tty)
<Md>   if [ -z "$TTY" -o "$TTY" = "/dev/console" ] ; then
<Md>     return
<Md>   fi
<Md> where my_tty is just like tty(1)
<Keybuk> ahh, that TTY thing will break, yes
<Keybuk> it's arguably a bug in the Debian upstart-compat-sysv
<Keybuk> they should have "console owner" in there for Debian, as Debian lacks Ubuntu's "no boot messages" policy
<Keybuk> the RUNLEVEL and PREVLEVEL checks should work
<Keybuk> oh, hmm, bet they don't
<Keybuk> /etc/event.d/rcS doesn't set RUNLEVEL or PREVLEVEL, because rcS doesn't use them
<Md> the submitter says that they do not
<Keybuk> again, but in upstart-compat-sysv
<Keybuk> s/but/bug/
<Md> ok, I will reassign the bug and add this chat to the thread
<Keybuk> *ndos*
<Keybuk> *nods* even
<theCore> I think it is too easy blame upstart, for bugs in the initscript package. It seems people really like to find bug in new software :)
<Keybuk> I had a bug once blaming upstart for their fonts looking funny
<_ion> Hehe.
<theCore> their fonts?
<theCore> whoa, that's going far ...
<Md> theCore: people blame udev for everything, maybe next year we will have another scapegoat...
<theCore> ah, gotta love the clueless newbie
<Keybuk> Md: people stopped blaming udev in ubuntu
<Keybuk> it works too well
<theCore> personally, I never used a Linux system without udev, so I can't judge it
<Md> it works well in debian too, they just to pretend they know how it works better than I do...
<theCore> even the LFS I built had udev
<theCore> so, does dbus support is still planned in upstart?
<Keybuk> yes
<Keybuk> either a dbus proxy, or use dbus for upstart's own IPC
#upstart 2007-10-29
<ion_> keybuk: Inspired by libnih macros: http://heh.fi/tmp/mygl-macros.h
<ion_> Iâm in love with git, btw. The way you can switch between branches in a single directory is just brilliant.
<ion_> And itâs noticeably faster than bzr, too.
<sontek> hey, how is upstart "event" based?  I'm trying to find information on it =)
<sontek> is it something like dbus throws "launching banshee" and you can handle that?
<ion_> udev triggers a âpartition foundâ event, upstart catches it and mounts it if fstab says so. Apache is set to run on networking. Upstart receives an ânetwork interface foundâ event, ups the interface, triggers a ânetwork-upâ event, apache gets started.
<sontek> ion_: thanks
#upstart 2007-10-30
<Keybuk> it's bad when you read an entire e-mail, and are completely baffled as to what's actually being said, isn't it?
<Jc2k> if its in the same language, yes
<Keybuk> it is
<Keybuk> I think
<Jc2k> unless its about brain surgery and your a coder?
<Jc2k> that too is an exception
<Keybuk> it's the reply to the Upstart Roadmap
<Jc2k> ooooh
<Jc2k> time for coffee or sleep then :)
<Keybuk> I really honestly can't actually understand what he's saying
<Jc2k> mail to upstart-devel?
 * Jc2k rewords
<Jc2k> can i see it if i look at upstart-devel archive?
 * Jc2k chuckles at Keybuk's footer. for the 8th time :)
<Jc2k> Keybuk: from rob ubuntu linux?
<Keybuk> heh
<Keybuk> yeah that one
 * Jc2k nods and is baffled too
<Jc2k> my eyes glossed over before i got half way
<Keybuk> heh
<Keybuk> mine did too
<Keybuk> and I *wrote* Upstart
<Jc2k> :)
<Jc2k> he seems to be praising/bashing/validating/questioning all at the same time
#upstart 2007-10-31
<Arafangion> Hey, how do I send all processes the SIGTERM and SIGKILL signals?
<Arafangion> I do not have killall5 on this machine.
<Keybuk> you need killall
<Arafangion> Keybuk: How do I do it with killall?
<Keybuk> "killall"
<Keybuk> or, if it's a Linuxish thing
<Keybuk> killall -1
<Keybuk> kill -TERM -1 will do it too
<Arafangion> What does the -1 do? It does not appear in the man page.
<Keybuk> all processes
<Arafangion> Cool. I wonder why it's undocumented.
<Keybuk> it isn't
<Keybuk>  A PID of -1 is
<Keybuk>        special; it indicates all processes except the kill process itself  and
<Keybuk>        init.
<Keybuk> EXAMPLES
<Keybuk>        kill -9 -1
<Keybuk>               Kill all processes you can kill.
<Arafangion> Ahh, cool.
<Arafangion> killall -1 doesn't seem to work. :(
<Arafangion> bash-3.2$ killall -1
<Arafangion> Usage: killall [OPTION]... [--] NAME...
<Keybuk> depends on your killall variant
<Arafangion> This is a pure upstart system.
<Arafangion> This is from psmisc.
<Keybuk> upstart doesn't have a killall yet
<Arafangion> Hmm, so how else would I do this?
<Keybuk> do what?
<Arafangion> kill everything. :)
<Keybuk> copy killall in from sysvinit
<Keybuk> killall5 sorry
<Arafangion> Hmm, I suppose I have to.
<Arafangion> Got another problem with dbus.  Whenever I start my dbus script, via: sudo initctl start dbus, it hangs - never returns unless I hit ^c.
<Arafangion> The job itself just has an 'exec dbus-daemon --system', and the respective configuration file has had the fork removed.
<ion_> Try adding ârespawnâ to the job config.
<Arafangion> Thanks.
#upstart 2007-11-01
<chowmeined> so are there plans to start migrating sysvinit scripts to upstart?
<Arafangion> chowmeined: Of course there are.
<Arafangion> chowmeined: Once upstart is considered "complete".
<chowmeined> oh, i missed that part because i keep seeing how upstart is being used in ubuntu.. but its not complete?
<Arafangion> Otherwise you'll just have a half-hearted init system (as mine is, as I do not use sysvinit compatibility), and have to rewrite all the scripts again for the complete syste
<Arafangion> *system.
<Arafangion> Yeah, it's augumented by sysvinit.
<Jc2k> Keybuk: is there a IRC room for each UDS room?
<Keybuk> no
<Jc2k> Keybuk: bleh
<Jc2k> we got about 1.30 warning about the times for the sync meeting
<Jc2k> poor john is in NZ and i just had to pull him out of bed at 3am :)
<Keybuk> heh
<Keybuk> there's VoIP and stuff
<Jc2k> nzjrs is investigating VOIP
<Jc2k> im at work
<Jc2k> so cant
<Jc2k> but will be ircing and icecasting
<Jc2k> Keybuk: my gaffa wants to participate in Hunsaker B, have you got anyway to poke them for us?
<Jc2k> he's hoping they can look at irc cos he's having voip troubles..
<Keybuk> I'm in A
<Jc2k> i was hoping you could bang on the wall or something :)
<Jc2k> sorry for interrupting :(
<Jc2k> Keybuk: he managed to get in on voip
<Jc2k> and he found gobby
<Jc2k> :-)
<Keybuk> cool
<Jc2k> really like gobby
<Jc2k> hope your gdm session went well
<Keybuk> mmm, ServiceKit
<Jc2k> hmm
<Jc2k> s/Conduit/SyncKit/ and i'm in to ubuntu then?
<Keybuk> you'd get everywhere! :)
<Jc2k> fantastic!
<Jc2k> :D
<Keybuk> (having a side conversation about the merge of HAL and udev being called DeviceKit)
<Keybuk> which sidelined into "if we called Upstart 'ServiceKit' D-BUS people might stop hating it"
<Jc2k> lol :)
<Jc2k> i had the same thought with a low level part of Conduit totally seperately
<AlexExtreme> what merge of hal and udev?
<Jc2k> although, s/D-BUS/Havoc/
<AlexExtreme> or are you joking?
<Keybuk> J5 actually
<Keybuk> Havoc's pretty pro-Upstart
<Jc2k> eh
<Jc2k> maybe J5 would <3 Conduit
<Jc2k> Havoc's pretty into reinventing sync for parts of his online desktop stuff :(
<Keybuk> I had thought of calling the "just the service manager" bit of Upstart "ServiceKit"
<Keybuk> and using Upstart as the name for that plus the event handler
<Jc2k> interesting
<Keybuk> yeah, much of OD amuses me
<Keybuk> like they implemented a tomboy sync plugin
 * Jc2k baffles
<Keybuk> and spent ages implementing a bigboard slot for google calendar
<Keybuk> just so you can have desktop notifications
<Keybuk> when the eds google calendar backend gives you that and more much better
<Jc2k> luckily i'm pretty close with the tomboy guys - tis how i got my svn in fact
<Jc2k> so i hope we can at least collaborate on sync even if they won't use us or opensync...
 * Jc2k drifts off into his comfort zone where there arent 15 reimplementations of every technology
<Keybuk> :-)
<Keybuk> we like conduit
<Jc2k> :O
<Jc2k> \o/
<Jc2k> who's we *innocent looks*
<Keybuk> Ubuntu
<Jc2k> \o/
 * Jc2k reists urge to do a happy naked dance
<Keybuk> no plans until +1 though at this point
<Jc2k> aye, i think it would be daft to put anything big and new like conduit/opensync in to an LTS
<Jc2k> but we could really do with some help on packaging synce - even if its only in universe
<AlexExtreme> any chance of native upstart bootup in hardy? *hopeful look*
<Jc2k> i mean we have debs, but the integration side is a bit o.o
<Keybuk> MOTU are the people to get help with that
<Jc2k> Keybuk: anyone in particular or any place in particular?
<Keybuk> not that I can think of
<Jc2k> ok, i will continue to poke martin :)
<Keybuk> Pitt?
<Keybuk> he's a very good person to poke
<Jc2k> the martin from the syncintegration spec
<Jc2k> martin owens
<Keybuk> ah right
<Keybuk> don't know him
<ion_> InternetKit
<ion_> (ifupdown)
<Jc2k> lol ion_ :)
<Jc2k> thats how to stop people hating NetworkManager...
<ion_> âNetworkManagerKitâ
<Jc2k> indeed
#upstart 2007-11-03
<ion_> http://programming.reddit.com/info/1ri1k/comments/c1rj05 :-)
<KeybukKit> heh
<chowmeined> i use vim...
 * KeybukKit uses emacs
<chowmeined> now that that is settled
 * Arafangion uses vim also.
<Keybuk> http://codebrowse.launchpad.net/~keybuk/libnih/main/revision/scott%40netsplit.com-20071103181155-dj2hghndsbkq4oya?start_revid=scott%40netsplit.com-20071103181155-dj2hghndsbkq4oya
<Keybuk> that should fix the 4913 bug
#upstart 2007-11-04
<Keybuk> http://codebrowse.launchpad.net/~keybuk/upstart/main/revision/scott%40netsplit.com-20071104054904-uzliuyw1ln0w7aeb?start_revid=scott%40netsplit.com-20071104054904-uzliuyw1ln0w7aeb
#upstart 2008-10-28
<sadmac2> Keybuk: for the lists, what if we swapped the prev and next pointers for cursors?
<sadmac2> if list->next->prev != self (list->next is a cursor)
<Keybuk> huh?
<sadmac2> Keybuk: for cursors, cursor->next points to the previous element, and cursor->prev points to the next. We can detect this condition easily. if list->next->prev != list then list->next is a cursor
<Keybuk> there's lots of ways like that
<Keybuk> but they all invalidate the list in such a way that you can't just iterate on list->next
<sadmac2> Keybuk: well, in the list head right now, the ordering is the only bit of information that isn't used
<sadmac2> well, it is used, but that can be parted with
<Keybuk> ?
<sadmac2> Keybuk: if you're serious about making this multithreaded one day, I suggest you just add the flag variable, because you're going to have to put a semaphore in the list head later anyway, so the space is going to get used.
<Keybuk> the flag still means you have to know about cursors
<Keybuk> which means an nih_list_next () and nih_list_prev () function
<Keybuk> (that know how to skip over them)
<sadmac2> macros more like
<sadmac2> and that's the nature of the problem
<sadmac2> the stock linked list just doesn't display reentrant behavior
<Keybuk> they have to be while loops
<Keybuk> with a temporary variable at least
<Keybuk> for (NihList *ptr = iter; ptr != iter && nih_list_is_cursor (ptr); ptr = ptr->next)
<Keybuk>     ;
<sadmac2> Keybuk: you're next solution, from what I can gather, is to drop linked lists altogether. I can solve these sorts of issues slightly better with an auto-array
<Keybuk> how does that help?
<Keybuk> at the point you're not using a linked list, you're in strange territory that's rarely worth bothering with
<sadmac2> what??
<sadmac2> an auto array helps because next and prev can be calculated for items that have gone out of existence
<sadmac2> prev for foo[i] is foo[i-1]
<sadmac2> and I really don't think linked list are that special
<ion_> #define NIH_LIST_FOREACH_SAFE(list, i)                      \
<ion_>   for (NihList *_copy_##i = nih_list_dup (list), *_##i = 0; \
<ion_>        *(int *)&_##i < 2; ++ *(int *)&_##i)                 \
<ion_>     if (*(int *)&_##i == 1) nih_free (_copy_##i);           \
<ion_>     else NIH_LIST_FOREACH (_copy_##i, i)
<ion_> Wait. No, it wouldnât work.
<ion_> I didnât think far enough. :-)
<Keybuk> heh, copy the list?
<Keybuk> has the same basic problem, you can't free the current or next pointer
<sadmac2> I don't think linked lists are right here
<Keybuk> sadmac2: any option has the same fundamental problem
<sadmac2> Keybuk: Ordered vector + iterators listed in head structure fixes it
<Keybuk> ?!
<sadmac2> remove(list, x) { list.values[x] = list.values[--list.size]; for( k in list.iters) { if k >= x; k-- } }
<sadmac2> being able to iterate by an index number rather than a pointer has its advantages
<Keybuk> which means you can't reference from anywhere else
<Keybuk> because the pointer to the object changes
<Keybuk> so you have to refer by index *everywhere*
<Keybuk> Job * becomes guint32 job_idx
<sadmac2> not quite everywhere
<sadmac2> only where list location is relevant
<Keybuk> no, everywhere
<Keybuk> because the pointer will change if you move it in the array
<sadmac2> Keybuk: ah, but you can still have a list head in the objects
<Keybuk> if you have a list head, then it's a linked list
<Keybuk> not a vector
<sadmac2> foojob->list_idx
<sadmac2> the head contains a pointer to a parent list and its index number therein
<Keybuk> vectors are also insanely expensive to do inserts on
<sadmac2> Keybuk: I just did it in O(1)
<Keybuk> it's O(len list)
<sadmac2> Keybuk: its only expensive if you preserve order
<Keybuk> your above was not O(1)
<sadmac2> it was O(1 + num iters)
<Keybuk> which leaves holes in the list
<sadmac2> no
<sadmac2> to remove 1) remove last element 2) put it back on top of the element you want gone 3) count--
<Keybuk> that doesn't preserve order
<sadmac2> nope
 * Keybuk is writing an init daemon, not a STL
<sadmac2> well you've seen all the defects of all the possible solutions
<sadmac2> which one do you want to live with?
<Keybuk> honestly, I don't have a problem with the solution we had before
<sadmac2> which is?
<Keybuk> I still can't see why you're affected by it
<Keybuk> cache the next pointer
<sadmac2> fix my segfaults plz
<Keybuk> you haven't filed any bugs
<Keybuk> nor have you attached any core files
<Keybuk> or stack traces
<Keybuk> etc.
<sadmac2> notting: can you help here^^
<notting> oof. basically, when exiting single user mode, we would get random crashes and segfaults
<notting> but i don't have a trace with current code at the moment
<sadmac2> notting: I don't think we've pushed anything new since 0.5.0 that would change this, and since it seems to be race-related, probably best to reproduce it on the code that failed
 * sadmac2 goes to class
<Keybuk> this is much easier in a reference/gc language :)
<notting> init.js
<Keybuk> init.cs
<Keybuk> the real problem is just that the nih main loop code sucks
<Keybuk> if I fix that, then the "best way to line up a series of data structures" debate goes away :p
<ion_> Switch to... glib!
 * ion_ ducks
<Keybuk> tempting
<sadmac2> Keybuk: I'm pretty sure we fixed the main looop
<sadmac2> we were getting an analogous issue elsewhere
<sadmac2> the fix wasn't great I grant you, but I think that instance of the bug went away
<Keybuk> given the main loop is the only place this pattern is used, it might simply be not in the loop functions
<Keybuk> ie in the timer or child or signal code
<Keybuk> by "fix the main loop" I include those
<sadmac2> Keybuk: the other option is to do your multiparent allocator and fix it that way
<Keybuk> I believe by doing both, I can eliminate all uses of _SAFE in the first place
<sadmac2> Keybuk: i.e. instead of caching the next pointer, the loop simply becomes a parent as it iterates
<sadmac2> yes
#upstart 2008-10-29
<sadmac2> Keybuk: this Garett Cooper guy looks like a pretty l33t h4x0r
<sadmac2> he's totally spl0iting upstart
<ion_> URL?
<sadmac2> ion_: upstart mailing list
<ion_> Alright
<Keybuk> I liked that he wrote it in the form of an exploit
<sadmac2> Keybuk: connection troubles again?
<Keybuk> no
<Keybuk> KVM
<sadmac2> Keybuk: ah
<sadmac2> Keybuk: so the release is on Thursday, right?
<Keybuk> Ubuntu?
<sadmac2> Keybuk: yes
<sadmac2> Keybuk: I assume that was the release that has had you scrambling?
<Keybuk> indeed
<sadmac2> Keybuk: well I have a state machine prototype in a git repo. Expecting a few more tests from a colleague in a bit
<sadmac2> Keybuk: also, I don't know if you ever found out yourself, but netstat uses /proc files. no netlink :(
<Keybuk> netstat?
<sadmac2> Keybuk: yes, I mentioned the idea of doing the expect listen feature without ptrace by simply watching netstat's source of information
<sadmac2> which could still work, but will involve polling, or a hefty kernel patch to put inotify into some portions of proc
<sadmac2> (I don't imagine Linus is eager to have that patch)
<ion_> OTOH, polling /proc shouldnât be too bad, should it? It isnât real hardware IO anyway.
<sadmac2> ion_: apparently /proc/mounts supports poll
<sadmac2> ion_: in the man 2 poll sense of the word
<sadmac2> ..does that strike anyone else as strange?
<ion_> Sorry, i meant rereading given /proc files periodically.,
<sadmac2> ion_: yes, I know :)
<sadmac2> I introduced the overloading
<sadmac2> Keybuk: so yes, the info comes from /proc/net, which we could do something about in kernelspace (sounds like the prevailing interest is to get rid of non-process related /proc folders)
#upstart 2008-10-31
<sadmac2> Keybuk: release day, is it?
<Keybuk> yesterday
<sadmac2> o rite
 * sadmac2 's concept of time has been having some issues
<sadmac2> today is friday
<sadmac2> right
<Keybuk> right
<Keybuk> today is the first day of planning for 9.04
<sadmac2> suggestion: more cowbell
<suihkulokki> apt-get moo
<sadmac2> suihkulokki: I did that, but its not enough
<sadmac2> suihkulokki: I got a fever, and the only cure is more cowbell
#upstart 2009-10-27
<PovAddict> http://lwn.net/Articles/351013/ this is absolutely awesome
<mbt> Hi.  I'm having issues with Upstart (as found in Ubuntu Karmic) successfully starting a system when run in an LXC container. I'm hoping someone may have an idea of what I might try to do to fix it.
<mbt> strace says it's hanging on a read from a pipe pretty early into startup, just after trying (and failing) to open a connection to the /var/run/dbus/system_bus_socket UNIX socket.
<sadmac_tokyo> mbt: you should probably try in an ubuntu channel first
<JanC> I doubt "LXC containers" are something officially supported by Ubuntu?
<mbt> LXC support is rather new to Ubuntu, I was unable to find anyone who seemed to know what they were let alone what could be an issue.
<mbt> That said, as I have no clue what's going on, I'm kind of stuck. Currently reading through the upstart sources to see if that will turn on any light bulbs for me.
<JanC> might be useful to ask LXC people too
<mbt> I have no clue where to even find them.
<JanC> probably a permission issue or something
<JanC> mbt: they've sent patches to the kernel...  ;-)
<mbt> lol
<JanC> LKML must have their email address  ;-)
<mbt> lol, that's true.  Something tells me that would take longer than trying to solve by brute force, though.
<mbt> The last time I emailed any kernel maintainer it took weeks and I got brushed off because it couldn't have been a software fault in the kernel.
<sadmac_tokyo> mbt: who?
<mbt> The maintainers for a USB->Parallel Printer cable driver.  (Driver would eat a character of output to the printer and require the printer to signal offline/online before printing, weird).
<mbt> I don't remember who it was at this point, though, that was a few years ago.
<sadmac_tokyo> mbt: the trick is to figure out the sociable ones and email the closest one to what your issue is
<sadmac_tokyo> mbt: Ingo is good, Andrew Morton is good....
<JanC> I guess the language of your mail mathers too  ;-)
<JanC> matters
<sadmac_tokyo> JanC: If you mean literal language: English.
<sadmac_tokyo> kernel development occurs in English.
<sadmac_tokyo> No exceptions
<PovAddict> 'your sh***y code is f***ing broken'
<JanC> sadmac_tokyo: more like PovAddict's example won't help  ;)
<sadmac_tokyo> "Good day, kind sir. It is my humble regret to inform you that your sh***y code is f***ing broken."
<JanC> sadmac_tokyo: feel free to try it
<mbt> That said, I can't find anything that points to the kernel so I wouldn't have a clue what to even seek out.
<mbt> This same host kernel is running several other systems, including older (by about 70 days) Karmic systems.  Just an up-to-date Karmic guest doesn't work.  I don't have any way to test upstream components to try to narrow it down further.
<PovAddict> I once commented on some disgusting code duplication (adding a feature by copy/paste/minor replace), and the project BDFL replied 'if you have better code, let's see it; otherwise shut up'
<mbt> There is some more info at bug 461638 in launchpad.
<mbt> Rather, bug 461438
<sadmac_tokyo> PovAddict: he's right. if you know exactly what's wrong, why not fix it?
<mbt> That's the type of thing I'd send a patch for.
<PovAddict> mbt: I'd start by comparing package versions, and trying downgrading candidates to the same version as your old-but-working system
<PovAddict> candidate = package that might possibly be the cause or related
<mbt> PovAddict, I don't know how likely that is to work; there are a whole slew of changes around the way things went in.  There's new packages for things like mountall and I don't think rolling back is going to be straightforward.
<mbt> Of course, that was also my fault for not snapshotting the bloody FS first.  I always do that. This time, I forgot to.  :(
<PovAddict> let's start with the obvious
<PovAddict> is it same kernel and same upstart on working and non-working systems?
<mbt> Same kernel (Linux Containers/LXC is like BSD Jail).  Host hasn't changed configuration and works with the latest stuff; so upstart on the host works, but not in the container.  At least, I think it's upstart, that's what's failing to read something else.
<mbt> Though, the "something else" part I haven't figured out (yet).
<Keybuk> mbt: the fact that you can strace Upstart scares me
<ion> :-)
<mbt> Apparently, while strace will work, ltrace does not.
 * mbt shrugs
<Keybuk> heh
<Keybuk> strace isn't supposed to work on init
<PovAddict> why not?
<Keybuk> because ptrace() relies the process you are tracing being your child
<Keybuk> this means that you become the parent of init
<Keybuk> which means that strace becomes init
<Keybuk> this is obviously wrong
<PovAddict> you can attach to an existing process too
<PovAddict> and in his case, probably upstart is inside the container and strace is outside... or something
<Keybuk> yes
<Keybuk> and when you attach to the existing process
<Keybuk> you become its parents
<Keybuk> you get SIGCHLD if it does, not its real parent
<Keybuk> et.c
<Keybuk> it dies, etc.
<mbt> Keybuk, it can work on init in a container, because in a container, init has PID 1, but outside the container it has a parent.
<mbt> Keybuk, see http://pastebin.com/d55fbfbbb -- those have non-1 PIDs, but when as far as they are concerned, they are PID 1 inside of the container.
<mbt> The problem with ltrace is documented as a bug in its man page, so that's pretty much a dead end for me.
<mbt> And it's not like I can install sysvinit, because Karmic doesn't have it apparently.
<mbt> So I can't even verify that the problem is what I think it is.
<PovAddict> http://packages.ubuntu.com/search?keywords=sysvinit right, it's gone in karmic
<mbt> Yeah, so I'm feeling rather stuck at the moment.
<mbt> I wonder....
<mbt> If I take a core dump of the failing Upstart process, would anyone know how to extract anything useful about the state of the process from it?
<mbt> I've attached one to https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/461438 though I don't know how useful it will be.
<Keybuk> yes, absolutely
<Keybuk> did Upstart core dump?
<Keybuk> honestly though, you're not really describing your problem
<Keybuk> on the bug you're talking about mountall outputting errors
<Keybuk> but here's you're talking about upstart core dumps
<mbt> I'm trying to figure out *what* the problem is.  At first, I thought it was mountall.  Now it's looking like it's upstart.  The problem is the container won't start.
<Keybuk> do you get a pid 1 in the container?
<mbt> And no, I used gcore to get the process memory.
<mbt> Yes, that coredump is taken from the container's PID 1.  That's the *only* process that is running in the container.
<Keybuk> so the container is clearly starting
<mbt> Alright, the container shell starts, but the stuff in the container does not.
<Keybuk> if no other processes are running, how do you get error messages from them?
<Keybuk> because you reported the bug with error messages from something upstart had run
<Keybuk> so stuff in the container *CLEARLY IS* running
<mbt> Yes, I did.  It was running mountall.  To see if that was the problem, I replaced mountall with a script that returns 0.
<Keybuk> did the script return 0?
<Keybuk> did Upstart see the script return 0 and return exited normally?
<mbt> Now, if you look at the 4th comment on the bug you see where Upstart is hanging.
<mbt> Mountall is the last thing it does, and it goes no further.  It sees that it exits normally.
<mbt> After mountall is done, upstart hangs forever, blocked on either a read or a select() call.  The data I have collected there seems to be inconsistent.
<mbt> So not only am I confused and not sure where the problem's root cause is (the only thing I *do* know is that it's related to a change in the container; Karmic as it was installed in the container 70 days ago worked just fine; Karmic as was updated 2 days ago does not).
<mbt> But I can't seem to collect enough data to figure out *why* it's hanging.
<mbt> All I know is that it is.
<mbt> And that all Upstart does is start mountall, hostname, and hwclock; nothing else is getting run, and init is the only process that is left running when those are completed.
<Keybuk> right
<Keybuk> but that can just mean that Upstart is done
<Keybuk> did mountall work?
<Keybuk> do you see events being emitted by mountall?
<mbt> Alright, let's back up just a second here.
<mbt> Comment 4 on the bug shows all there is to show on Upstart's early startup.  From there, nothing else in the container that is configured to start, does.  Upstart isn't finished because the system never finishes booting; no gettys are spawned, no avahi-daemon, no sshd, nothing.  When the container is fully booted, it should have about 20 processes running, including a web server.
<mbt> The last thing to happen in that is mountall exits normally (according to upstart) and it changes state from post-stop to waiting.
<mbt> Now, the container has nothing to mount (all of that is done by lxc-start).
<Keybuk> and what does mountall say?
<mbt> What do you mean? It is a script that returns 0.
<mbt> Now, here's something else:
<mbt> I disabled the mountall, hwclock and hostname .conf files in /etc/init --- and now, Upstart is doing nothing.
<mbt> It says:
<mbt> root@spicerack:~# exec /sbin/init -v
<mbt> Loading configuration from /etc/init.conf
<mbt> Loading configuration from /etc/init
<mbt> init: Handling startup event
<mbt> And hangs.
<mbt> Attaching to it with gdb (from outside the container) shows that it's blocking on a call to select().
<Keybuk> err
<Keybuk> why is mountall a script that returns zero
<Keybuk> mountall is a C binary
<mbt> You're not paying attention to what I've said.  12 minutes ago, right here, in this conversation, I said that I replaced it with a script that returns success to see if that was the culprit.
<Keybuk> well, that won't work
<mbt> As everything in the container is already mounted when lxc-start forks and exec's /sbin/init, mountall has nothing to do in the container in the first place.
<Keybuk> yes it does
<Keybuk> it had to send the events that the rest of the system is waiting for
<Keybuk> otherwise nothing else will start
<Keybuk> rather than an exit 0
<Keybuk> why not?
<Keybuk>   initctl emit virtual-filesystems
<Keybuk>   initctl emit local-filesystems
<Keybuk>   initctl emit remote-filesystems
<Keybuk>   initctl emit filesystem
<Keybuk>   exit 0
<Keybuk> you may want || true on the end of those
<mbt> Interesting.  So the bug *is* in mountall?
<Keybuk> or maybe -n
<Keybuk> no, not at all
<Keybuk> you're not running mountall
<mbt> I was.
<Keybuk> you replaced it with a shell script
<mbt> And it was still doing nothing.
<mbt> That's why I replaced it with the shell script, to see if the system *still* did nothing.
<mbt> Let me swap back and see if that has any effect.
<mbt> Okay, swapping back, I still hang, though the output of exec /sbin/init -v has changed:  https://bugs.edge.launchpad.net/ubuntu/+source/mountall/+bug/461438/comments/7
<mbt> So mountall is sending events just fine, but upstart is still failing to proceed with the boot process.
<Keybuk> what does mountall output?
<Keybuk> mountall hasn't sent the virtual-filesystems event yet
<Keybuk> let along the filesystem event
<Keybuk> so nothing will start yet
<mbt> What do you mean, what does mountall output?  Everything that is output is there on the link I just pasted.  That's it, in its entirety.
<mbt> I don't see any event names in the output so I can't tell what's being fired or not.
<mbt> If I use that script you put here a few minutes ago, though, things seem to work.
<mbt> Well sort-of.  I get some things started.
<Keybuk> ok
<Keybuk> try mountall --debug
<mbt> Before execing init, or from the script?
<Keybuk> from the mountall script
<mbt> If I do that, it spawns over and over and over again, like a giant fork-bomb.
<Keybuk> really?
<mbt> Yep.  I had to kill the container forcibly.
 * Keybuk doesn't see respawn in mountall.conf
<mbt> I don't have one in mine, either.  I haven't modded any of the *.conf files in /etc/init.
<mbt> But there were 3000 processes when I killed the container.
<mbt> At this point, I have the container running using the initctl statements to fake mountall's presence.
<mbt> I'm going to create a new container to continue debugging in, since I need this one to be up and running.
<mbt> I'll bbiaf, need to switch back to my regular freenode profile.
<mbt> Back.
#upstart 2009-10-28
<Keybuk> http://lwn.net/Articles/359013/
<Keybuk> Lennart's been bitching again, then?
<ion> Hah
#upstart 2009-10-29
<sadmac_tokyo> damn. the company lwn subscription doesn't get picked up from the tokyo office
<sadmac_tokyo> or maybe it does. I think it was another subscription where it was free to get in
<sadmac_tokyo> s/free/automatic/
<sadmac_tokyo> the ephasia thing is really a problem this time of morning
<szymon_g> hi
#upstart 2009-10-30
<Diddleha>  Know how to make upstart run something at shutdown before the send kill signals etc take over and whack everythings ?
<Diddleha> "Backup over the net at shutdown" kind of a thing.
<sadmac_tokyo> Diddleha: that's more of a distro question. It will vary depending on how your distro uses upstart
<Diddleha> I have tested it on Fedora and Ubuntu
<sadmac_tokyo> Diddleha: so you'd want to ask in your distro's channel
<sadmac_tokyo> Diddleha: for fedora you'd define the job with start on starting killall
<Diddleha> S000 or S01 or S03 will get interrupted. Kany will also be.
<Diddleha> On Fedora
<Diddleha> 10
<Diddleha> in /etc/rc0.d
<Diddleha> Or S00 for that matter. /Hmm
<sadmac_tokyo> Diddleha: so you tried it as a sysv script and had an issue?
<Diddleha> Yeah
<sadmac_tokyo> Diddleha: that should have worked
<Diddleha> The script runs, but there seems to be no way of making upstart not initiate the other kill signals (killall and halt scripts) before my script has finished
<Diddleha> Its almost as if id require a "MustNotHaveBeenKilled: $network $local_fs" etc
<Diddleha> Im lost. Ive been at it for days
<sadmac_tokyo> Diddleha: upstart just runs /etc/rc, which runs the halt scripts in serial
<sadmac_tokyo> Diddleha: it must be the way your sysv job is written
<Diddleha> Oh, its serial on shutdown and paralell/threaded on startup ?
<sadmac_tokyo> Diddleha: everything in /etc/rc* is fully serial.
<sadmac_tokyo> Diddleha: only new-style upstart jobs are ever parallel
<Diddleha> Mjae
<Diddleha> Yeah, mine are
<sadmac_tokyo> yours are what?
<sadmac_tokyo> for that matter, your what are what?
<Diddleha> If anyone has an answer youll get credz in this: http://mange.dynalias.org/linux/gadmin-rsync/screenshots/gadmin-rsync-progress.png
<Diddleha> Added a restore function, but the backup at shutdown requires something extra: http://mange.dynalias.org/linux/gadmin-rsync/devel/gadmin-rsync-0.1.5-beta14.tar.gz
<sadmac_tokyo> Diddleha: if you're installing a sysv script in /etc/rc then you should be in a serial path
<Diddleha> rc0.d for shutdown you mean.
<sadmac_tokyo> Diddleha: yes. if your new script is in there it should be in an order
<Diddleha> Alphabetical ? :)
<Diddleha> Or Numerical or Both ?
<sadmac_tokyo> Diddleha: yes
<Diddleha> Im feeling boored now
<sadmac_tokyo> Diddleha: well, alphanumerical. Its by filename
<Diddleha> No, its both
<sadmac_tokyo> ok
#upstart 2009-11-01
<ethan_> I have some general questions about upstart and admin of services on karmic if anyone is willing to answer
<ethan_> now that it seems ubuntu has completely shifted to upstart as of karmic is the entire system-v init system obsolete,  I ask because I still see how to's on the web explaining service control with /usr/sbin/servic
#upstart 2010-11-01
<traviscline> where does upstart hold its state? i'm running into issues where one a job isn't detected as starting properly any start/stop hangs
<traviscline> unless I change my job name
<traviscline> (0.6.5)
<traviscline> i think my process is forking too many times as the pid upstart thinks it is/was didn't sitcka round
<traviscline> wish there were some effort put into getting some updated documentation
<traviscline> esp re: how to debug your scripts
<ion> Yeah, thatâs a known problem. Better not use âexpectâ unless youâre completely sure of the forking behavior of your main program. A future release of Upstart will come with a better implementation of following forks.
<ion> The stateâs in memory.
<Guest33795> Hello
<Guest33795> i like to know how to change the key combinations Ctrl Alt DEL
<Guest33795> nobody can not repondre me
<traviscline> Guest33795: this isn't the correct channel for that question
<traviscline> ion: so for now, if it double-forks, I can't use upstart to manage it?
<traviscline> correct?
<ion> âexpect daemonâ follows a main process that forks twice.
<traviscline> hrm
<traviscline> in my case the stop will then hang when the pid is not actually a running process
<traviscline> then any7 subsequent start/stop hangs
<ion> Yeah, the current functionality gets confused very easily if the main process behaves differently than what the âexpectâ stanza says.
#upstart 2010-11-02
<e-squizo> folks, I've run into a wall... is there a way to tell an init script to run after an upstart job?
<e-squizo> my problem: I need to start an fcgi server that starts from an init script
<e-squizo> bit it needs mysql... which in Ubuntu runs from Upstart
<e-squizo> and for some reason Ubuntu insists on running them in the wrong order :-(
<e-squizo> I tried moving the init script to an upstart job, but I couldn't get it to find the process after starting it...
<e-squizo> and when I realized that the docs don't match what is running, I decided I'd rather wait.
#upstart 2010-11-03
<Schuyler> hello
<Schuyler> can anyone tell me why 'sudo initctl start $job' might hang?
<Schuyler> I'm trying to run a Ruby app using Thin and I'd like to use upstart to supervise it.
<Schuyler> here's the /etc/init/app.conf
<Schuyler> https://gist.github.com/661448
<JanC> Schuyler: my guess would be that it doesn't detect that the app is running
<Schuyler> it doesn't seem to even start the app.
<Schuyler> if I run that /usr/bin/thin command line manually, it works.
<Schuyler> upstream initctl just hangs.
<JanC> did you check with 'top' or 'ps' whether it runs or not ?
<JanC> there are some issues in the current release of upstart with detecting if a service runs or not
<Schuyler> JanC, I think I got it figured out.
<Schuyler> However, I had to reboot.
<Schuyler> I ran strace and initctl was blocked on reading/writing to a socket.
<Schuyler> it had hung on a call to poll()
<Schuyler> rebooting fixed the hanging problem
<JanC> if you have been trying different settings, upstart sometimes gets confused  ;)
<JanC> at least, IME
#upstart 2010-11-05
<analogue> anyone got a few mins to help out on an upstart problem?
<analogue> trying to do something real simple but (start a java program on startup).  works fine with sudo start/stop but doesn't work on boot
<bmm> "Desktop & Upstart" sounds promising, but I can't find any documentation. Does this mean that upstart is coming to the user session?
<bmm> (I'm looking for an event driven daemon starter for the deskotp)
#upstart 2010-11-06
<terrycojones> hi folks. i'm trying to wrap my head around upstart & finding it a bit difficult in some ways.
<terrycojones> if there's anyone able to answer some newbie questions, that'd be great.
#upstart 2011-10-31
<twb> As at lucid, for a job that declares "task", are start(8) and restart(8) identical?
<cjs226> Does Upstart support $LAST so the process will be the last to be shutdown/started?
<ion> Last compared to what?
<SpamapS> cjs226: can you explain what you mean by $LAST ?
#upstart 2011-11-01
<project2501b> hey guys. i am reading the "getting started" page. this makes no sense, syntactically speaking:You can change the settings for where a job's output goes, and where its input comes from, with the console stanza. This should be one of output (input and output from /dev/console), owner (as output and Control-C also sent the process)
<project2501b> as output and control-c also sent the process?
<jhunt> project2501b: if you don't have any special requirements, just don't specify the console stanza which will discard any output from the job.
<jhunt> project2501b: there's a new feature that will be available soon that adds 'console log' such that any output from a job can be logged to a file.
<jhunt> project2501b: You may want to see the cookbook rather than the (dated) "Getting Started" page: http://upstart.ubuntu.com/cookbook/
<project2501b> jhunt: cool beans, dude
<project2501b> jhunt:  i am using upstart in a 20k core bioinformatics cluster.
<project2501b> great way to test if the node is within required parameters :D
<project2501b> jhunt:  but i am talking about the wording in the page
<jhunt> project2501b: now *that* sounds like cool beans to me! :)
<project2501b> it might be my english, but to me that sentence makes no sense
<project2501b> "also sent the process"? 
<project2501b> you mean "are also sent to the process"?
<jhunt> project2501b: try "man 5 init" and searching for "console". init(5) is "the bible" for Upstart.
<project2501b> jhunt:  with a raid 6+0 over ssds, i managed to reduce the boot up time of the entire cluster from 5 hours down to 40 minutes :p
<project2501b> jhunt:  i get it about init. i am saying that the wording on the page, might be erroneous 
<project2501b> jhunt:  and i am asking, i guess, for confirmation, if you think the wording is also wrong or not.
<project2501b> http://upstart.ubuntu.com/getting-started.html
<jhunt> project2501b: fixed.
<project2501b> ok! :D
<project2501b> beer, bacon, linux and cute german women around me. what else could i ask?
<project2501b> thanks man :)
<jhunt> project2501b: np. are you running Ubuntu on this cluster?
<project2501b> no. Debian
<jhunt> so, you're probably using a pretty old version of upstart. We're trying to rectify that atm...
<project2501b> i do not agree with the Ubuntu philosophy nor do i agree with the philosophy of its users.
<project2501b> neither do i think that canonical is doing a good job
<project2501b> jhunt:  no prob, i am running wheezy
<project2501b> but upstart is the right way out of the monolithic age, for sure.
<project2501b> with so many cores, why not put them to use?
<project2501b> jhunt: if i make another suggestion, you are saying at the end of the page "Events can taken arguments (passed on the emit command-line) in the form of environment variables."
<jhunt> project2501b: of course. if you're allowed to (?), maybe you could blog about that setup?
<project2501b> you might want to put an example there to clarify it, and leave everything else for the full guide. 
<project2501b> other than that, i think the getting started guide is quite excellent.
<project2501b> jhunt:  love to, not allowed to.
<project2501b> uni i work for is kinda hush hush for its resources.
<project2501b> but you may see me in SC11
<jhunt> project2501b: the material on upstart.ubuntu.com needs to be folded into the cookbook since this is where we are concentrating our efforts. You can download a pdf of the entire cookbook if you want to read offline. Rest assured we will tidy up that top-level site "real soon now" :)
<jhunt> project2501b: noted.
<project2501b> cookbook? do i smell an oreilly cookbook? :D
<jhunt> That wasn't the original plan, but who knows?
<project2501b> heh. 
<project2501b> upstart and gnu parallel. let's see if we can make a map reduce function in shell.
<project2501b> jhunt:  thank you :)
<jhunt> project2501b: np - any time.
#upstart 2011-11-02
<TJ__> i have a job executed when some iface gets alive. The job is executed, but a bit too early. Apparently iface up isnt the same as link up... ?
<jhunt> TJ__: what is the jobs 'start on'? You probably want to use 'start on net-device-up INTERFACE=...'
<TJ__> start on net-device-up IFACE=eth1
<jhunt> TJ__: you need to say 'start on net-device-up INTERFACE=eth1' - your job will be starting when the *first* interface is up, not when eth1 is up.
<jhunt> TJ__: I'll update the cookbook on this...
<TJ__> i expected that the job would start when IFACE=<x>,   when x comes alive ?
<TJ__> thanks anyways, seems to be not clear indeed
<TJ__> at least.... 
<TJ__> to me :)
<jhunt> TJ__: the variable that is set is INTERFACE, not IFACE. To see this, look for '=eth1' in /var/log/udev.
<TJ__> will do
<TJ__> thanks
#upstart 2011-11-03
<NuxRo> hi
<NuxRo> how would i modify the number of active ttys started by upstart ?
#upstart 2012-10-29
<Dha> Hello, I am new to upstart and have some question to implement it on RHEL 6 ...
<Dha> when we install upstart, do we have to convert services manually to upstart ? for example we have services under init.d like nfs, nis, kerberos., automount .. do i have to convert them all to manage by upstart ?
<Dha> or are they available somewhere , already tested ?
<Dha> Hello ? any help ?
<Dha> guys, any help will really appriciate ..
<rlaager> I have a daemon (libvirt-bin) that, in my deployment, requires NFS filesystems to be mounted. What sort of changes can I make to the "start on runlevel [2345]" line to delay starting it until after network filesystems are mounted?
<rlaager> Do I want "start on runlevel [2345] and remote-filesystems", or just "start on remote-filesystems", or something else entirely?
<Dha> Hello, anyone here to help me with upstart ?
#upstart 2012-10-31
<Dh__> Hi, is that anyone to answer ulpstart quesiton ?
<felixge> is there an idiomatic way to do 'meta' jobs in upstart that group several jobs together?
<felixge> for example I want to group a 'php' and 'nginx' job into 'app'
<felixge> so I can do: stop app / start app
<felixge> which would stop / start all the jobs 'app' is bundling
#upstart 2012-11-02
<MFen> what's the workaround for stopping an upstart job that had expect daemon and now cannot be stopped?
<MFen> i.e. didn't start in the first place, but upstart thought it did
<MFen> also i'm having serious doubts about whether chdir does anything
<SpamapS> MFen: if it has a pid that is actually gone when you type 'status jobname' then you have to exhaust the pid space and then let upstart kill the pid listed there
<SpamapS> MFen: chdir works, Its used in quite a few jobs
<MFen> yeah the whole job was a problem
<MFen> i discovered the exec 2>>/dev/.initramfs/foo.log trick though. fixed things right up
<MFen> just unexpected missing env vars
<viric> Hello
<viric> I've an upstart deadlocking at boot in a select(), according to strace.
<viric> the last thing it does is: 1     write(8, "<6>init: Handling startup event\n", 32) = 32
<viric> (before deadlocking into the select)
<viric> I notice it doesn't read any file inside /etc/init, too
<SpamapS> viric: what OS? What version of upstart?
<viric> nixos, upstart 1.5, mips-n64
<viric> sorry
<viric> mips-n32
<viric> keeping same libnih, same upstart, I can boot with linux 3.4.2, and can't boot with linux 3.6.4
<viric> I'll try to find if I'm missing any component, by trying back to have a linux 3.4.x, but keeping all userland the same.
<viric> '--debug' doesn't show anything beyond '--verbose' either.
<viric> And with strace, I can see that it adds a watch for /etc/init, but it doesn't read any conf file.
<viric> SpamapS: the same versions boot fine in x86_64 and i686.
<SpamapS> viric: jodh and slangasek are likely busy travelling home from UDS in Copenhagen right now, so you may have a hard time getting an answer from them, and they're probably the best ones to ask this question of
<SpamapS> viric: it does sound, however, that perhaps the kernel changed something as well
<slangasek> not traveling today, still stuck in CPH ;)
<slangasek> viric: do you have inotify support in your 3.6 kernel?
<slangasek> or perhaps inotify is broken on mips in 3.6?
<viric> Yes, INOTIFY is there
<SpamapS> slangasek: joy! ;)
<viric> It'll take me some time to build a 3.4; but I'll report once I try it
<slangasek> so it does sound like a kernel bug/issue to me
<slangasek> the upstart code is bog simple
<viric> I'll paste the strace
<viric> http://sprunge.us/UJHR  that's stracing "-f -p 1" before execing init
<viric> I don't know inotify userland tools, to test that
<viric> slangasek: tested. 3.4.16 boots. 3.6.4, upstart deadlock
<JanC> viric: are you sure it deadlocks?
<JanC> I don't know much about upstart's internals, but I think "handling startup event" should happen *after* reading the files inside /etc/init/ ?
<viric> it doesn't read the files
<viric> JanC: look at the strace: http://sprunge.us/UJHR
<viric> it doesn't go beyond.
<viric> but I see it happening in 3.6.4, not in 3.4.2 or 3.4.16
<JanC> logically speaking, I'd think it can't handle any events before reading those files, but I might be entirely wrong  ;)
<viric> yes, I think that the inotify should tell upstart about the files, and upstart would read them. But that does not happen. The inotify fds are in the select 'read' list, but nothing goes on.
<viric> Someone broke linux mips, I think.
<JanC> I guess you'll have to wait for some of the developers to help find out
<viric> Let's see if someone thinks the same at linux-mips; I mailed them already.
<JanC> well, if it's just inotify that broke on MIPS, there are Python and maybe Perl etc. bindings for that
<viric> I could learn some inotify userland tools to demonstrate the failure closer to kernel syscalls, but I'll wait for some first answer from them
<viric> I don't have a very nice boot with those kernels, due to the upstart failure, though. :)
<JanC> you can always boot with a shell  âº
<JanC> oh, and there is this a script from one of the upstart developers that gives you a menu to select an "init"
<JanC> http://people.canonical.com/~jhunt/upstart/utils/
<JanC> might be helpful while testing this and possible fixes  âº
<viric> JanC: sure, I boot with a shell, that's what I do.
<viric> no trouble. :)
<viric> JanC: or how do you think I straced PID 1, and detached? :)
<JanC> there are all sorts of weird things one can do, but maybe that script is still useful  âº
<viric> choosing an init is quite easy having grub. It only requires to type 'e' at the menu option, and add init=PROGRAM before boot.
<JanC> viric: sure, if you have it configured to show the menu
<JanC> you could implement a similar menu with grub anyway
<viric> yep
<JanC> viric: is upstart the default init on NixOS or just an option?
<viric> the default since long long
<viric> but the switch to systemd will happen some day soon
<JanC> because that is easier to maintain?
<viric> because the people who do the work are the people who decide ;)
<viric> I'd personally have stayed at sysvinit ;)
<JanC> I think sysvinit isn't exactly ideal
<viric> I don't get much this dbus world, with consolekit, polkit, etc.
<JanC> dbus is just an IPC mechanism
<viric> yes, a too flexible piece.
<viric> then there come a whole new namespace rules to respect
<viric> and learn
<viric> we have the filesystem, we have the network, then dbus, ... too much for my simple mind
<JanC> greater flexibility & greater possibilities usually come with greater complexity & more to learn indeed  :-/
<viric> yes. For me, the overall ratio of advantadges/drawbacks isn't >1.
<viric> Both for upstart and systemd. In fact, I've not learnt systemd at all, but I expect the worse :)
<viric> I prefer to give up on "parallell starting of daemons", and have simpler but slower pieces.
<viric> I can accept a longer boot too. :)
<JanC> well, that might be sure for certain servers and workstations maybe
<JanC> but most people don't want a 2 minute boot on to check what 2 mail messages they got today  ;)
<viric> bah, I pm-suspend always
<JanC> "eternal suspend/resume" that would be nice if various desktop applications wouldn't leak memory like hell
<viric> I do restart those ;)
<viric> but xterm, ssh, irssi, mutt, and other pieces I've written, don't leak enough :)
<JanC> my current problemetaic piece of software is natu
<JanC> *nautilus
<JanC> but that's another story (not on-topic for this channel)
#upstart 2012-11-04
<viric> I'm back at the mips problem
<viric> I don't really thing it's INOTIFY related...
<viric> Reading the "conf_source_reload_file", I think it installs the watch *and* then it should read the /etc/init directory.
#upstart 2013-10-28
<Takumo> Hi all, if I have two jobs, A and B, and job B needs job A to work
<Takumo> can job A do "emit a-running" and B have "start on a-running" ?
<jodh> Takumo: yes, but you don't need to do that: just make B specify "start on started A". See http://upstart.ubuntu.com/cookbook/#event and http://upstart.ubuntu.com/cookbook/#start-depends-on-another-service.
<jodh> Takumo: note that if you really want A to emit your custom 'a-running' event, it should call 'initctl emit a-running' but also specify 'emits a-running' for 'initctl check-config' (see http://upstart.ubuntu.com/cookbook/#initctl-check-config).
<Takumo> oh ok, so just leave A without any emits and have b do "start on started A"
<Takumo> awesome :)
<jodh> Takumo: correct :) Upstart provides a set of standard events for jobs (starting/started/stopping/stopped). They all have man pages too.
<Takumo> that's nice
<Psi-Jack> I'm trying to create an upstart job that loads a non-forking, non-daemonizing PHP script which keeps itself running in the foreground. But, when I do so, it just starts it, and stops immediately with an exit code of 1, and debugging it, I can't seem to find any further details why it's just not working.
<jodh> Psi-Jack: this is all covered in the cookbook: http://upstart.ubuntu.com/cookbook/#determining-why-your-service-fails-to-start, http://upstart.ubuntu.com/cookbook/#checking-how-a-service-might-react-when-run-as-a-job
<jodh> , http://upstart.ubuntu.com/cookbook/#see-the-environment-a-job-runs-in
<jodh>  
<Psi-Jack> I kinda figured out what it was. sudo errored about not having a tty.
<leomurilloz> anybody know how I can execute an action on job respawn?
#upstart 2013-10-29
<PeterFA> If I source a file that doesn't call any processes in my start script, will that interfere with the PID stuff?
<jodh> PeterFA: if the sourced script only sets variables, that's fine.
<PeterFA> jodh: thanks.
<PeterFA> What if I have an if/then bock where the else part (which is the golden path) calls the process, would the if/then and test stuff interfer with getting the right PID?
<jodh> PeterFA: no since 'if', 'test' and '[' are all shell built-ins (to convince yourself, run "for i in if then else test [; do type $i; done").
<PeterFA> jodh: thanks. This kind of scripting makes me a bit paranoid.
<PeterFA> I wish Upstart had some sort of flag that says, "This next line will produce the PID we want. Track that one."
<jodh> PeterFA: if you are only setting a few variables, you could just use 'env' maybe to avoid the external script? http://upstart.ubuntu.com/cookbook/#env
<PeterFA> jodh: I source the script multiple times. I understand that even though a variable is set, it dies with each section, so after process is started, the post-start or stop sections won't be able to use those variables.
<PeterFA> So, I just rebuild them every time.
<jodh> PeterFA: also, if the job your are producing is a session job (?) you could use http://upstart.ubuntu.com/cookbook/#initctl-set-env. That way you could set the variables in the pre-start and have them apply to the entire job such that the main job process (script/exec) won't need to source anything :)
<PeterFA> jodh: that would be a whole lot simpler, and I do want to make this into a session job. The reason is because I want the processes to have lesser priviledges as to not go all political on the data.
<PeterFA> Or at least on the rest of the system.
<jodh> PeterFA: are you using setuid+setgid at the moment then? http://upstart.ubuntu.com/cookbook/#setuid
<PeterFA> jodh: no, not yet. I want to though. I guess now's the time for this step.
<linguini> cd upstart && ./configure --with-local-libnih=../libnih # says unrecognized option: --with-local-libnih
<linguini> I'm trying to compile upstart, following http://upstart.ubuntu.com/wiki/CompilingUpstart
<linguini> Is --with-local-libnih obsolescent?
<PeterFA> How do I figure out what  version of Upstart I'm using? It looks like from yum -list I'm using Upstart 6.2.
<jodh> PeterFA: 'initctl version' shows you the running version of upstart and 'init --version' will show you the latest *installed* version.
<jodh> linguini: no, that option is still there.
<PeterFA> jodh: awesome, thanks. I'm on 0.6.2.
<PeterFA> Ouch, no session init.
<jodh> linguini: you should probably be looking at http://upstart.ubuntu.com/cookbook/#setting-up-an-upstart-development-environment btw.
 * PeterFA wails in agony.
<jodh> PeterFA: oooohhhh...
 * PeterFA plots the ultimate destruction of RHEL6.
<jodh> PeterFA: no setuid/setgid either.
<PeterFA> start-stop-daemon?
<jodh> PeterFA: that's part of dpkg so unsure if that'll be available on RHEL either ?!?
 * PeterFA collapses and turns ghostly white.
<PeterFA> I'm going to go get some lunch.
 * PeterFA disappears grumbling.
<linguini> jodh: Thanks; I wonder why my configure doesn't accept the argument...
<linguini> jodh: Thanks for the link; I'll look at the cookbook settings instead.
<jodh> linguini: what version of upstart are you trying to build?
<linguini> jodh: bzr branch lp:upstart
<linguini> (ala http://upstart.ubuntu.com/wiki/CompilingUpstart)
<jodh> linguini: try running 'autoreconf -fi' then './configure --help|grep with-local-libnih'
<linguini> jodh: autoreconf -fi # success
<linguini> jodh: ./configure --help | grep nih # nope
<jodh> linguini: have you definitely installed all the pre-reqs ("sudo apt-get build-dep upstart")? What does 'grep with-local-libnih m4/libnih.m4' give?
<linguini> jodh: No; I haven't.  I'll dry that.
<linguini> jodh: It's installing 30+ MB of stuff.  Clearly I was missing some build dependencies!
<jodh> linguini: :)
<linguini> jodh: That worked!
<jodh> linguini: great.
<linguini> GNU auto-* tools are mysterious to me.
<linguini> Thanks; I'm now unstuck.
#upstart 2013-10-30
<crankharder> any way I can tell uptstart to load init files in a given path?
<crankharder> include directive of sorts
<jodh> crankharder: what are you trying to achieve?
<crankharder> I want puppet to set up and configure a directory full of init scripts
<crankharder> I can't tell puppet to monitor /etc/init since it'll delete all the scripts that puppet doesn't own
<crankharder> so if upstart monitored /etc/init/puppet just like /etc/init we'd be good to go
<jodh> crankharder: it does
<crankharder> heh, hmm. ok
<crankharder> jodh: https://gist.github.com/crankharder/4fa79577333ca89bd546
<crankharder> seems to not like that job
<jodh> crankharder: What does 'init-checkconf <your_job>.conf' say?
<crankharder> $ init-checkconf resque_worker_50.conf
<crankharder> ERROR: file resque_worker_50.conf does not exist
<jodh> crankharder: init-checkconf '/full/path/to/file.conf'
<jodh> crankharder: your 'start on' should probably be 'start on runlevel [2345]' and your 'stop on' is currently wrong (unless you are emitting shutdown somewhere?) - it should be 'stop on runlevel [016]'.
<jodh> crankharder: also, you don't need to do your own redirection/logging - upstart does it for you, logging all job output to /var/log/upstart/.
<crankharder> had some perms issue, but now getting this:
<crankharder> $ init-checkconf /etc/init/puppet/resque_worker_50.conf
<crankharder> ERROR: failed to ask Upstart to check conf file
<crankharder> /etc/init/puppet is 755 and the job is 744
<crankharder> jodh: okay, those points may be fair -- but I have the same job (named differently) in /etc/init and it works
<jodh> crankharder: what distro version is this?
<crankharder> ubuntu 12.04
<crankharder> I get this too:
<crankharder> $ init-checkconf /etc/init/resque_worker_5.conf
<crankharder> ERROR: failed to ask Upstart to check conf file
<crankharder> for someone not in my nested path
<crankharder> something
<jodh> crankharder: copy the file to /tmp, ensure it is readable, then 'init-checkconf -d /tmp/foo.conf'
<jodh> crankharder: if that still fails, I'm guessing you have a dbus issue - is dbus-launch available?
<jodh> crankharder: your job can also use use 'setuid', 'setgid' and 'chdir' to simplify the main job to be just 'exec rake environment resque:work QUEUE=high,medium RAILS_ENV=production PIDFILE=/tmp/resque_worker_50.pid VERBOSE=1' I think.
<jodh> crankharder: putting pid files in /tmp looks like a bad idea btw.
<crankharder> yea, looks like dbus issues.  no, i dont have dbus-launch
<crankharder> output here: https://gist.github.com/crankharder/1ee1e4cb50cc8353a3e4
<crankharder> it's a bit weird init-checkconf doesn't work on scripts in /etc/init/ ? -- maybe this isn't the issue?
<jodh> crankharder: maybe copy your job to a desktop system with a full dbus setup and run init-checkconf on it there. I wonder if you have any odd whitespace chars in that job - copied from windows maybe?
<crankharder> so, testing on a more barebones ubuntu 12.04 isntance I have w/o my jobs in it... installing dbus-launch now
<jodh> crankharder: another way to check the job without using init-checkconf is: sudo initctl log-priority debug;sudo touch /etc/init/foo.conf;sudo initctl log-priority message' and look at dmesg/syslog to see what messages upstart logged about foo.
<crankharder> $ init-checkconf /etc/init/acpid.conf                                                                                                         â
<crankharder> ERROR: failed to ask Upstart to check conf file
<crankharder> -d shows samee waiting for dbus issues
<jodh> crankharder: init-checkconf won't work unless dbus-launch works.
<crankharder> not really familliar with dbus launch.  define works?  https://gist.github.com/crankharder/53351450db600a15252e
<jodh> crankharder: let's forget init-checkconf - I've run it locally and your job as pasted is syntactically valid. I've given you another option above to syntax check anyway. I suspect the job on disk is not the same as pasted - it might contain '\r's or similar if you copied it from a windows machine maybe?
<jodh> crankharder: try the technique above and see what upstart logs to the system log - it will tell you where it is failing to parse the job.
<crankharder> okay, so i'm on a new system w/o my custom jobs and I still see the same issue.  It's not related to my custom job.
<jodh> crankharder: which issue? the job or init-checkconf?
<crankharder> https://gist.github.com/crankharder/cd04bcb4d80259ba58d3
<jodh> crankharder: 'sudo status puppet/tty6'
<crankharder> okay, that works
<crankharder> unfortunately I see nothing in syslog or dmesg from this:  sudo initctl log-priority debug ; sudo touch  /etc/init/cron.conf ; sudo initctl log-priority message
<jodh> crankharder: are you by chance running in a cloud environment that uses overlayfs?
<crankharder> i'm running ubuntu in virtualbox... but i dont know what overlayfs is, so certainly didn't set tha tup
<jodh> crankharder: mount|grep overlay
<crankharder> nothing
<crankharder> okay, I removed all my custom init scripts and moved tty6 into this puppet path.  giving my unknown job puppet/tty6 on this system (but it worked on the more barebones one)
<jodh> crankharder: this makes no sense - your system sounds broken.
<crankharder> /etc/init/puppet is 755 on both /etc/init/puppet/tty6.conf is 744 on both
<crankharder> I can test this at different points as puppet sets up the system to see if that helps
<crankharder> jodh: thanks for the help -- i'll post here if I can track down what change makes this break
<jodh> crankharder: you said this job runs fine in /etc/init/ but not in /etc/init/puppet/ - is that now resolved now you know how to start a job in a sub-directory?
<crankharder> the subdirectory thing works on a box that hasn't had all my puppet configs (lots of them) applied.  same version of ubuntu tho
<crankharder> so I assume it's something puppet is configuring that's causing this
<jodh> crankharder: I'd certainly make sure you have a pristine server environment available (ie no puppet) for testing the basic upstart jobs.
<CharlieSu> I've got an UpStart task that I'd like to print a message to the console once run..  'start job' should produce something on the users screen..  How can I do this?  I've tried 'console output' 
<xnox> CharlieSu: at boot "console output" will print to the active console / boot messages. If run interractively it will print where-ever it's run.
<CharlieSu> xnox: doesn't seem to be doing that for me..  I just use "logger 'message'" right?
<xnox> CharlieSu: no, just do "echo"
<xnox> logger will go whever logger logs, e.g. syslog.
<xnox> CharlieSu: "console " stanza controls where job's stdout and stderr is redirected, default is "log" which is under /var/log/upstart/, "output" is to normal stdout and etc.
#upstart 2013-10-31
<tseliot> hi all, if I used a symlink in /etc/init to the actual job in, say, /usr/share/$package_name, would upstart follow the symlink and start the job properly? Note: this is a hack and I know it wouldn't be good practice
<tseliot> and shall I expect any issues with this?
<xnox> tseliot: no, it will not work. Upstart ignores all symlinks.
<tseliot> xnox: ok, thanks
<xnox> tseliot: so your symlinked name will not be picked up.
<tseliot> right
<xnox> tseliot: if you have "one job which should have similar instances which are tiny bit variable" maybe you need an instance job.
<xnox> tseliot: what is it for?
<xnox> tseliot: e.g. see /etc/init/network-interface.conf where one job instance per network interface is started.
<tseliot> xnox: well, the nvidia flavours in Precise can be installed at the same time and I need them to install the same job. It's not an issue in Saucy (where they are not coinstallable) but I'm trying not to have a big diff between the different versions that I ship in the different ubuntu releases
<xnox> tseliot: i see =/ if it helps you can put jobs into sub-directories under /etc/init/
<xnox> tseliot: but don't forget to think about the dist-upgrade case from precise -> trusty =/ with all of those hwe stacks.
<tseliot> xnox: yep, that's something I'll have to test
<tseliot> xnox: if I have jobs with different names,  can I make sure only one of them can run?
<tseliot> xnox: so that if one is running the others won't
<xnox> tseliot: you'd need to add a pre-start in the one which should not be running. In that pre-start check the output of e.g. "initctl status goodjobname" and if there is better one do { stop; exit 0; }
<xnox> tseliot: let me fetch an example from cookbook.
<xnox> tseliot: supporting "states" is often requested feature which hasn't been implemented yet.
<xnox> tseliot: hm, I see mutual exclusion in the cookbook. The "bad" job can have "stop on starting goodone", this way whenever good one tries to start the bad one will be stopped first.
<xnox> tseliot: or "pre-start exec ! status goodjob"
<tseliot> xnox: right. Except that there's probably no such thing as the good one and it would be a matter of having whatever starts first prevent other jobs of the same kind from running
<xnox> if goodone exists, status will exit with 0, ! will invert it, thus pre-start will exit with 1 and prevent the "badjob" from running.
<xnox> tseliot: oh, so it's many2many and only one should run?
<tseliot> xnox: yep. All the jobs will be the same
<tseliot> it's just a matter of having only one running
<xnox> tseliot: can I see them? where are they?
<xnox> (cause one would not want to encode the names of all of them in each and everyone of them)
<tseliot> xnox: they are not there yet. I'll pastebin one
<xnox> tseliot: i think i missed pastebin.
<xnox> tseliot: =) oh you haven't yet.
<tseliot> xnox: something like this http://paste.ubuntu.com/6335293/
<tseliot> don't mind the __USER__ thing, it's a template
<xnox> tseliot: ship that job in a common package which the rest of the packages depend on?
<xnox> tseliot: and you can source __USER__ from a config file, if there are different users.
<tseliot> xnox: I tried but it got stuck in NEW and was rejected when Saucy was released... I was hoping to get around it
<xnox> tseliot: well talk to archive admins. that looks like the cleanest solution, imho.
<tseliot> xnox: yes, it is. I'll try again getting the package into the archive
<tseliot> thanks for your help
<xnox> tseliot: you can even ship that job anywhere else, e.g. in x11-common or some such, just add a check "pre-start [ ! -x /usr/bin/nvidia-persistance ] && { stop; exit 0; }"
<xnox> tseliot: it's nice to have in the same package(s) that ship nvidia-persistance binary, but you don't have to.
<tseliot> right
<xnox> (apart from making sure postinst scripts attempt to start it)
<xnox> tseliot: yeah, just talk to archive-admins about it. Or upload with a bug # in the changelog, and in that bug explain what the problem is, mark all affected packages and explain how you solved it and subscribe archive admins.
<tseliot> xnox: yes, I'll try with Trusty first
<xnox> tseliot: i think rejection was not "reviewed and rejected the package", but rather "it's release day, step X/N to release is to rejected all new packages", as there is no simple way to redirect new queue to the next series.
<xnox> which didn't get time to be reviewed.
<tseliot> xnox: yes, the package was reviewed a first time, then I made the required changes but it was never reviewed again
<crankharder> jodh: I was unable to reproduce that issue yesterday on a clean system - thanks for all the troubleshooting help yesterday anyways :)
#upstart 2014-10-29
<mlindner> So I'm having some strange behavior and I'm wondering if its related to upstart
<mlindner> I have a script in upstart that launches a program, that program launches another program with system() call which opens something in "screen". Additionally, that top level program started from upstart makes another system() call to run ifconfig and route to change ip/gateway settings
<mlindner> Interestingly with normal behavior those final system calls to change IP/gateway break the launching of screen and no screen is created
<mlindner> but if you comment out those system() lines then screen launches normally
<mlindner> when doing these same actions from a non-upstart environment or when the "stop prog" "start prog" is run the issue does not occur
<mlindner> I'm using start on (local-filesystems and net-device-up IFACE!=lo)
<mlindner> is that guarenteed to mean everything else has started?
#upstart 2014-10-30
<gchristensen> Hi, does upstart have a log of 
<gchristensen> events which have triggered? I'm trying to debug why my service never started.
#upstart 2014-10-31
<mustmodify> I wrote an upstart script for my dev environment. It starts but doesn't know how to stop. Any thoughts on why I'm having this issue? https://gist.github.com/mustmodify/143adbfe32dc8befcfa2 When I do sudo stop project-dev it says "stop: Unknown instance"
#upstart 2014-11-01
<Gloaming> Hi, I am trying to start up my minidlna server on boot by using upstart. I can't seem to make upstart start the server at all. Originally I planned to start it as a specific user, but when this wasn't working. I stripped the .conf file down to the bare minimum, but it is still not working.
<Gloaming> The upstart config I am using can be found here: http://paste.ubuntu.com/8770506/
<Gloaming> I tried using "expect daemon", but that does not work either.
<Gloaming> When I try to start the job using "sudo start minidlna" I get the error: "Job failed to start"
<Gloaming> starting it from console works fine though
<Gloaming> found the error ... /sbin/ != /bin/ ...
<Gloaming> Thanks anyway!
#upstart 2015-10-26
<fredinsky> Heya peoples, is Upstart dead? After 6 releases in 2013 and 5 in 2014, there have been none at all in 2015
<ccope> i want to create a task with start and stop sections, is that possible? there's no long-running process, it just needs to mount some paths when it starts and unmount them when it stops
<ccope> ah ok, i had to turn the task into a 'service' by adding a 'sleep inf' to the start script
#upstart 2015-10-28
<paultag> Hey all - I'm using Upstart 0.6.5, and it looks like it might be leaking processes -- was this fixed in a later version (if so, do you have the patch handy?)
<paultag> It's leaking a Java process, if that helps with the search space (but I don't see a reason to blame Java yet)
<paultag> (in the meantime, I'll patch over this with a pidfile)
#upstart 2018-10-30
<codeyman> Hi guys..  could you please take a look at the script section of https://gist.github.com/codeyman/59b8ac242de6c45cc65d4c933ca2828e? For some reason when I shutdown "myserver", it is not revaluating "MY_KEY". It works only during full restart.
<hallyn> how does /tmp/keygen look, and does the 'script' section definately get re-run?
<codeyman> hallyn: No it doesn't get rerun.. :(
