Bug 84012 - pump does not always exit when there 0 managed interfaces
pump does not always exit when there 0 managed interfaces
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: pump (Show other bugs)
7.3
All Linux
medium Severity low
: ---
: ---
Assigned To: Eido Inoue
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-10 18:10 EST by Ken Mayer
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-11 18:25:01 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)
fixes bug (788 bytes, patch)
2003-02-10 18:12 EST, Ken Mayer
no flags Details | Diff

  None (edit)
Description Ken Mayer 2003-02-10 18:10:58 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020916

Description of problem:
On my laptop, pump sometimes doesn't configure the interface for reasons
unrelated to pump (disconnected cable, etc.). It requires a "cardctl eject" to
fix, but since pump failed to configure the interface, it also fails when
/sbin/ifdown calls "pump -r" to release it. That leaves a pump daemon running
around with no manged interfaces. On the next insert, /sbin/ifup calls pump
again, and starts another pump daemon. If I am having problems getting the
network configured, I can have a bunch pump's lieing about, like Imelda's closet.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Insert a PCMCIA ethernet card into a slot, but do not connect to LAN
2. Wait for pump to give up
3. cardctl eject
4. cardctl insert
    

Actual Results:  There are now 2 "/sbin/pump -i eth0" proc's running

Expected Results:  The first pump should have quit when the card was ejected.

Additional info:

Here's a patch:
--- pump-0.8.11/pump.c.orig     Thu Mar  1 00:15:22 2001
+++ pump-0.8.11/pump.c  Mon Feb 10 13:58:34 2003
@@ -522,19 +522,19 @@
                else {
                    cmd.u.result = pumpDhcpRelease(intf + i);
                    callScript(o->script, PUMP_SCRIPT_DOWN, intf + i);
-                   if (numInterfaces == 1) {
-                       cmd.type = CMD_RESULT;
-                       write(conn, &cmd, sizeof(cmd));
-
-                       syslog(LOG_INFO, "terminating as there are no "
-                               "more devices under management");
-
-                       exit(0);
-                   }
 
                    intf[i] = intf[numInterfaces - 1];
                    numInterfaces--;
                }
+               if (numInterfaces <= 0) {
+                   cmd.type = CMD_RESULT;
+                   write(conn, &cmd, sizeof(cmd));
+
+                   syslog(LOG_INFO, "terminating as there are no "
+                                    "more devices under management");
+
+                   exit(0);
+               }
                break;
 
              case CMD_REQSTATUS:
Comment 1 Ken Mayer 2003-02-10 18:12:01 EST
Created attachment 89981 [details]
fixes bug
Comment 2 Eido Inoue 2003-03-11 18:25:01 EST
thanks for the patch. tested and included in cvs

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