2c1c54d7b7
The OpenStack CI systems are preconfigured with various components such as databases, message queues, caching dns resolvers. The CI systems also lack things like public/private key pairs, and known_hosts files. Due to this, a number of minor changes are required in Bifrost's test sequence to account for and route around these differences in order to allow test jobs to run until completion. This also demonstrated that some steps have been operating under the assumption that the user likely already had certain things installed, so service restart tweeks have also been necessary. Added a step to restart libvirt-bin in order to allow it to pickup new capabilities due to the install of the qemu emulator. Added additional steps to collect kernel log and `virsh capabilities` output. Removed MySQL step nolog statements as the password is automatically suppressed and it suppresses information that could be required for troubleshooting. Added in specific username/password logic for MySQL steps if ZUUL is detected in order to use the OpenStack CI defaults. Changed VM test node creation to occur upon every attempt. Extended the startup wait for a test node to be 900 seconds from 600 seconds. Added collection of process list and listening sockets if ZUUL is detected. Added report of VM console log and various commands to assist in troubleshooting a failing job. Added auto-generation of a user ssh keypair if absent when operating in OpenStack CI. Added explicit adjustment of iptables to permit connections on the network interface that the hosts are being provisioned via on 8080/tcp and 6385/tcp. Change-Id: I3c37c5c21af0aefb5007c5775043f7f837389c2d
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
---
|
|
- hosts: localhost
|
|
connection: local
|
|
name: "Executes install, enrollment, and testing in one playbook"
|
|
sudo: yes
|
|
gather_facts: yes
|
|
pre_tasks:
|
|
- name: "Set default baremetal.csv file if not already defined"
|
|
set_fact:
|
|
baremetal_csv_file: "/tmp/baremetal.csv"
|
|
when: baremetal_csv_file is not defined
|
|
- name: "Set ci_testing flag if a list of changes are found in the environment variables"
|
|
set_fact:
|
|
ci_testing: true
|
|
when: lookup('env', 'ZUUL_CHANGES') != ""
|
|
- name: "Set ci_testing_zuul if it appears we are running in upstream OpenStack CI"
|
|
set_fact:
|
|
ci_testing_zuul: true
|
|
when: "'bare-trusty' in ansible_hostname"
|
|
- name: "Collect process list if running in OpenStack CI"
|
|
command: ps aux
|
|
when: ci_testing_zuul is defined
|
|
- name: "Collect list of listening network sockets if running in OpenStack CI"
|
|
shell: netstat -apn|grep LISTEN
|
|
when: ci_testing_zuul is defined
|
|
roles:
|
|
- role: bifrost-create-vm-nodes
|
|
- role: ironic-install
|
|
cleaning: false
|
|
testing: true
|
|
- role: ironic-enroll
|
|
testing: true
|
|
- role: bifrost-validate-host-for-deploy
|
|
- hosts: localhost
|
|
connection: local
|
|
name: "Executes install, enrollment, and testing in one playbook"
|
|
sudo: no
|
|
gather_facts: yes
|
|
roles:
|
|
- role: bifrost-configdrives
|
|
- role: bifrost-setup-nodes
|
|
- role: bifrost-prepare-for-test
|
|
# The testvm Host group is added by bifrost-prepare-for-test based
|
|
# on the contents of the CSV file.
|
|
- hosts: testvm
|
|
name: "Tests connectivity to the VM"
|
|
sudo: no
|
|
gather_facts: yes
|
|
remote_user: ubuntu
|
|
roles:
|
|
- role: bifrost-test-vm
|
|
- hosts: localhost
|
|
connection: local
|
|
name: "Unprovisions the test node"
|
|
sudo: no
|
|
gather_facts: no
|
|
roles:
|
|
- role: bifrost-unprovision-nodes
|
|
- hosts: localhost
|
|
connection: local
|
|
name: "Unprovisions the test node"
|
|
sudo: no
|
|
gather_facts: no
|
|
roles:
|
|
- role: ironic-delete
|