/srv/irclogs.ubuntu.com/2011/01/02/#upstart.txt

=== JanC_ is now known as JanC
steffen_b3hi 15:58
steffen_b3can we really expect all of this: https://wiki.ubuntu.com/FoundationsTeam/Specs/MaverickFinishUpstart beginning of March ? 15:59
Keybukthat's the plan16:05
KeybukCanonical has multiple people working on Upstart16:05
Keybukat this point, 1, 2 & 4 are complete16:06
steffen_b3ok - cool - that makes it sound feasable 16:06
Keybuk7 is complete, but may be changed as there's discussion going on upstream16:06
Keybuk3, 6, 8, 9 & 10 are all in progress16:06
Keybukso the only one not started is #516:06
steffen_b3#5 is nice but not that important 16:07
steffen_b3looking forward to see the rest :) 16:09
steffen_b3if working as expected should simplify the jobs we have a lot 16:10
Keybuka little yeah16:16
Keybuk0.6 still has the fundamental issue that the "start on" / "stop on" single stanzas are hard to work with16:16
steffen_b3yes16:25
steffen_b3and states are missing a lot 16:26
Keybukthat's all being worked on though ;-)16:26
Keybukjust not for natty16:26
Keybukit may end up being released around the same time though16:26
Keybukso natty+1 can start straight away with a new upstart16:26
steffen_b3thats fine16:26
steffen_b3i'm working on yavdr 16:27
steffen_b3so we are not bound 100% to ubuntu releases16:27
Keybukah cool16:27
steffen_b3at the moment we are using things like 16:28
steffen_b3LANG=C /sbin/status openbox | grep -q process && /sbin/initctl emit vdr-frontend-restart || /bin/true16:28
steffen_b3or 16:29
steffen_b3while [ ! -e /tmp/vdr-xine/stream ] ; do sleep 0.1 ; done16:29
Keybukdoes respawn not work?16:29
steffen_b3which becomes quickly quite nasty16:29
Keybuk(for the former)16:29
steffen_b3it should start vdr-frontend16:29
steffen_b3if vdr restarts16:29
steffen_b3but only if X is up16:29
steffen_b3else it will respawn it until it gives up16:30
Keybukah right16:30
Keybukthat makes sense16:30
steffen_b3by the socket activation we should get rid of the sleeps16:31
steffen_b3we have more then one of it 16:32
Keybukyup, and the direct state support will let you better specify the former16:32
steffen_b3yes 16:32
steffen_b3then being able to start processes as user is another thing 16:32
steffen_b3if i got it right it should be also possible around that time 16:33
steffen_b3only one problem i didn't found any solution yet 16:34
steffen_b3to stop the shutdown process until a service has finished stopping 16:35
steffen_b3at runlevel everything start to stop at the same time 16:36
steffen_b3including dbus16:37
steffen_b3so if you want to delay it 16:37
steffen_b3upstart seem to hang 16:37
steffen_b3something like 16:39
steffen_b3stop on stopping rc 16:39
steffen_b3anyway needs a closer look in march then 16:39
steffen_b3mainly wanted to see if the agenda is wishfull thinking or really something behind :) - great to see its the second 16:41
Keybuknot sure what you mean by the stopping bit?16:43
KeybukI suspect you're talking about an Ubuntu bug there, rather than an Upstart problem?16:43
steffen_b3i guess its an ubuntu bug 16:44
steffen_b3but i don't really differentiate that much 16:44
steffen_b3;)16:44
steffen_b3or i really can't make sure those bug that is16:45
steffen_b3if a signal is delayed to after dbus has stopped16:45
steffen_b3the signal never happens16:45
steffen_b3for upstart 16:45
Keybukoh right16:46
Keybukyeah D-Bus is stopped by the runlevel event, which happens in parallel to the rest of the shutdown16:46
steffen_b3and dbus is stopped at runlevel16:46
steffen_b3yes16:46
steffen_b3so if you try to get in before rc 16:46
steffen_b3to delay it until the service is down 16:47
steffen_b3rc will never be run16:47
KeybukClint and James are working on a fix for that involving adding explicit "initctl emit" statements to the sysvinit shutdown16:47
Keybukwhich will wait for the upstart jobs to stop16:47
steffen_b3cool :)16:47
steffen_b3vdr needs a couple of seconds to stop 16:48
steffen_b3and we try to run fsck at shutdown 16:48
steffen_b3at the moment fsck is not run, as the filesystem is busy 16:48
steffen_b3so that thing will also be taken care of by natty then i hope/guess ?16:49
ionUnrelated, but anyhoo: i’m using this to avoid fscks on startup: https://github.com/ion1/e2croncheck16:50
Keybuksteffen_b3: I would imagine so, yes16:51
steffen_b3fsck on a mounted filesystem 16:51
steffen_b3ah on a lvm volume snapshot 16:52
Keybukyeah, I think fsck is one of those things the Linux world is collectively waiting for btrfs for16:53
Keybuk"we could fix it now, but it's hard, and btrfs doesn't need fixing"16:53
steffen_b3i use xfs on the big disks 16:53
steffen_b3and ext4 on system 16:54
steffen_b3thing never seen fsck running 16:54
steffen_b3thing = think16:54
steffen_b3" XFS is a journaling filesystem and performs recovery at mount(8) time if necessary, so fsck.xfs simply exits with a zero exit status. "16:55
Keybukheh, XFS doesn't perform recovery16:56
KeybukXFS abandons your data on a remote tropical island without so much a bottle of rum16:56
steffen_b3:D16:57
steffen_b3anyway its a lot but not mission critical data 16:57
steffen_b3i would prefer something reliable w/o fsck 16:57
steffen_b3but until then xfs works fairly well here since the last 5 years or so 16:58
Keybukwell, you always need to fsck16:58
Keybukbut filesystems like btrfs support online fsck16:58
Keybukso you don't need to stop everything for it16:58
Keybukyou just fsck when you feel a need16:59
Keybuk(e.g. it can go in cron)16:59
steffen_b3ok let me rephrase 16:59
steffen_b3without waiting possibly hours for the FS to do "something"16:59
steffen_b3before the machine boots/shuts down 16:59
Keybukindeed16:59
steffen_b3not sure if btrfs is mature enough allready 17:01
Keybukit's at least as mature as ext417:02
Keybukthe only reason Ubuntu hasn't switched, at least for netbooks or desktops, is that there's still a licensing issue with the boot loader17:03
Keybukthe btrfs code, being kernel, is GPL 2 only17:03
Keybukthe boot loader (GRUB 2) is GPL 3+17:03
steffen_b3ok - so i should think about switching at next installation 17:04
steffen_b3i mean in the end its just hours of TV recordings 17:05
steffen_b3for my use case 17:05
Steveehello, i've a question / problem with upstart and a couple a network services - they should stopped bevore the network will shutdown17:41
Steveeso is there any change to do this without a static list of the services in the network job - like "stop on stopped service a and stopped service b and stopped service c ...." ?17:42
steffen_b3you should stop them on the network signals then17:58
steffen_b3not the other way around17:58
Steveeso you mean stop this services on "stopping network" ?18:00
steffen_b3i'm not sure18:01
steffen_b3but i think18:01
steffen_b3net-device-down should exist18:01
Steveethe whole network is controlled by a python script18:01
Steveeso, there is no app for upstart to watch and to stop / wait18:02
steffen_b3stop on net-device-down IFACE=*[0123456789]18:02
steffen_b3would stop the service on any network device going down 18:02
steffen_b3except lo18:03
Steveeyes, but the service should stop bevore the network will stop18:03
Steveethe only way i image is, to define a kind of static list with every service18:05
Steveeand only if all of them are stopped the network service / job will stop18:05
steffen_b3hmm18:06
Steveebut this list of jobs can change so this is no option18:06
Steveeis there any kind of define a group or something ?18:07
steffen_b3you mean like create 1 job with your conditions18:09
steffen_b3and let the other jobs 18:09
steffen_b3start on started18:09
steffen_b3stop on stopping 18:09
steffen_b3that job 18:10
steffen_b3not sure if my thinking is to complex right now 18:11
steffen_b3but you could have a job which reacts on net-device-down (or net-device-removed?) which is checking the number of network interfaces up18:12
steffen_b3if it reaches 0 or 1 (depending if you want to filter lo or not) 18:12
steffen_b3it issues a signal 18:12
steffen_b3which can stop the services 18:13
steffen_b3not sure if that is enough 18:14
Steveethe amount of network interfaces also is dynamically18:14
steffen_b3but not the amount of network interfaces where you would want to stop18:14
steffen_b3which is 0 18:14
steffen_b3allways18:14
Steveethat is true18:14
steffen_b3net-device-added -> count++18:15
steffen_b3net-device-removed -> count--18:15
steffen_b3if count == 1 -> initctl --no-wait emit some-signal 18:17
steffen_b3stop on some-signal18:17
Keybukyou'd want to wait, surely?18:17
Keybukyour code would be:18:17
Keybuk  initctl emit net-going-down18:17
Keybuk  ifdown ...18:17
Keybuk  initctl emit net-down18:17
Keybukif you used --no-wait, you'd tear down the network without waiting for the services to stop18:17
steffen_b3good point 18:18
Steveeoh there is a own event net-going-down ?18:18
KeybukStevee: there is if you make one18:18
steffen_b3:D18:18
Steveeyes, clearly, we emits that18:18
KeybukUpstart has no fixed list of events18:18
Keybukit's up to you to emit them when you want them18:18
Keybukand up to you to decide when you emit whether or not you want to wait for Upstart to finish18:19
Keybukan Ubuntu machine, for example, has a "net-device-down" event - but this isn't waited for18:19
Keybukbecause Ubuntu takes the position that you can't control a network device going down, it could go down because the WiFi is out of range, because the user hit the kill switch, because the user pulled out the network cable or card, etc.18:19
Keybukso since you can't guarantee "service is stopped before network goes down", it doesn't provide that facility18:19
Keybukthat's not an Upstart limitation though, just an Ubuntu policy decision18:20
Steveeyes, so my point is to kill all network services with an event18:22
Steveeand after they all has been stopped, to shut down the network18:23
Steveebut my only idea to perfom that is a kind of static list18:23
Keybuknah18:23
Keybukyou can just use an event for that:18:23
Steveelike "stop on stopped service a and stopped service b and so on"18:23
Keybukin your code just do:18:23
Keybuk  initctl emit kill-all-network-services18:23
Keybuk  ifconfig ... down18:24
Keybukthen the jobs that need to be killed have:18:24
Keybuk  stop on kill-all-network-services18:24
Steveeyes18:24
Keybukyou don't need any kind of static list18:25
Steveeif i put this initctl kill-all-network-services into a jobfile18:26
Steveewill upstart wait on executing the next command ?18:26
Keybukyes18:26
Steveeso at first it emits the event18:26
Steveethe services will stop18:26
Steveeand than it will shutdown the network ?18:27
Keybukyup18:27
Steveegreat, thanks18:27
=== Keybuk changed the topic of #upstart to: Upstart 0.6.7 "Return of the Mole" | http://upstart.at/
Steveehow is the correct syntax: stop on kill-all-network-services or stopped network ?19:00
Keybukthe two syntaxes are both correct, depending what you want to do19:07
Steveeboth19:08
Keybukthen that's correct two19:08
Keybuktoo19:08
Steveethanks19:08
Keybukthat'll say stop on the k-a-n-s event OR if the network job gets stopped without emitting that event19:08
Steveeyes thats correct19:08
Steveeif the network ist stopped manually the net-services also should stop19:09
Steveeis it possible to add multiple initctl emit xyz init a script blog of a jobfile ?19:10
Steveeinit = into19:10
steffen_b3bye all :) 19:10
Steveegood bye19:10
Steveethanks for the help19:11
Steveeto slow :(19:11
SteveeKeybuk thanks for your great help19:24
KeybukStevee: sure, as many as you want19:47
mbieblKeybuk: start on socket ... vs start on dbus-activation ...19:54
mbieblwould be nice to either add -activation to socket or drop -activation from dbus19:54
Keybukmbiebl: yeah, they're just drafts at the moment20:06
Keybukgoing to send the new draft of the dbus patches to the ML in a bit20:14
Keybukbeen a week since the discussion on the common interface tailed off, so a good time for an RFC + patches to get it going again20:14
Steveegn8 @all - thanks for hel20:45
Steveep20:45
ionthanks for hell21:02
Keybuk;-21:46
Keybuk;-)21:46
Keybukmbiebl: right, that's those patches sent22:48

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