Remove CentOS 7 image resolv.conf workaround
This workaround is no longer needed for current CentOS 8 images as resolv.conf file comes now empty. Moreover, the workaround has been preventing seed host configure from running successfully on Ubuntu hosts. Change-Id: I30e34e3c58db3f3a93a07f3d6d53671286e4260e
This commit is contained in:
parent
c01099c07f
commit
914d61d83b
@ -18,14 +18,3 @@ overcloud_group_hosts_map: {}
|
||||
|
||||
# To prevent some network issues you can choose to disable cloud-init
|
||||
disable_cloud_init: False
|
||||
|
||||
###############################################################################
|
||||
# Overcloud host image configuration.
|
||||
|
||||
# The CentOS cloud images have a bogus name server entry in /etc/resolv.conf,
|
||||
# 192.168.122.1. Cloud-init only appends name server entries to this file, and
|
||||
# will not remove this bogus entry. Typically this leads to a delay of around
|
||||
# 30 seconds when connecting via SSH, due to a timeout in NSS. The workaround
|
||||
# employed here is to remove this bogus entry from the image using
|
||||
# virt-customize, if it exists. See https://bugs.centos.org/view.php?id=14369.
|
||||
overcloud_host_image_workaround_resolv_enabled: True
|
||||
|
@ -1,35 +0,0 @@
|
||||
---
|
||||
# The CentOS cloud images have a bogus name server entry in /etc/resolv.conf,
|
||||
# 192.168.122.1. Cloud-init only appends name server entries to this file, and
|
||||
# will not remove this bogus entry. Typically this leads to a delay of around
|
||||
# 30 seconds when connecting via SSH, due to a timeout in NSS. The workaround
|
||||
# employed here is to remove this bogus entry from the image using
|
||||
# virt-customize, if it exists. See https://bugs.centos.org/view.php?id=14369.
|
||||
|
||||
- name: Ensure the overcloud host image has bogus name server entries removed
|
||||
hosts: seed
|
||||
tags:
|
||||
- overcloud-host-image-workaround
|
||||
tasks:
|
||||
- block:
|
||||
- name: Ensure libguestfs-tools is installed
|
||||
command: >
|
||||
docker exec bifrost_deploy
|
||||
bash -c '
|
||||
ansible localhost
|
||||
--connection local
|
||||
--become
|
||||
-m dnf
|
||||
-a "name=libgcrypt,libgcrypt-devel,libguestfs-tools state=present"'
|
||||
|
||||
- name: Ensure the overcloud host image has bogus name server entries removed
|
||||
command: >
|
||||
docker exec bifrost_deploy
|
||||
bash -c '
|
||||
export LIBGUESTFS_BACKEND=direct &&
|
||||
ansible localhost
|
||||
--connection local
|
||||
--become
|
||||
-m command
|
||||
-a "virt-customize -a /httpboot/deployment_image.qcow2 --edit \"/etc/resolv.conf:s/^nameserver .*\..*\..*\..*\$//\""'
|
||||
when: overcloud_host_image_workaround_resolv_enabled | bool
|
@ -16,17 +16,6 @@
|
||||
# To prevent some network issues you can choose to disable cloud-init
|
||||
#disable_cloud_init:
|
||||
|
||||
###############################################################################
|
||||
# Overcloud host image configuration.
|
||||
|
||||
# The CentOS cloud images have a bogus name server entry in /etc/resolv.conf,
|
||||
# 192.168.122.1. Cloud-init only appends name server entries to this file, and
|
||||
# will not remove this bogus entry. Typically this leads to a delay of around
|
||||
# 30 seconds when connecting via SSH, due to a timeout in NSS. The workaround
|
||||
# employed here is to remove this bogus entry from the image using
|
||||
# virt-customize, if it exists. See https://bugs.centos.org/view.php?id=14369.
|
||||
#overcloud_host_image_workaround_resolv_enabled:
|
||||
|
||||
###############################################################################
|
||||
# Dummy variable to allow Ansible to accept this file.
|
||||
workaround_ansible_issue_8743: yes
|
||||
|
@ -694,7 +694,6 @@ class SeedServiceDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
|
||||
* Configures the bifrost service.
|
||||
* Deploys the bifrost container using kolla-ansible.
|
||||
* Builds disk images for the overcloud hosts using Diskimage Builder (DIB).
|
||||
* Performs a workaround in the overcloud host image to fix resolv.conf.
|
||||
* Configures ironic inspector introspection rules in the bifrost inspector
|
||||
service.
|
||||
* When enabled, configures a Bare Metal Provisioning (BMP) environment for
|
||||
@ -711,7 +710,6 @@ class SeedServiceDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
|
||||
|
||||
self.run_kolla_ansible_seed(parsed_args, "deploy-bifrost")
|
||||
playbooks = _build_playbook_list(
|
||||
"overcloud-host-image-workaround-resolv",
|
||||
"seed-introspection-rules",
|
||||
"dell-switch-bmp")
|
||||
self.run_kayobe_playbooks(parsed_args, playbooks)
|
||||
@ -727,7 +725,6 @@ class SeedServiceUpgrade(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
|
||||
* Prepares the bifrost service for an upgrade.
|
||||
* Deploys the bifrost container using kolla-ansible.
|
||||
* Builds disk images for the overcloud hosts using Diskimage Builder (DIB).
|
||||
* Performs a workaround in the overcloud host image to fix resolv.conf.
|
||||
* Configures ironic inspector introspection rules in the bifrost inspector
|
||||
service.
|
||||
* When enabled, configures a Bare Metal Provisioning (BMP) environment for
|
||||
@ -747,7 +744,6 @@ class SeedServiceUpgrade(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
|
||||
self.run_kayobe_playbooks(parsed_args, playbooks)
|
||||
self.run_kolla_ansible_seed(parsed_args, "upgrade-bifrost")
|
||||
playbooks = _build_playbook_list(
|
||||
"overcloud-host-image-workaround-resolv",
|
||||
"seed-introspection-rules",
|
||||
"dell-switch-bmp")
|
||||
self.run_kayobe_playbooks(parsed_args, playbooks)
|
||||
|
@ -798,8 +798,6 @@ class TestCase(unittest.TestCase):
|
||||
mock.call(
|
||||
mock.ANY,
|
||||
[
|
||||
utils.get_data_files_path(
|
||||
"ansible", "overcloud-host-image-workaround-resolv.yml"), # noqa
|
||||
utils.get_data_files_path(
|
||||
"ansible", "seed-introspection-rules.yml"),
|
||||
utils.get_data_files_path(
|
||||
@ -855,9 +853,6 @@ class TestCase(unittest.TestCase):
|
||||
mock.call(
|
||||
mock.ANY,
|
||||
[
|
||||
utils.get_data_files_path(
|
||||
"ansible",
|
||||
"overcloud-host-image-workaround-resolv.yml"),
|
||||
utils.get_data_files_path(
|
||||
"ansible",
|
||||
"seed-introspection-rules.yml"),
|
||||
|
@ -14,10 +14,6 @@ kolla_ansible_source_version: "{{ zuul.projects['opendev.org/openstack/kolla-ans
|
||||
kolla_openstack_logging_debug: True
|
||||
pip_upper_constraints_file: "/tmp/upper-constraints.txt"
|
||||
|
||||
# NOTE(mgoddard): We're using a cirros image, which doesn't require the
|
||||
# resolv.conf work around used for CentOS.
|
||||
overcloud_host_image_workaround_resolv_enabled: false
|
||||
|
||||
# Use the CI infra's PyPI mirror.
|
||||
pip_local_mirror: true
|
||||
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
|
||||
|
@ -18,6 +18,7 @@ kolla_openstack_logging_debug: True
|
||||
|
||||
# NOTE(mgoddard): We're using a cirros image, which doesn't require the
|
||||
# resolv.conf work around used for CentOS.
|
||||
# NOTE(piotrp): to be removed after Wallaby is released
|
||||
overcloud_host_image_workaround_resolv_enabled: false
|
||||
|
||||
# Use the CI infra's PyPI mirror.
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Removes the workaround for bogus name server entries in some CentOS 7
|
||||
images, together with the ``overcloud_host_image_workaround_resolv_enabled``
|
||||
variable.
|
Loading…
Reference in New Issue
Block a user