/srv/irclogs.ubuntu.com/2009/10/08/#upstart.txt

=== robbiew is now known as robbiew-afk
Keybukqueue_fsck: /mnt: queuing check02:18
Keybukmountall:mountall.c:564: Assertion failed in update_mount_dev_ids: mnt->udev_device != NULL02:18
Keybukdamnit, ion02:18
Keybuk;)02:18
ionHuh02:19
ionIsn’t the only point where queue_fsck is called right after there’s an udev_device and it gets assigned to mnt->udev_device? :-P02:20
Keybukno ;-)02:20
Keybukwhat's the _needed thing about?02:21
ionupdate_mount_dev_ids only does its work if _needed is true, that is, an udev event that might have updated the mapping has been received.02:22
Keybukright02:22
Keybukjust trying to understand the logic :p02:22
Keybukit looks like the update_mount_dev_ids can be just called in fsck_lock()02:28
Keybukand that should do the no-device => always lock thing02:28
ionBut always lock what?02:28
Keybukloopback mounted image :)02:28
ionThe logic probably should be extended to follow that image to the partition it resides on, and that partition to the physical devices.02:29
Keybukpossibly02:31
Keybukexcept that the partition it resides on must be already mounted :p02:31
Keybukso there's little point <g>02:31
Keybukalready mounted => already checked02:32
ionOther images to be fscked may be on that partition.02:32
Keybuka fair point02:32
Keybukbut then, arguably, you don't want to mount it either02:32
Keybukso the same locks should be applied to mounts too02:33
ionCan mount be that IO-intensive? I can see a journal may need to be handled or something like that, but still.02:33
Keybukif that's /usr02:34
Keybukand the other thing is /whatever02:34
Keybukthen that means the boot will continue02:34
Keybukthat's IO intensive :p02:34
ionBut it might just as well get to lock /whatever first and delay /usr. One could implement priorities, of course.02:35
Keybuk:)02:36
Keybukit's one of those problems that gets deeper the longer you look at it, isn't it02:36
ionHeh02:36
Keybukpushed to my branch02:41
Keybukfeel free to much aroun02:41
Keybukmuck around!02:41
ionWith the fsck queue, the worst case scenario is that /usr gets fscked after /whatever, but because there’s no disk thrashing (if you have a HDD), it’s still faster than the worst case scenario with everything being parallel and fsck instances spending most of their time waiting for the disk to seek. I have no hard data, but i’d expect the worst mount to still be so fast it doesn’t need queuing. With queue prioritization, one could get the boot time even ...02:41
ion... faster, of course.02:42
ionThanks. I’ll try to look at the loop mount case. Shouldn’t be hard, just get the device from stat() and get an udev device object for that.02:42
ionMeh, bzr rebase is stupid compared to git rebase.02:51
Keybukhmm?02:53
Keybukwhy rebase?02:54
ionI just wanted to reset the branch to the ~ubuntu-core-dev state. merge probably would have done that, too. I just expected rebase to reset the branch to that state and then notice it doesn’t need to do anything else. You know that frustration you get with git, because you’re not used to its workflow? I haven’t studied bzr enough to be entirely familiar with its inner workings, so i get a similar thing with bzr. :-P02:58
Keybukheh02:59
ion% bzr reset --help   02:59
ionbzr: ERROR: unknown command "reset"02:59
Keybukrevert ;)02:59
ionbzr checkout does the wrong thing, too :-P02:59
Keybukbzr's command set is more like svn's03:00
Keybukwhereas git's is more like an evening at the pleasure of the spanish inquisition's more perverted torturer03:01
ionWith loop mounts, mnt->device is /foo/image, right?03:01
Keybukyes03:01
Keybukunless it's /dev/loop0 ;p03:01
ionWould it be ok to iterate through mnt->deps and set dep->udev_device = udev_device if it dep->device looks like an image file near the line that sets mnt->udev_device in try_udev_device?03:09
Keybukisn't that wrong?03:11
Keybukie. exactly the wrong way around03:12
Keybukmnt->udev_device = dep->udev_device is maybe right03:12
Keybukbut then how do you deal with multiple parents?03:12
ionAh, i guessed the meaning of mnt->deps incorrectly, assuming it would be nicer to keep a list of ‘which mounts depend on this one’, so that they can be handled easily when ‘this one’ is ready.03:13
KeybukI did the opposite03:14
Keybukit turns out to be more reliable03:14
ionNow i need a struct udev *udev handle in update_physical_dev_ids, which may not have a mnt->udev_device. Would it be okay to make udev file-global?03:27
ionupdate_mount_dev_ids, that is, which i think should be renamed as update_physical_dev_ids. :-)03:28
Keybuksure fiddle away ;)03:43
ionHow to commit certain changes to a file, leaving the rest for the next commit?03:50
ionin bzr03:50
ionSimilar to git add -p03:50
=== sadmac_ is now known as sadmac
ionkeybuk: Pushed to https://code.edge.launchpad.net/~ion/ubuntu/karmic/mountall/fsck-locking04:36
sadmacion: bzr shelve is how you do add -p stuff. Its git stash essentially. You put away the bits you /don't/ want to commit04:57
ionAlright, thanks04:57
=== h\h_ is now known as haraldh
mugwumpSometimes, when a system goes wrong, you need to go through the boot process piece by piece10:38
mugwumpWith SysV-style init, this is relatively easy.  How do I debug very early stage bootup problems using upstart?10:39
mugwumpI just replaced a hard-drive, see, and so I copied over using 'dd'10:41
mugwumpchaos is ensuing..10:41
=== h\h_ is now known as haraldh
mgoetzein upstart 0.3, is there some way to specify that the post-stop script should only be run if the main script ran successfully?13:38
sadmac2mgoetze: you can tell from one of the environment variables whether the service is stopping or failing... don't remember what its called...14:22
sadmac2mgoetze: but basically you could do that and just have your post stop script quit immediately if the service failed.14:22
Keybukactually you can't15:01
sadmac2Keybuk: not exported there/15:02
sadmac2*?15:02
Keybukright15:04
=== robbiew-afk is now known as robbiew
sadmac2oh, he said 0.3, right.15:09
sadmac2Keybuk: we changed that in 0.6 didn't we?15:09
ionkeybuk: It seems 0.2.0~ never remounts the root partition rw. I’ll investigate today.15:23
Keybukion: yeah I know why that is ;)15:32
Keybukbit of a think-o15:32
ionkeybuk: But other than that, the locking and everything seems to work with the PPA package. My branch also seems to handle the locking for loop mounts correctly.15:33
Nattgew_how should i run a script at startup and shutdown using upstart?18:11
sadmac2Nattgew_: depends on when precisely you want that to happen18:13
Nattgew_well i have a script that i usually run at 99 on boot and at 01 at shutdown with the sysv scripts...18:13
sadmac2Nattgew_: if you're on ubuntu or fedora, just install it as a sysv script like usual and it'll get run. If you're on another distro with a different/more exotic upstart config it'll depend on how they've set it up.18:15
Nattgew_ok, i'm on ubuntu... i think i'm going to try using /etc/gdm/PreSession and PostSession18:16
sadmac2Nattgew_: that does something slightly different. Possibly better.18:17
Nattgew_yeah, i think it's more what i want. thanks for the info.18:18
sadmac2np18:18
=== robbiew is now known as robbiew-afk
x-warriorI'm using Ubuntu 9.10 Beta, installed bootchart and now i noticed that the boot time is longer. So I was thinking, the boot time increased? Or now with upstart bootchart can get a better (more real) time?19:30
sadmac2x-warrior: might be more of a #ubuntu question, but I think I heard something about them starting boot chart earlier now (though its nothing to do with upstart)19:32
x-warriorsadmac2, ok, sorry I will ask at ubuntu ;) 19:32
=== robbiew-afk is now known as robbiew
=== robbiew is now known as robbiew-afk

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