Bug 216749 - When a ppp connection is brought up ONBOOT, ppp-watch doesn't keep running.
When a ppp connection is brought up ONBOOT, ppp-watch doesn't keep running.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-21 15:26 EST by Kevin White
Modified: 2014-03-16 23:04 EDT (History)
1 user (show)

See Also:
Fixed In Version: 8.50-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-17 12:22:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
potential patch (500 bytes, patch)
2007-01-15 10:58 EST, Bill Nottingham
no flags Details | Diff

  None (edit)
Description Kevin White 2006-11-21 15:26:33 EST
Description of problem:
When a ppp connection is brought up ONBOOT, ppp-watch doesn't keep running.


Version-Release number of selected component (if applicable):
initscripts-8.45.5-1.i386.rpm

How reproducible:
Completely

Steps to Reproduce:
1.  Set up a ppp connection.  Set it to come up ONBOOT.  Test the connection to
make sure it works.  Note that ppp-watch is running.
2.  Reboot the machine.  Note that pppd is running, but ppp-watch isn't.  This
means ifdown ppp0 won't work.  You have to kill pppd by hand.
  
Actual results:
On boot, ppp0 comes up, but ppp-watch isn't running.

Expected results:
ppp-watch should be running.

Additional info:
I don't have a ppp-watch pid file in /var/run, so ppp-watch is either not making
it, or exiting nicely.  I put extra logging into ifup-ppp to see if the call
order is right, and it is...ifup-ppp does call ppp-watch, which calls ifup-ppp
again.  That's working.  Somewhere along the way, ppp-watch goes away.
Comment 1 Kevin White 2007-01-13 23:32:48 EST
I've been staring at the ppp-watch code and found something interesting.

If you pass ppp-watch the boot parameter, it sets an alarm signal, which should
make it time-out after a configurable amount of time.  This is interesting,
because that alarm is never canceled, and there's no way to miss it.

Which means, if called on-boot, ppp-watch will always end up dying.  Even if the
pppd connection is working just fine, ppp-watch will end up going away.

Is this by design?
Comment 2 Bill Nottingham 2007-01-15 10:43:02 EST
It's certainly always been that way; as that's been 7+ years, unsure whether
it's by design or by history.
Comment 3 Kevin White 2007-01-15 10:46:49 EST
Does that behavior seem to be correct?  It isn't for my purposes, but I can
recompile ppp-watch to fix it.  I'm staring at the code now, trying to find the
right place to put alert(0) in if (boot) once the connection's successfully
made.  When I figure that out, I'll update the ticket here.
Comment 4 Bill Nottingham 2007-01-15 10:58:55 EST
Created attachment 145581 [details]
potential patch

Does the attached help? Unfortunately, I'm not in a position where I can test
this at the moment.
Comment 5 Kevin White 2007-01-15 11:05:11 EST
That's about what I was going to do.  I may wrap it in code to only run if we're
in boot mode (because that's the only way alarm could have been set).  I will
test and confirm that this works, and attach my patch (which will be the same as
yours, just with an extra if clause).

More later.
Comment 6 Bill Nottingham 2007-01-15 11:22:26 EST
Shouldn't need the 'if' - alarm(0) is ignored if no prior alarm is set.
Comment 7 Kevin White 2007-01-15 13:33:31 EST
OK, I applied the patch as written (without the check for boot) and it worked. 
My patched FC6 box booted with a ppp connection set up ONBOOT, and the
corresponding ppp-watch program is still running.

Great!  This allows ifdown to work much more smoothly.

Confirmed: the patch fixes the problem.
Comment 8 Bill Nottingham 2007-01-17 12:22:40 EST
Added in CVS, will be in 8.50-1. May appear in a future FC6 update.

Note You need to log in before you can comment on or make changes to this bug.