Add CentOS Stream 9 preview support

CentOS is publishing some preview composes of CentOS Stream 9. In RDO,
we are working to get ready for it ASAP.

This patch is proposing some changes needed for current status of
CentOS9 so that i can use this patch for it:

- Set rsync to be executed without xinetd (xinetd is not in CS9)
- Added the creation of initiatorname.iscsi using openstacklib::iscsid

It's also creating packstack-centos9 and packstack-multinode-centos9
base jobs so that we can start running packstack jobs in third-party
zuul servers.

Change-Id: I64edd1876ccc32f98ab2330024d9ab513f42a158
This commit is contained in:
Joel Capitao 2021-06-07 17:51:34 +02:00 committed by Alfredo Moralejo
parent 6479d15382
commit 8a5700cd1e
7 changed files with 74 additions and 9 deletions

View File

@ -60,6 +60,16 @@
label: centos-8-stream
run: playbooks/packstack-integration-tempest.yaml
- job:
name: packstack-centos9
parent: packstack-base
vars:
selinux_enforcing: "false"
delorean: "https://trunk.rdoproject.org/centos9-master/current/delorean.repo"
delorean_deps: "https://trunk.rdoproject.org/centos9-master/delorean-deps.repo"
pre-run: playbooks/packstack-centos9-pre.yaml
run: playbooks/packstack-integration-tempest.yaml
- job:
name: packstack-multinode-centos8s
parent: packstack-base
@ -76,6 +86,17 @@
label: centos-8-stream
run: playbooks/packstack-multinode.yaml
- job:
name: packstack-multinode-centos9
parent: packstack-base
vars:
selinux_enforcing: "false"
delorean: "https://trunk.rdoproject.org/centos9-master/current/delorean.repo"
delorean_deps: "https://trunk.rdoproject.org/centos9-master/delorean-deps.repo"
pre-run: playbooks/packstack-centos9-pre.yaml
post-run: playbooks/packstack-post-compute.yaml
run: playbooks/packstack-multinode.yaml
- job:
name: packstack-centos8s-integration-scenario001
parent: packstack-centos8s

View File

@ -7,9 +7,17 @@ class packstack::swift::ringbuilder ()
require => Class['swift'],
}
# sets up an rsync db that can be used to sync the ring DB
class { 'swift::ringserver':
local_net_ip => hiera('CONFIG_STORAGE_HOST_URL'),
if ($::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '9') == 0) {
# sets up an rsync db that can be used to sync the ring DB
class { 'swift::ringserver':
local_net_ip => hiera('CONFIG_STORAGE_HOST_URL'),
rsync_use_xinetd => false,
}
} else {
# sets up an rsync db that can be used to sync the ring DB
class { 'swift::ringserver':
local_net_ip => hiera('CONFIG_STORAGE_HOST_URL'),
}
}
if str2bool($::selinux) {

View File

@ -32,6 +32,10 @@ if hiera('CONFIG_VMWARE_BACKEND') == 'y' {
include 'packstack::nova::compute::libvirt'
}
if hiera('CONFIG_CINDER_INSTALL') == 'y' {
include 'openstacklib::iscsid'
}
if hiera('CONFIG_CINDER_INSTALL') == 'y' and
hiera('CONFIG_VMWARE_BACKEND') != 'y' {
if 'nfs' in hiera_array('CONFIG_CINDER_BACKEND') {

View File

@ -39,6 +39,7 @@ if hiera('CONFIG_GLANCE_INSTALL') == 'y' {
}
if hiera('CONFIG_CINDER_INSTALL') == 'y' {
include 'openstacklib::iscsid'
include 'packstack::keystone::cinder'
include 'packstack::cinder::rabbitmq'
include 'packstack::cinder'

View File

@ -0,0 +1,27 @@
- hosts: all
name: packstack-centos9-pre
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
cp -pr {{ ansible_user_dir }}/src/opendev.org/x/packstack {{ ansible_user_dir }}/workspace
- shell:
cmd: |
set -e
set -x
rm -rf /etc/yum.repos.d/delorean*
# Remove epel repos
rm -rf /etc/yum.repos.d/epel*
dnf clean all
sudo sed -i '/^exclude.*/d' /etc/dnf/dnf.conf
dnf -y install libxml2-devel libxslt-devel ruby-devel zlib-devel
dnf -y install gcc gettext diffstat doxygen patch patchutils subversion systemtap git python3-setuptools wget redhat-lsb-core python3-libselinux virt-what yum
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
become: true
environment: '{{ zuul }}'

View File

@ -13,7 +13,7 @@
- shell:
cmd: |
source /home/zuul/src/opendev.org/x/packstack/tools/copy-logs.sh
source {{ ansible_user_dir }}/src/opendev.org/x/packstack/tools/copy-logs.sh
recover_default_logs
mv /tmp/logs/* /tmp/compute
mv /tmp/compute /tmp/logs

View File

@ -163,7 +163,7 @@ $SUDO $PKG_MGR -y install puppet \
openstack-selinux \
policycoreutils \
rubygems \
wget \
curl \
gettext \
diffstat \
doxygen \
@ -210,14 +210,14 @@ if [ -f ~/cache/files/cirros-$CIRROS_VERSION-$CIRROS_ARCH-uec.tar.gz ]; then
tar -xzvf ~/cache/files/cirros-$CIRROS_VERSION-$CIRROS_ARCH-uec.tar.gz -C /tmp/cirros/
else
echo "No pre-cached uec archive found, downloading..."
wget --tries=10 https://download.cirros-cloud.net/$CIRROS_VERSION/cirros-$CIRROS_VERSION-$CIRROS_ARCH-uec.tar.gz -P /tmp/cirros/
curl -Lo /tmp/cirros/cirros-$CIRROS_VERSION-$CIRROS_ARCH-uec.tar.gz --retry 10 https://download.cirros-cloud.net/$CIRROS_VERSION/cirros-$CIRROS_VERSION-$CIRROS_ARCH-uec.tar.gz
tar -xzvf /tmp/cirros/cirros-$CIRROS_VERSION-$CIRROS_ARCH-uec.tar.gz -C /tmp/cirros/
fi
if [ -f ~/cache/files/cirros-$CIRROS_VERSION-$CIRROS_ARCH-disk.img ]; then
cp -p ~/cache/files/cirros-$CIRROS_VERSION-$CIRROS_ARCH-disk.img /tmp/cirros/
else
echo "No pre-cached disk image found, downloading..."
wget --tries=10 https://download.cirros-cloud.net/$CIRROS_VERSION/cirros-$CIRROS_VERSION-$CIRROS_ARCH-disk.img -P /tmp/cirros/
curl -Lo /tmp/cirros/cirros-$CIRROS_VERSION-$CIRROS_ARCH-disk.img --retry 10 https://download.cirros-cloud.net/$CIRROS_VERSION/cirros-$CIRROS_VERSION-$CIRROS_ARCH-disk.img
fi
echo "Using pre-cached images:"
find /tmp/cirros -type f -printf "%m %n %u %g %s %t" -exec md5sum \{\} \;
@ -275,8 +275,12 @@ if [ "${INSTALL_FROM_SOURCE}" = true ]; then
fi
export PUPPETFILE_DIR=/usr/share/openstack-puppet/modules
export GEM_HOME=/tmp/packstackgems
$SUDO gem install gettext -v 3.2.9 --no-ri --no-rdoc
$SUDO gem install r10k -v 2.6.4 --no-ri --no-rdoc
if ([ "$OS_NAME" = "RedHat" ] || [ "$OS_NAME" = "CentOS" ]) && [ $OS_VERSION -gt 8 ]; then
$SUDO gem install r10k
else
$SUDO gem install gettext -v 3.2.9 --no-ri --no-rdoc
$SUDO gem install r10k -v 2.6.4 --no-ri --no-rdoc
fi
# make sure there is no puppet module pre-installed
$SUDO rm -rf "${PUPPETFILE_DIR:?}/"*
install_modules