Bug 1474226 - [WALA][cloud] cloud-init dhclient-hook script has some unexpected side-effects on Azure
[WALA][cloud] cloud-init dhclient-hook script has some unexpected side-effect...
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cloud-init (Show other bugs)
7.4
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Ryan McCabe
Vratislav Hutsky
: Regression, Triaged
Depends On:
Blocks: 1451548
  Show dependency treegraph
 
Reported: 2017-07-24 03:47 EDT by Yuhui Jiang
Modified: 2017-08-04 02:25 EDT (History)
17 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 Yuhui Jiang 2017-07-24 03:47:23 EDT
Description of problem:
I am responsible for testing Windows Azure Linux Agent(WALA) with RHEL on Azure.And recently we found that cloud-init has some side effects on WALA.

cloud-init dhclient-hook script(/etc/NetworkManager/dispatcher.d/cloud-init-azure-hook) will always run on booting though cloud-init-local,cloud-init,cloud-config,cloud-final,these 4 services are disabled on booting.And inside the dhclient-hook script,it invoke "exec cloud-init dhclient-hook up "$1"".And this will affect WALA.

In my opinion,the dhclient-hook script should invoke cloud-init when we need rather than always invoke cloud-init.That is to say,when cloud-init-local,cloud-init,cloud-config,cloud-final are disabled,dhclient-hook script shouldn't invoke cloud-init.And when 4 services are enabled,dhclient-hook script should do.


Version-Release number of selected component (if applicable):
WALinuxAgent-2.2.14-1
cloud-init-0.7.9-9

RHEL Version:
RHEL-7.4

How reproducible:
100%

Steps to Reproduce:
1. Install cloud-init package in VM, disable related services:
# systemctl disable cloud-{init-local,init,config,final}
2. Deprovision the VM and use this os disk to create a new VM
3. Check VM status


Actual results:
cloud-init dhclient-hook script invoked cloud-init running,and caused WALA Provision failed.

/var/log/waagent.log:
2017/07/21 02:46:16.396313 INFO Running default provisioning handler
2017/07/21 02:46:16.424520 ERROR cloud-init is running [PID 673, /usr/bin/python^@/usr/bin/cloud-init^@dhclient-hook^@up^@eth0^@]
...
2017/07/21 02:46:24.561451 ERROR Event: name=WALinuxAgent, op=Provision, message=[000004] cloud-init appears to be running, this is not expected, cannot continue
2017/07/21 02:46:24.569447 ERROR Provisioning failed: [000004] cloud-init appears to be running, this is not expected, cannot continue

Expected results:
cloud-init dhclient-hook script shoud exit while cloud-init services are disabled.

Additional info:
Refer to bug: https://bugzilla.redhat.com/show_bug.cgi

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