Race between dhcpcd and ppp while trying to update openresolv?
Ed W
Wed Mar 09 22:18:53 2011Hi Roy Grateful if you could look at bug #353045 http://bugs.gentoo.org/show_bug.cgi?id=353045 The initial bug isn't filed by me, but I'm seeing the same issue and added the last comment to that bug. Basically what I'm seeing is that when creating a new PPP connection (gentoo openrc 0.6.8, 3g dialup), ppp runs scripts in /etc/ppp/ip-up.d/*, one of which tries to update openresolv (and succeeds). However, at the same time, dhcpcd appears to still be running /lib/dhcpcd/dhcpcd-run-hooks, and most curiously it's running with $if_down set? A few ticks later dhcpcd then deletes the new openresolv configuration... My guess (still debugging) is that the order of events is that on connection the ppp device is brought up in a "down" state, dhcpcd starts running, but very soon after the interface is brought "up" and ppp starts running it's option scripts? So we have a race? Assuming the above is correct, sensible and expected, then I need to find a way to delay the call to openresolv in the ip-up.d/* scripts - what's the best way to delay just long enough without simply watching the process list? Alternatively is it unexpected that dhcpcd is apparently doing a run with interface in a "down" state? Thanks for any insight? Ed W
Archive administrator: postmaster@marples.name