Bug 1537439
| Summary: | cloud-init with config drive does not populate dns information correctly [rhel-7.4.z] | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Oneata Mircea Teodor <toneata> |
| Component: | cloud-init | Assignee: | Ryan McCabe <rmccabe> |
| Status: | CLOSED ERRATA | QA Contact: | Udi Shkalim <ushkalim> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.3 | CC: | aherr, akaris, apannu, dustymabe, fdinitto, jgreguske, jherrman, lars, oblaut, rmccabe, ssigwald, swadeley, ushkalim, vhutsky, wrichter |
| Target Milestone: | rc | Keywords: | Triaged, ZStream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | cloud-init-0.7.9-9.el7_4.3 | Doc Type: | Bug Fix |
| Doc Text: |
Prior to this update, the cloud-init service in some cases did not provide newly created virtual machines with appropriate DNS configuration. The underlying code has been fixed, which prevents this problem from occurring.
|
Story Points: | --- |
| Clone Of: | 1454491 | Environment: | |
| Last Closed: | 2018-03-06 21:44:01 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1454491 | ||
| Bug Blocks: | |||
|
Description
Oneata Mircea Teodor
2018-01-23 08:35:37 UTC
Verified on: cloud-init-0.7.9-9.el7_4.3.x86_64
$ cat user_data
#cloud-config
password: fedora
chpasswd: { expire: False }
openstack subnet show d1d03149-a6bc-4022-ab5a-16763098752b
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| allocation_pools | 192.168.100.2-192.168.100.254 |
| cidr | 192.168.100.0/24 |
| created_at | 2018-02-06T14:39:21Z |
| description | |
| dns_nameservers | 10.35.28.28 |
| enable_dhcp | False |
| gateway_ip | 192.168.100.1 |
| host_routes | |
| id | d1d03149-a6bc-4022-ab5a-16763098752b |
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| name | internal-subnet |
| network_id | 5682affc-7cd8-4413-b824-eccfafd02426 |
| project_id | 9ba3b3f772a849c8b709644c894bc85e |
| revision_number | 3 |
| segment_id | None |
| service_types | |
| subnetpool_id | None |
| tags | |
| updated_at | 2018-02-08T14:54:38Z |
+-------------------+--------------------------------------+
openstack server create --image fedora27 --flavor m1.med --nic net-id=$(openstack network show -c id -f value internal-net) fedora-$(echo $RANDOM) --user-data user_data --config-drive True
###################### Inside the instance ########################
[fedora@cirros-17255 ~]$ cat /etc/NetworkManager/conf.d/99-cloud-init.conf
# Created by cloud-init on instance boot automatically, do not edit.
#
[main]
dns = none
[fedora@cirros-17255 ~]$ cat /etc/resolv.conf
; Created by cloud-init on instance boot automatically, do not edit.
;
nameserver 10.35.28.28
search localdomain
[fedora@cirros-17255 ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=static
DEFROUTE=yes
DEVICE=eth0
GATEWAY=192.168.100.1
HWADDR=fa:16:3e:7d:62:01
IPADDR=192.168.100.4
MTU=1450
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
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/RHBA-2018:0407 |