cloud-init re-generates network config every reboot overwriting manual admin changes on CentOS.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Undecided
|
Unassigned | ||
cloud-init |
Fix Released
|
Medium
|
Unassigned | ||
maas-images |
Fix Released
|
Undecided
|
Lee Trager |
Bug Description
Using MAAS 2.2.2 and newest CentOS image that uses cloud-init cloud-init-
The configuration created was:
[centos@withkvm ~]$ cat /etc/sysconfig/
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth0
HWADDR=
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
I changed that to do:
[centos@withkvm ~]$ cat /etc/sysconfig/
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=static
DEVICE=eth0
HWADDR=
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPADDR=
NETMASK=
GATEWAY=
However, after I reboot, the network config is changed:
[centos@withkvm ~]$ sudo cat /etc/sysconfig/
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth0
HWADDR=
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Related bugs:
* bug 1782315: cloud-init blocks the boot process if it can't reach its MAAS datasource
Related branches
- Chad Smith: Approve
- Server Team CI bot: Approve (continuous-integration)
- Ryan Harper: Needs Fixing
-
Diff: 170 lines (+86/-21)2 files modifiedcloudinit/sources/DataSourceMAAS.py (+40/-14)
tests/unittests/test_datasource/test_maas.py (+46/-7)
summary: |
cloud-init re-generates network config every reboot overwriting manual - admin changes + admin changes on CentOS. |
description: | updated |
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in cloud-init: | |
status: | Confirmed → Fix Committed |
description: | updated |
Changed in maas-images: | |
status: | New → Fix Released |
Adding MAAS for tracking, as this was seen via maas testing affecting production environments.