Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Restart network service to renew DHCP lease #156

Merged
merged 2 commits into from
Aug 9, 2018

Conversation

calvinmclean
Copy link
Contributor

@calvinmclean calvinmclean commented Aug 7, 2018

Description

Problem: The task that runs dhclient for CentOS fails after the first successful attempt because the dhclient process is already running.
Instead of force killing the process with pkill, restarting the network service will properly stop and start dhclient.

Checklist before merging Pull Requests

  • Add an entry in the changelog
  • Reviewed and approved by at least one other contributor.

@calvinmclean calvinmclean changed the base branch from master to v33 August 7, 2018 18:39
@edwins
Copy link
Member

edwins commented Aug 7, 2018

Has this been tested with both centos 6 and 7?

@julianpistorius
Copy link
Contributor

@edwins:

Has this been tested with both centos 6 and 7?

Centos 6 only. Will test with 7 now.

@calvinmclean
Copy link
Contributor Author

I tested on both and it succeeded

@julianpistorius
Copy link
Contributor

julianpistorius commented Aug 7, 2018

Can confirm it worked on CentOS 7.4.

@c-mart
Copy link
Contributor

c-mart commented Aug 8, 2018

My testing yesterday was invalid (was looking at leases file in /var/lib/dhclient/). Today I systemctl restart networked while tail -fing /var/log/messages and I confirm that the DHCP lease is renewed within a few seconds of restarting the service.

Calvin Mclean added 2 commits August 9, 2018 10:30
Problem: The task that runs dhclient for CentOS fails after the first successful attempt because the dhclient process is already running.
Instead of force killing the process with pkill, restarting the network service will properly stop and start dhclient.
@cdosborn cdosborn force-pushed the fix-centos-dhclient branch from ac3c93d to 395a7c7 Compare August 9, 2018 17:35
@cdosborn cdosborn merged commit c9cac3b into cyverse:v33 Aug 9, 2018
@cdosborn cdosborn self-assigned this Aug 9, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants