Bug 1412585

Summary: [WALA]dhclient lease file is not removed during deprovisioning when using NetworkManager
Product: Red Hat Enterprise Linux 7 Reporter: Yuhui Jiang <yujiang>
Component: WALinuxAgentAssignee: Miroslav Rezanina <mrezanin>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: anderson, borisb, brendand, danis, hkrijger, jboutaud, jjarvis, jopoulso, leiwang, mheslin, salmy, stephen.zarkos, vkuznets, wshi, yujiang, yuxisun
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: WALinuxAgent-2.2.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-07 08:52:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yuhui Jiang 2017-01-12 11:14:09 UTC
Description of problem:
In RHEL-7, the dhclient lease file under /var/lib/NetworkManager/ folder is not removed during deprovisioning.

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

RHEL Version:
RHEL-7.3

How reproducible:
100%

Steps to Reproduce:
1. Prepare a RHEL-7.3 VM with WALA-2.2.0+ installed(NetworkManager enabled)
2. Run "waagent -deprovision". It shows "WARNING! Cached DHCP leases will be deleted."
3. Check dhclient lease file:
ls /var/lib/NetworkManager/dhclient-*.lease

Actual Result:
The dhclient lease file is not removed.

Expect Result:
The dhclient lease file is removed.

Additional Info:
Currently WALA only remove all the files under /var/lib/dhclient/dhclient/. But if we use NetworkManager, the dhclient lease file is like this: /var/lib/NetworkManager/dhclient-5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03-eth0.lease

Comment 2 Yuxin Sun 2017-02-27 03:04:45 UTC
Verify on RHEL-7.3 ondemand image with WALinuxAgent-2.2.4-1.el7.mrezanin201702081000.noarch.rpm
Result: PASS

Comment 3 Yuxin Sun 2017-03-06 03:16:34 UTC
Change the status to "POST" for developers to add it into ERRATA.