Browse Source

Fix vbmc_setup.yaml for c8 standalone

Fixing vbmc_setup.yaml for c8 scenario012-standalone job with this

vbmc_setup.yaml was originally written for c7 multinode[0] to install
virtual BMC and a libvirt domain on the controller for ironic to
manage. In scenario012 we are trying to test something close to ironic
in overcloud(Blueprint[1]).

In the past, We have moved scenario012 mutinode to standalone job and
reused vbmc_setup.yaml.

The shell script in vbmc_setup.yaml need following modification as its
now a C8 standalone job:-

* Added 'set -e' so that script exits immediately if a command exits
with a non-zero status so it would result in deployment failure.
Currently deployment is passing even if some commands in the bash
script are failing. Addition of 'set -e' will correct this behavior.
* Replaced yum with dnf as yum not present in Centos8.
* No need to override resolv.conf entry as standalone job already
configure necessary nameserver entries.
* No need to install additional repos as as standalone job already
configure necessary repos.
* When vbmc_setup.yaml was introduced intention was to do non-kvm
emulation[2] and that was the reason qemu-system-x86 and qemu-kvm-ev
was pulled from epel, but for c8 these packages are no longer available
in repos [3] including epel. We can use qemu-kvm package instead and
we will no longer need epel repos.
* command option to use qemu-system have to be removed
as qemu-system-x86 package is missing and we are using qemu-kvm
* Temporary workaround[4] to upgrade ansible in the neutron container
can be removed as ansible version in container is now v2.5.8+.
Test patch for tripleo-ci-centos-8-scenario012-standalone is here[5].


Change-Id: I9e9d63a7ef2ef538f3c072e3f4a96ec25d7dc5f7
Closes-Bug: #1875681
Sandeep Yadav 1 year ago
  1. 23


@ -17,12 +17,8 @@ resources:
group: script
config: |
cd /etc/yum.repos.d
echo 'nameserver' > /etc/resolv.conf
curl | python - current-tripleo
yum install -y python2-virtualbmc epel-release libvirt-client libvirt-daemon libvirt qemu-kvm-ev
yum install -y qemu-system-x86 # <-- needs epel
yum remove -y epel-release
set -e
dnf install -y python3-virtualbmc libvirt-client libvirt-daemon libvirt qemu-kvm
systemctl start libvirtd virtualbmc
git clone /tmp/ironic
mkdir -p /var/log/bmlogs
@ -34,16 +30,6 @@ resources:
chmod 644 /etc/puppet/ci-key
cat /etc/puppet/ >> /root/.ssh/authorized_keys
# neutron_api workaround for
# remove when ansible v2.5.8+ is in the container image
cat << EOF | docker exec -i -u 0 neutron_api /bin/bash -x
yum install -y epel-release
yum update -y ansible
docker restart neutron_api
@ -60,9 +46,8 @@ resources:
virsh pool-start $LIBVIRT_STORAGE_POOL
# nohup needed as vbmc seems to keep stdin open
nohup /tmp/ironic/devstack/tools/ironic/scripts/ -n node1 -c 1 -m 3072 -d 10 -b br-ex -p 1161 -M 1350 -f qcow2 -a x86_64 -E qemu -e /usr/bin/qemu-system-x86_64 -l /var/log/bmlogs -A 66:0d:1d:d8:0b:11 > ~zuul/create-node-1.log 2>&1 < /dev/null
nohup /tmp/ironic/devstack/tools/ironic/scripts/ -n node2 -c 1 -m 3072 -d 10 -b br-ex -p 1162 -M 1350 -f qcow2 -a x86_64 -E qemu -e /usr/bin/qemu-system-x86_64 -l /var/log/bmlogs -A 66:0d:1d:d8:0b:22 > ~zuul/create-node-2.log 2>&1 < /dev/null &
/tmp/ironic/devstack/tools/ironic/scripts/ -n node1 -c 1 -m 3072 -d 10 -b br-ex -p 1161 -M 1350 -f qcow2 -a x86_64 -E qemu -l /var/log/bmlogs -A 66:0d:1d:d8:0b:11 > /var/log/bmlogs/create-node-1.log 2>&1 < /dev/null
/tmp/ironic/devstack/tools/ironic/scripts/ -n node2 -c 1 -m 3072 -d 10 -b br-ex -p 1162 -M 1350 -f qcow2 -a x86_64 -E qemu -l /var/log/bmlogs -A 66:0d:1d:d8:0b:22 > /var/log/bmlogs/create-node-2.log 2>&1 < /dev/null
vbmc --no-daemon add node1 --port 1161
vbmc --no-daemon start node1