[cloud-init] "/etc/resolv.conf" is out of control of netconfig after done cloud-init GOSC on SLES15SP1

Bug #1863203 reported by Cuixiang Zhang
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
Unassigned

Bug Description

[cloud-init] "/etc/resolv.conf" is out of control of netconfig after done cloud-init GOSC on SLES15SP1

Before GOSC, "/etc/resolv.conf" is link file "/run/netconfig/resolv.conf", in control by netconfig. After done cloud-init GOSC, this file become real file not link file, total different from "/run/netconfig/resolv.conf".

cloud-init version is 19.4.
```
pek2-gosv-16-dhcp83:~ # cloud-init -v
/usr/bin/cloud-init 19.4
```

Before GOSC:
```
pek2-gosv-16-dhcp83:~ # ll /etc/resolv.conf
lrwxrwxrwx 1 root root 26 Feb 10 23:33 /etc/resolv.conf -> /run/netconfig/resolv.conf
```

After GOSC:
```
pek2-gosv-16-dhcp83:~ # ll /etc/resolv.conf
-rw-r--r-- 1 root root 153 Feb 11 09:46 /etc/resolv.conf
pek2-gosv-16-dhcp83:~ # ll /run/netconfig/resolv.conf
-rw-r--r-- 1 root root 707 Feb 14 06:10 /run/netconfig/resolv.conf

```

cloud-init.log is attached.

Steps:
1. Deploy SLES15SP1 VM
2. Power off VM and Deploy GOSC
```
2020-02-11 08:46:34,797 - config_file.py[DEBUG]: FOUND CATEGORY = 'NETWORK'
2020-02-11 08:46:34,797 - config_file.py[DEBUG]: ADDED KEY-VAL :: 'NETWORK|NETWORKING' = 'yes'
2020-02-11 08:46:34,797 - config_file.py[DEBUG]: ADDED KEY-VAL :: 'NETWORK|BOOTPROTO' = 'dhcp'
2020-02-11 08:46:34,797 - config_file.py[DEBUG]: ADDED KEY-VAL :: 'NETWORK|HOSTNAME' = 'gosc-dhcp-vm-01'
2020-02-11 08:46:34,797 - config_file.py[DEBUG]: ADDED KEY-VAL :: 'NETWORK|DOMAINNAME' = 'eng.vmware.com'
...

```
3. Power on VM and check GOSC resolve, expect /etc/resolv.conf is still link to /run/netconfig/resolv.conf and DNS setting is saved into this file.

Revision history for this message
Cuixiang Zhang (cuixiangz) wrote :
Revision history for this message
Pengpeng Sun (pengpengs) wrote :

Found on VMware platform, loaded DatasourceOVF.
VMware internal bug number is: 2508900

Revision history for this message
Dan Watkins (oddbloke) wrote :

Thanks for using cloud-init and for taking the time to file this bug! Could you run `cloud-init collect-logs` on an affected instance and attach the tarball it produces to this bug, please? Once you've done that, please move it back to New.

Thanks!

Dan

Changed in cloud-init:
status: New → Incomplete
Revision history for this message
Cuixiang Zhang (cuixiangz) wrote :

full cloud-init log is attached.

BRs,
Cuixiang Zhang

Revision history for this message
Ryan Harper (raharper) wrote :

Hi,

Thanks for the logs. cloud-init does not currently render network config on SuSE in such a way that integrates with netconfig from SuSE. Some background and discussion happened in this bug, in particular this comment:

https://bugs.launchpad.net/cloud-init/+bug/1843634/comments/9

At this time, if you specify static DNS configuration in cloud-init's network-config, cloud-init will create a resolv.conf with the expected values from the config and will effectively disable netconf management of resolv.conf.

Changed in cloud-init:
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Xiaofeng Wang (xiaofengw) wrote :

Hi Ryan,
Is there any plan to write the settings into netconfig file: /etc/sysconfig/network/config?

Revision history for this message
Dan Watkins (oddbloke) wrote :

This isn't currently queued for implementation by the Canonical cloud-init team, but we would happily accept contributions that addressed it.

Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.