RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1474226 - [WALA][cloud] cloud-init dhclient-hook script has some unexpected side-effects on Azure
Summary: [WALA][cloud] cloud-init dhclient-hook script has some unexpected side-effect...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cloud-init
Version: 7.4
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Ryan McCabe
QA Contact: Vratislav Hutsky
URL:
Whiteboard:
: 1516941 (view as bug list)
Depends On:
Blocks: 1451548 1516941 1530127 1579237 1692393 1692914
TreeView+ depends on / blocked
 
Reported: 2017-07-24 07:47 UTC by Yuhui Jiang
Modified: 2023-03-24 13:50 UTC (History)
26 users (show)

Fixed In Version: cloud-init-0.7.9-12.el7
Doc Type: Bug Fix
Doc Text:
A regression was introduced in cloud-init-0.9.9-7 that caused dhclient and NetworkManager hook scripts to run on Microsoft Azure even when the cloud-init service was not enabled at boot. In this release, the bug is fixed. As a result, dhclient and NetworkManager hook scripts do not run on Azure when cloud-init is not enabled at boot.
Clone Of:
: 1516941 1530127 1579237 (view as bug list)
Environment:
Last Closed: 2018-04-10 14:05:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0806 0 normal SHIPPED_LIVE cloud-init bug fix and enhancement update 2018-04-10 12:40:54 UTC

Description Yuhui Jiang 2017-07-24 07:47:23 UTC
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

Comment 14 tom.asquith 2017-09-06 10:18:32 UTC
Hi - Has there been any progress on this? We're building on Azure and this is an issue!

Comment 15 Yuhui Jiang 2017-09-06 11:12:18 UTC
(In reply to tom.asquith from comment #14)
> Hi - Has there been any progress on this? We're building on Azure and this
> is an issue!

Hi tom,we are working on this issue,plz wait new build to post/release.
Or if you need help right now,you can get help from our supporting team.
Thanks!

Comment 17 Paul Meyer 2017-09-06 16:37:43 UTC
The scenario seems a bit odd to me, installing cloud-init and then disabling it. What is the intended purpose of installing cloud-init in this scenario?

When cloud-init and WALA are both installed, the expectation is that cloud-init does provisioning and WALA takes a back seat for that. WALA will take care of extension handling later on.

http://cloudinit.readthedocs.io/en/latest/topics/datasources/azure.html#walinuxagent
Although there is also:
https://github.com/Azure/WALinuxAgent/blob/master/config/ubuntu/waagent.conf#L8-L9

Thanks!

Comment 18 Yuxin Sun 2017-09-07 02:58:55 UTC
Hi Paul Meyer,

We open this issue because this is a "possible" but not a "must" scenario. The WALA and cloud-init packages are not conflict, which means customers can choose to use WALA or cloud-init to provision the VM(in other words, customer probably don't know or forget there's cloud-init in there image if the cloud-init service is disabled). Although we expect that customer install cloud-init only if they enable it, we cannot guarantee that. 

Currently, because of this issue, WALA skips provisioning even if "Provisioning.Enabled=y" "Provisioning.UseCloudInit=n" in waagent.conf and cloud-init service is disabled. 

Thanks!

Comment 26 Ryan McCabe 2017-11-26 19:40:02 UTC
*** Bug 1516941 has been marked as a duplicate of this bug. ***

Comment 36 Yuxin Sun 2018-01-03 08:25:28 UTC
Verify with cloud-init-0.7.9-19 in RHEL-7.5-20171215.0 in Azure. Result: Pass.

Comment 39 errata-xmlrpc 2018-04-10 14:05:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0806


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