Change location of DHCP leases in CloudStack provider as it doesn't work for RHEL8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| cloud-init |
Medium
|
Ryan Harper |
Bug Description
Cloud-init is failing to get Virtual Router IP of CloudStack provider on RHEL8 because default path used on this part of code:
https:/
is changed to /var/lib/
To fix the problem it probably will worth to try to change code in file above to one like on this section of the code: https:/
Related branches
- Scott Moser: Needs Information on 2019-09-11
- Server Team CI bot: Approve (continuous-integration) on 2019-09-11
- Dan Watkins: Approve on 2019-09-11
-
Diff: 12 lines (+1/-0)1 file modifiedsystemd/cloud-init.service.tmpl (+1/-0)
Marat Salakhutdinov (maratsal) wrote : | #1 |
description: | updated |
Dan Watkins (daniel-thewatkins) wrote : | #2 |
Hi Marat,
Thanks for filing this bug! Could you run `cloud-init collect-logs` on a failing instance and attach the produced tarball to this bug, please? This will give us enough information to effectively triage the issue. Once you've done so, please move the status back to New.
Thanks!
Dan
Changed in cloud-init: | |
status: | New → Incomplete |
Marat Salakhutdinov (maratsal) wrote : | #3 |
attaching cloud-init logs
Changed in cloud-init: | |
status: | Incomplete → New |
Marat Salakhutdinov (maratsal) wrote : Re: [Bug 1843334] Re: Change location of DHCP leases in CloudStack provider as it doesn't work for RHEL8 | #4 |
Hi Dan,
Forgot to set it to new after uploading logs but you have already done it
just recently :)
Please let me know if you need any additional details.
Thanks.
Marat
On Tue, Sep 10, 2019 at 13:35 Dan Watkins <email address hidden>
wrote:
> Hi Marat,
>
> Thanks for filing this bug! Could you run `cloud-init collect-logs` on
> a failing instance and attach the produced tarball to this bug, please?
> This will give us enough information to effectively triage the issue.
> Once you've done so, please move the status back to New.
>
>
> Thanks!
>
> Dan
>
> ** Changed in: cloud-init
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Change location of DHCP leases in CloudStack provider as it doesn't
> work for RHEL8
>
> Status in cloud-init:
> Incomplete
>
> Bug description:
> Cloud-init is failing to get Virtual Router IP of CloudStack provider on
> RHEL8 because default path used on this part of code:
>
> https:/
>
> is changed to /var/lib/
>
> To fix the problem it probably will worth to try to change code in
> file above to one like on this section of the code:
> https:/
>
> init/blob/
>
> To manage notifications about this bug go to:
> https:/
>
--
Marat Salakhutdinov
tel. +1 514 823 9005
e-mail: <email address hidden>
Ryan Harper (raharper) wrote : | #5 |
Thanks for the logs. What is see is:
1) cloud-init generates a fallback networking config 'dhcp on eth0' which is rendered as sysconfig:
2019-09-10 20:00:38,606 - stages.py[INFO]: Applying network configuration from fallback bringup=False: {'config': [{'type': 'physical', 'name': 'eth0', 'mac_address': '02:00:
2019-09-10 20:00:38,607 - __init__.py[DEBUG]: Selected renderer 'sysconfig' from priority list: None
2019-09-10 20:00:38,610 - util.py[DEBUG]: Writing to /etc/sysconfig/
2019-09-10 20:00:38,613 - util.py[DEBUG]: Restoring selinux mode for /etc/sysconfig/
2) When cloud-init init runs after networking is supposed to be up, there is no DHCP lease in the NetworkManager path
2019-09-10 20:00:40,692 - handlers.py[DEBUG]: start: init-network/
2019-09-10 20:00:40,692 - __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.
2019-09-10 20:00:40,693 - DataSourceCloud
2019-09-10 20:00:40,693 - DataSourceCloud
LOoking at the journal, I can see that NetworkManager is loading the ifcfg-rh plugin which is supposed to support reading sysconfig files:
Sep 10 16:00:39.274968 centos-host NetworkManager[
And NetworkManager brings up eth0 with DHCP:
ep 10 16:00:39.277538 centos-host NetworkManager[
Sep 10 16:00:39.277571 centos-host NetworkManager[
Sep 10 16:00:39.281007 centos-host NetworkManager[
Sep 10 16:00:39.291088 centos-host NetworkManager[
Sep 10 16:00:39.291721 centos-host NetworkManager[
Sep 10 16:00:39.292362 centos-host NetworkManager[
Sep 10 16:00:39.293807 centos-host NetworkManager[
Sep 10 16:00:39.294565 centos-host nm-dispatcher[698]: req:1 'hostname': new request (3 scripts)
Sep 10 16:00:39.294577 centos-host nm-dispatcher[698]: req:1 'hostname': start running ordered scripts...
Sep 10 16:00:39.303417 centos-host NetworkManager[
Changed in cloud-init: | |
status: | New → Incomplete |
Marat Salakhutdinov (maratsal) wrote : | #6 |
I was thinking that problem in this line - https:/
That the problem with dhcp.networkd_
Then it falls to the second part of the function code https:/
2019-09-10 20:00:40,693 - DataSourceCloud
However after using your suggestion it works. So the name of the service is NetworkManager.
[root@centos-host ~]# systemctl status NetworkManager
● NetworkManager.
Loaded: loaded (/usr/lib/
Active: active (running) since Tue 2019-09-10 16:00:38 EDT; 19h ago
Docs: man:NetworkMana
Main PID: 687 (NetworkManager)
Tasks: 3 (limit: 5033)
Memory: 9.2M
CGroup: /system.
└─687 /usr/sbin/
.....
[root@centos-host ~]#
And after trying your suggestion to start cloud-init after NetworkManager it worked fine.
[root@centos-host cca-user]# cat /etc/systemd/
[Unit]
After=NetworkMa
[root@centos-host cca-user]#
Thanks for finding solution!
Changed in cloud-init: | |
status: | Incomplete → New |
Changed in cloud-init: | |
assignee: | nobody → Ryan Harper (raharper) |
importance: | Undecided → Medium |
status: | New → In Progress |
This bug is fixed with commit 8888ca1a to cloud-init on branch master.
To view that commit see the following URL:
https:/
Changed in cloud-init: | |
status: | In Progress → Fix Committed |
In my setup as a workaround I just replace default path to /var/lib/ NetworkManager on this part of code https:/ /github. com/number5/ cloud-init/ blob/07b17236be 5665bb552c74601 02bcd07bf8f2be8 /cloudinit/ net/dhcp. py#L24 on template creation process.