From 51b84b6001e90435aa76aa09a763edf8063ed085 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 10 Mar 2020 16:46:50 +0000 Subject: [PATCH] CentOS 8: seed VM & bifrost * Change default seed VM image to CentOS 8 * Change default bifrost deploy image to CentOS 8 * Workaround DIB bug https://bugs.launchpad.net/diskimage-builder/+bug/1866847 by setting DIB_DISABLE_KERNEL_CLEANUP to 1 * Install iptables on seed for SNAT - missing on CentOS 8 * Fix provider network MTU lookup for empty string * Bump stackhpc.libvirt-host to 1.7.0 for CentOS 8 support * Bump stackhpc.libvirt-vm to 1.13.0 for CentOS 8 support * Bump jriguera.configdrive for Python 3 support Change-Id: Ie0edf6a924a914395c6502e2d5cf1139bce14a48 Story: 2006574 Task: 39000 --- ansible/group_vars/all/bifrost | 8 ++++++-- ansible/group_vars/all/overcloud | 2 +- ansible/group_vars/all/seed-vm | 2 +- ansible/network.yml | 2 +- ansible/roles/snat/tasks/main.yml | 5 +++++ doc/source/configuration/bifrost.rst | 7 ++++--- etc/kayobe/bifrost.yml | 24 ++++++++++++++---------- etc/kayobe/seed-vm.yml | 3 ++- requirements.yml | 6 +++--- 9 files changed, 37 insertions(+), 22 deletions(-) diff --git a/ansible/group_vars/all/bifrost b/ansible/group_vars/all/bifrost index ce2fa2df2..c9c529e62 100644 --- a/ansible/group_vars/all/bifrost +++ b/ansible/group_vars/all/bifrost @@ -15,10 +15,10 @@ kolla_bifrost_source_version: "{{ openstack_branch }}" # Diskimage-builder configuration. # DIB base OS element. -kolla_bifrost_dib_os_element: "centos7" +kolla_bifrost_dib_os_element: "centos" # DIB image OS release. -kolla_bifrost_dib_os_release: "GenericCloud" +kolla_bifrost_dib_os_release: "8" # List of default DIB elements. kolla_bifrost_dib_elements_default: @@ -38,6 +38,10 @@ kolla_bifrost_dib_init_element: "cloud-init-datasources" # DIB default environment variables. kolla_bifrost_dib_env_vars_default: DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive" + # FIXME(mgoddard): DIB fails when cleaning up old kernels if the host running + # DIB is not running the latest available kernel. Skip this cleanup as a + # workaround. https://bugs.launchpad.net/diskimage-builder/+bug/1866847 + DIB_DISABLE_KERNEL_CLEANUP: 1 # DIB additional environment variables. kolla_bifrost_dib_env_vars_extra: {} diff --git a/ansible/group_vars/all/overcloud b/ansible/group_vars/all/overcloud index e01e1ed49..7383833b7 100644 --- a/ansible/group_vars/all/overcloud +++ b/ansible/group_vars/all/overcloud @@ -8,7 +8,7 @@ overcloud_group_default: controllers # List of names of Ansible groups for overcloud hosts. overcloud_groups: > - {{ (list(overcloud_group_hosts_map) + + {{ (overcloud_group_hosts_map | list + [overcloud_group_default]) | reject('equalto', 'ignore') | unique | sort | list }} # Dict mapping overcloud Ansible group names to lists of hosts in the group. diff --git a/ansible/group_vars/all/seed-vm b/ansible/group_vars/all/seed-vm index 828ca6dd2..2b113ebfc 100644 --- a/ansible/group_vars/all/seed-vm +++ b/ansible/group_vars/all/seed-vm @@ -41,7 +41,7 @@ seed_vm_root_capacity: 50G seed_vm_root_format: qcow2 # Base image for the seed VM root volume. -seed_vm_root_image: "https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2" +seed_vm_root_image: "https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2" # Capacity of the seed VM data volume. seed_vm_data_capacity: 100G diff --git a/ansible/network.yml b/ansible/network.yml index 2db2ffe10..1056d51c3 100644 --- a/ansible/network.yml +++ b/ansible/network.yml @@ -96,7 +96,7 @@ # interfaces with an explicit MTU set will be taken account of. If no # interface has an explicit MTU set, then the corresponding veth will # not either. - mtu_list: "{{ [veth_bridge_mtu_map.get(interface), item | net_mtu] | reject('none') | list }}" + mtu_list: "{{ [veth_bridge_mtu_map.get(interface), item | net_mtu] | select | map('int') | list }}" mtu: "{{ mtu_list | max if mtu_list | length > 0 else None }}" - name: Update a fact containing veth interfaces diff --git a/ansible/roles/snat/tasks/main.yml b/ansible/roles/snat/tasks/main.yml index 1ddb3aff6..ef9849ac4 100644 --- a/ansible/roles/snat/tasks/main.yml +++ b/ansible/roles/snat/tasks/main.yml @@ -1,4 +1,9 @@ --- +- name: Ensure iptables is installed + package: + name: iptables + become: true + # iptables -t nat -A POSTROUTING -o {{ interface }} -j SNAT --to-source {{ source_ip }} - name: Ensure SNAT iptables rules exist iptables: diff --git a/doc/source/configuration/bifrost.rst b/doc/source/configuration/bifrost.rst index a8673a716..dbb73fbdb 100644 --- a/doc/source/configuration/bifrost.rst +++ b/doc/source/configuration/bifrost.rst @@ -52,9 +52,9 @@ configuration drive built by Bifrost, rather than the Bifrost default of :diskimage-builder-doc:`simple-init `. ``kolla_bifrost_dib_os_element`` - DIB base OS element. Default is ``centos7``. + DIB base OS element. Default is ``centos``. ``kolla_bifrost_dib_os_release`` - DIB image OS release. Default is ``GenericCloud``. + DIB image OS release. Default is ``8``. ``kolla_bifrost_dib_elements_default`` *Added in the Train release. Use kolla_bifrost_dib_elements in earlier releases.* @@ -78,7 +78,8 @@ configuration drive built by Bifrost, rather than the Bifrost default of releases.* DIB default environment variables. Default is - ``{"DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive"}``. + ``{"DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", + "DIB_DISABLE_KERNEL_CLEANUP": 1}``. ``kolla_bifrost_dib_env_vars_extra`` *Added in the Train release. Use kolla_bifrost_dib_env_vars in earlier releases.* diff --git a/etc/kayobe/bifrost.yml b/etc/kayobe/bifrost.yml index 60254d2d2..61710b5e4 100644 --- a/etc/kayobe/bifrost.yml +++ b/etc/kayobe/bifrost.yml @@ -14,34 +14,38 @@ ############################################################################### # Diskimage-builder configuration. -# DIB base OS element. +# DIB base OS element. Default is "centos". #kolla_bifrost_dib_os_element: -# DIB image OS release. +# DIB image OS release. Default is "8". #kolla_bifrost_dib_os_release: -# List of default DIB elements. +# List of default DIB elements. Default is ["disable-selinux", +# "enable-serial-console", "vm"]. #kolla_bifrost_dib_elements_default: -# List of additional DIB elements. +# List of additional DIB elements. Default is none. #kolla_bifrost_dib_elements_extra: -# List of DIB elements. +# List of DIB elements. Default is a combination of +# kolla_bifrost_dib_elements_default and kolla_bifrost_dib_elements_extra. #kolla_bifrost_dib_elements: -# DIB init element. +# DIB init element. Default is "cloud-init-datasources". #kolla_bifrost_dib_init_element: -# DIB default environment variables. +# DIB default environment variables. Default is {"DIB_CLOUD_INIT_DATASOURCES": +# "ConfigDrive", "DIB_DISABLE_KERNEL_CLEANUP": 1}. #kolla_bifrost_dib_env_vars_default: -# DIB additional environment variables. +# DIB additional environment variables. Default is none. #kolla_bifrost_dib_env_vars_extra: -# DIB environment variables. +# DIB environment variables. Default is combination of +# kolla_bifrost_dib_env_vars_default and kolla_bifrost_dib_env_vars_extra. #kolla_bifrost_dib_env_vars: -# List of DIB packages to install. +# List of DIB packages to install. Default is to install no extra packages. #kolla_bifrost_dib_packages: ############################################################################### diff --git a/etc/kayobe/seed-vm.yml b/etc/kayobe/seed-vm.yml index 897fe49b8..4e33cb01e 100644 --- a/etc/kayobe/seed-vm.yml +++ b/etc/kayobe/seed-vm.yml @@ -23,7 +23,8 @@ # Format of the seed VM root volume. #seed_vm_root_format: -# Base image for the seed VM root volume. +# Base image for the seed VM root volume. Default is +# "https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2". #seed_vm_root_image: # Capacity of the seed VM data volume. diff --git a/requirements.yml b/requirements.yml index 17baff303..d08b92a3e 100644 --- a/requirements.yml +++ b/requirements.yml @@ -3,7 +3,7 @@ version: 1.3.1 - src: jriguera.configdrive # There are no versioned releases of this role. - version: 6b5f1d55bc3f27fa2855d8dd59b5c224d160d806 + version: a5c3c19d0cda7b6960c9200a30b5dbe73d2eef96 - src: MichaelRigart.interfaces version: v1.4.0 - src: mrlesmithjr.manage-lvm @@ -24,9 +24,9 @@ - src: stackhpc.grafana-conf version: 1.1.0 - src: stackhpc.libvirt-host - version: v1.3.1 + version: v1.7.0 - src: stackhpc.libvirt-vm - version: v1.10.0 + version: v1.13.0 - src: stackhpc.mellanox-switch version: v1.0.0 - src: stackhpc.os-images