Bug 1391437

Summary: [Docs][Instances and Images] Correct errors in the cloud-init configuration information
Product: Red Hat OpenStack Reporter: Marko Myllynen <myllynen>
Component: documentationAssignee: Lukas Ruzicka <lruzicka>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kovar <pkovar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0 (Mitaka)CC: lars, lbopf, myllynen, srevivo
Target Milestone: asyncKeywords: Documentation
Target Release: 9.0 (Mitaka)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-10 13:57:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Marko Myllynen 2016-11-03 10:33:31 UTC
Description of problem:
https://access.redhat.com/documentation/en/red-hat-openstack-platform/9/paged/instances-and-images-guide/chapter-1-image-service says:

1.2.1.2.1. Create a Red Hat Enterprise Linux 7 Image
...
9.  Edit the /etc/cloud/cloud.cfg configuration file and under cloud_init_modules add:

- resolv-conf

The resolv-conf option automatically configures the resolv.conf when an instance boots for the first time. This file contains information related to the instance such as nameservers, domain and other options.
"

But when checking cloud-init logs with this change we see:

/var/log/cloud-init-output.log:2016-11-03 12:22:36,796 - importer.py[DEBUG]: Looking for modules ['cc_resolv_conf', 'cloudinit.config.cc_resolv_conf'] that have attributes ['handle']
/var/log/cloud-init-output.log:2016-11-03 12:22:36,796 - importer.py[DEBUG]: Failed at attempted import of 'cc_resolv_conf' due to: No module named cc_resolv_conf
/var/log/cloud-init-output.log:2016-11-03 12:22:36,834 - importer.py[DEBUG]: Found cc_resolv_conf with attributes ['handle'] in ['cloudinit.config.cc_resolv_conf']
/var/log/cloud-init-output.log:2016-11-03 12:22:37,628 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/iid-datasource-none/sem/config_resolv_conf - wb: [420] 19 bytes
/var/log/cloud-init-output.log:2016-11-03 12:22:37,633 - helpers.py[DEBUG]: Running config-resolv-conf using lock (<FileLock using file '/var/lib/cloud/instances/iid-datasource-none/sem/config_resolv_conf'>)
/var/log/cloud-init-output.log:2016-11-03 12:22:37,633 - cc_resolv_conf.py[DEBUG]: Skipping module named resolv-conf, no 'manage_resolv_conf' key in configuration

Also, it should be explained when this is needed if DHCP is already in use.

Comment 1 Lucy Bopf 2016-12-21 08:04:03 UTC
Assigning to Lukas for review.

Lukas, you may need to request more information about what changes are required here.

Comment 10 Lukas Ruzicka 2017-01-10 13:57:28 UTC
The changes are being merged with the master branch.