Red Hat Bugzilla – Bug 1472396
ifdown-eth fails when dhclient leaves a pid file
Last modified: 2018-06-18 08:18:10 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):
Always with the following config for the eth0 interface
Steps to Reproduce:
1. Install the provided config for eth0
2. systemctl restart network
3. ifdown eth0
`ifdown eth0` returns an exit code of 1 even though subsequent calls to `ip a show dev eth0` show the device as DOWN
ifdown should return 1 only if it was not able to bring the interface down
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.
Opened a patch for the issue here https://github.com/fedora-sysv/initscripts/pull/108
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. :)
(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
Would you mind share system logs to find the reason why dhclient exited?
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.