Bug 1472396 - ifdown-eth fails when dhclient leaves a pid file
ifdown-eth fails when dhclient leaves a pid file
Status: ASSIGNED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: initscripts (Show other bugs)
7.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: David Kaspar [Dee'Kej]
qe-baseos-daemons
:
Depends On:
Blocks: 1549689
  Show dependency treegraph
 
Reported: 2017-07-18 11:48 EDT by Nick Carboni
Modified: 2018-06-18 08:18 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nick Carboni 2017-07-18 11:48:22 EDT
Description of problem:
Calls to ifdown return an exit code of 1 when an instance of dhclient leaves a pid file and is no longer running.

For me this happens when I attempt to configure both IPv4 and IPv6 as dhcp. The dhclient instance for IPv6 exits and leaves a file in /var/run/dhclient6-eth0.pid

When I then run `ifdown eth0` the command fails because ifdown-eth is failing to kill a process that is no-longer running.

Version-Release number of selected component (if applicable):
initscripts-9.49.37-1.el7_3.1.x86_64
dhclient-4.2.5-47.el7.x86_64


How reproducible:
Always with the following config for the eth0 interface

/etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE=eth0
HWADDR=00:0c:29:74:39:cc
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
NM_CONTROLLED=no
IPV6INIT=yes
DHCPV6C=yes
BOOTPROTO=dhcp


Steps to Reproduce:
1. Install the provided config for eth0
2. systemctl restart network
3. ifdown eth0

Actual results:
`ifdown eth0` returns an exit code of 1 even though subsequent calls to `ip a show dev eth0` show the device as DOWN

Expected results:
ifdown should return 1 only if it was not able to bring the interface down

Additional info:

This system is not using NetworkManager and is using the network scripts files directly.

I think ifdown-eth can be more resilient to this type of situation, but the underlying issue seems to be with dhclient exiting without removing its pid file.
Comment 1 Nick Carboni 2017-07-18 11:49:47 EDT
Opened a patch for the issue here https://github.com/fedora-sysv/initscripts/pull/108
Comment 2 David Kaspar [Dee'Kej] 2017-07-18 12:13:25 EDT
Thank you, Nick, for the report & pull-request.

I will discuss this with maintainer of dhclient to see if this is a problem there, and get back to you once I have something more. :)
Comment 5 Pavel Zhukov 2018-05-17 09:05:49 EDT
(In reply to Nick Carboni from comment #0)

> I think ifdown-eth can be more resilient to this type of situation, but the
> underlying issue seems to be with dhclient exiting without removing its pid
> file.

Hello Nick,

Would you mind share system logs to find the reason why dhclient exited?
Comment 6 Nick Carboni 2018-05-17 09:42:46 EDT
Pavel,

I will if I find the time to reproduce this. It's been almost a year since I opened this so I don't have the logs at the moment.

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