canonical / canonical/cloud-init

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

Open
#3,606 7 comments 0 reactions 0 assignees View on GitHub
bug launchpad
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

This bug was originally filed in Launchpad as [LP: #1863203](https://bugs.launchpad.net/cloud-init/+bug/1863203)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2020-02-14T05:13:26.328035+00:00
date_fix_committed = None
date_fix_released = None
id = 1863203
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1863203
milestone = None
owner = cuixiangz
owner_name = Cuixiang Zhang
private = False
status = triaged
submitter = cuixiangz
submitter_name = Cuixiang Zhang
tags = []
duplicates = []

_Launchpad user **Cuixiang Zhang(cuixiangz)** wrote on 2020-02-14T05:13:26.328035+00:00_

[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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.