Bug 84012
| Summary: | pump does not always exit when there 0 managed interfaces | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Ken Mayer <kmayer> | ||||
| Component: | pump | Assignee: | Eido Inoue <havill> | ||||
| Status: | CLOSED RAWHIDE | QA Contact: | |||||
| Severity: | low | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.3 | ||||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2003-03-11 23:25:01 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Created attachment 89981 [details]
fixes bug
thanks for the patch. tested and included in cvs |
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: