Fix quickstart issues

Run tempest in the same playbook.
Don't run postci function.
Use exclude list collect only logs we need.

Change-Id: Ib72a70facfb4fa180334ae5f470d34d1fb201668
This commit is contained in:
Sagi Shnaidman 2017-01-25 23:54:49 +02:00
parent 62400b2b04
commit f34fbafc51
6 changed files with 41 additions and 122 deletions

View File

@ -175,6 +175,11 @@ function postci(){
set -x
set +e
stop_metric "tripleo.${STABLE_RELEASE:-master}.${TOCI_JOBTYPE}.ci.total.seconds"
if [[ "$POSTCI" == "0" ]]; then
sudo chown -R $USER $WORKSPACE
sudo iptables -I INPUT -p tcp -j ACCEPT
return 0
fi
if [ -e $TRIPLEO_ROOT/delorean/data/repos/ ] ; then
# I'd like to tar up repos/current but tar'ed its about 8M it may be a
# bit much for the log server, maybe when we are building less
@ -358,12 +363,6 @@ function prepare_images_oooq {
rm -f overcloud-full.tar ipa_images.tar
}
function collect_oooq_logs {
sudo cp /var/log/quickstart_*.log $OOOQ_LOGS/ || true
tar -czf $OOOQ_LOGS/quickstart.tar.gz $OPT_WORKDIR
mkdir -p $OOOQ_LOGS/collected_logs
}
function subnodes_scp_deploy_env {
for ip in $(cat /etc/nodepool/sub_nodes); do
sanitized_address=$(sanitize_ip_address $ip)

View File

@ -78,13 +78,15 @@ repos:
pkg_name: centos-release-ceph-jewel
custom_cmd: 'yum install -y --enablerepo=extras'
# TODO(sshnaidm): artcl_tar_gz should be tested before
# artcl_tar_gz: true
artcl_gzip_only: true
artcl_txt_rename: true
artcl_publish: true
artcl_rsync_logs: false
artcl_collect_list:
- /etc/
- /var/log/
- /var/lib/mysql
- /home/jenkins/.instack/install-undercloud.log
- /home/jenkins/stackrc
- /home/jenkins/overcloudrc
@ -106,44 +108,11 @@ artcl_collect_list:
- /usr/share/openstack-tripleo-heat-templates
- /tmp/*.yml
- /tmp/*.yaml
- /etc/aodh
- /etc/ceilometer
- /etc/cinder
- /etc/dnsmasq-ironic.conf
- /etc/docker-registry.yml
- /etc/glance
- /etc/gnocchi
- /etc/heat
- /etc/haproxy
- /etc/httpd
- /etc/ironic
- /etc/ironic-inspector
- /etc/keepalived
- /etc/keystone
- /etc/libvirt
- /etc/manila
- /etc/mistral
- /etc/mongod.conf
- /etc/mongos.conf
- /etc/neutron
- /etc/nova
- /etc/ntp
- /etc/ntp.conf
- /etc/os-collect-config.conf
- /etc/os-net-config
- /etc/puppet
- /etc/qpid
- /etc/qpidd.conf
- /etc/rabbitmq
- /etc/redis
- /etc/redis.conf*
- /etc/resolv.conf
- /etc/sahara
- /etc/selinux
- /etc/swift
- /etc/sysconfig
- /etc/systemd
- /etc/trove
- /etc/yum.repos.d
- /etc/zaqar
artcl_exclude_list:
- /etc/udev/hwdb.bin
- /etc/puppet/modules
- /etc/project-config
- /etc/services
- /etc/selinux/targeted
- /etc/pki/ca-trust/extracted
- /etc/alternatives

View File

@ -4,7 +4,9 @@ non_root_user: jenkins
enable_vbmc: false
gating_repo_enabled: true
run_tempest: false
run_tempest: true
tempest_config: true
test_regex: '.*smoke'
ssl_overcloud: false
step_adjust_mtu: true
@ -47,17 +49,20 @@ overcloud_templates_path: /usr/share/openstack-tripleo-heat-templates
# Collect logs settings
# TODO(sshnaidm): artcl_tar_gz should be tested before
# artcl_tar_gz: true
artcl_gzip_only: true
artcl_txt_rename: true
artcl_publish: true
artcl_rsync_logs: false
artcl_collect_list:
- /etc/
- /var/log/
- /var/lib/mysql
- /home/jenkins/.instack/install-undercloud.log
- /home/jenkins/stackrc
- /home/jenkins/overcloudrc
- /home/jenkins/*.log
- /home/jenkins/*.txt
- /home/jenkins/*.json
- /home/jenkins/*.conf
- /home/jenkins/*.yml
@ -74,43 +79,11 @@ artcl_collect_list:
- /usr/share/openstack-tripleo-heat-templates
- /tmp/*.yml
- /tmp/*.yaml
- /etc/aodh
- /etc/ceilometer
- /etc/cinder
- /etc/dnsmasq-ironic.conf
- /etc/docker-registry.yml
- /etc/glance
- /etc/gnocchi
- /etc/heat
- /etc/haproxy
- /etc/httpd
- /etc/ironic
- /etc/ironic-inspector
- /etc/keepalived
- /etc/keystone
- /etc/libvirt
- /etc/manila
- /etc/mistral
- /etc/mongod.conf
- /etc/mongos.conf
- /etc/neutron
- /etc/nova
- /etc/ntp
- /etc/ntp.conf
- /etc/os-collect-config.conf
- /etc/os-net-config
- /etc/puppet
- /etc/qpid
- /etc/qpidd.conf
- /etc/rabbitmq
- /etc/redis
- /etc/redis.conf*
- /etc/resolv.conf
- /etc/sahara
- /etc/selinux
- /etc/swift
- /etc/sysconfig
- /etc/systemd
- /etc/trove
- /etc/yum.repos.d
- /etc/zaqar
artcl_exclude_list:
- /etc/udev/hwdb.bin
- /etc/puppet/modules
- /etc/project-config
- /etc/services
- /etc/selinux/targeted
- /etc/pki/ca-trust/extracted
- /etc/alternatives

View File

@ -98,6 +98,7 @@ export UNDERCLOUD_UI=0
export UNDERCLOUD_VALIDATIONS=0
export PREDICTABLE_PLACEMENT=0
export OPSTOOLS_REPO_ENABLED=0
export POSTCI=1
if [[ $TOCI_JOBTYPE =~ upgrades ]]; then
# We deploy a master Undercloud and an Overcloud with the
@ -318,6 +319,7 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
TOCIRUNNER="./toci_instack_oooq.sh"
fi
PREDICTABLE_PLACEMENT=0
POSTCI=0
;;
fakeha)
NODECOUNT=2

View File

@ -7,7 +7,6 @@ set -o pipefail
## Signal to toci_gate_test.sh we've started by
touch /tmp/toci.started
exit_value=0
export CURRENT_DIR=$(dirname ${BASH_SOURCE[0]:-$0})
export TRIPLEO_CI_DIR=$CURRENT_DIR/../
@ -25,7 +24,7 @@ if [[ $CONTAINERS == 1 ]]; then
CONFIG=${CONFIG:-"$TRIPLEO_ROOT/tripleo-ci/scripts/quickstart/containers_minimal.yml"}
elif [[ "$TOCI_JOBTYPE" =~ "-nonha-tempest" ]]; then
CONFIG=${CONFIG:-"$TRIPLEO_ROOT/tripleo-quickstart/config/general_config/minimal_pacemaker.yml"}
EXTRA_ARGS="$EXTRA_ARGS -e test_ping=false -e tempest_config=true -e run_tempest=true -e test_regex='.*' -e enable_cinder_backup=true"
EXTRA_ARGS="$EXTRA_ARGS -e test_ping=false -e test_regex='.*' -e enable_cinder_backup=true"
elif [[ "$TOCI_JOBTYPE" =~ "-ha" ]]; then
CONFIG=${CONFIG:-"$TRIPLEO_ROOT/tripleo-quickstart/config/general_config/ha.yml"}
elif [[ "$TOCI_JOBTYPE" =~ "-nonha" ]]; then
@ -77,23 +76,10 @@ sed -i '/ansible_user: stack/d' $TRIPLEO_ROOT/tripleo-quickstart/roles/common/de
$TRIPLEO_ROOT/tripleo-quickstart/quickstart.sh --bootstrap --no-clone \
-t all \
$PLAYBOOK $OOOQ_ARGS \
$OOOQ_DEFAULT_ARGS undercloud 2>&1 \
$OOOQ_DEFAULT_ARGS $EXTRA_ARGS undercloud 2>&1 \
| tee $OOOQ_LOGS/quickstart_install.log && exit_value=0 || exit_value=$?
# TODO(sshnaidm): to include this in general ovb-playbook(?)
if [[ -e ${OOO_WORKDIR_LOCAL}/overcloudrc ]]; then
$TRIPLEO_ROOT/tripleo-quickstart/quickstart.sh --bootstrap \
$OOOQ_DEFAULT_ARGS \
-t all \
--playbook tempest.yml \
--extra-vars run_tempest=True \
-e test_regex='.*smoke' $EXTRA_ARGS \
undercloud 2>&1 | tee $OOOQ_LOGS/quickstart_tempest.log && tempest_exit_value=0 || tempest_exit_value=$?
fi
# TODO(sshnaidm): to prepare collect-logs role for tripleo-ci specific paths
# and remove this function then
collect_oooq_logs
tar -czf $OOOQ_LOGS/quickstart.tar.gz $OPT_WORKDIR
# TODO(sshnaidm): fix this either in role or quickstart.sh
# it will not duplicate logs from undercloud and 127.0.0.2
@ -104,7 +90,7 @@ $TRIPLEO_ROOT/tripleo-quickstart/quickstart.sh --bootstrap --no-clone \
$OOOQ_DEFAULT_ARGS \
$OOOQ_ARGS \
--playbook collect-logs.yml \
-e artcl_collect_dir=$OOOQ_LOGS/collected_logs \
-e artcl_collect_dir=$OOOQ_LOGS \
undercloud &> $OOOQ_LOGS/quickstart_collectlogs.log ||
echo "WARNING: quickstart collect-logs failed, check quickstart_collectlogs.log for details"
@ -113,11 +99,4 @@ $OPT_WORKDIR/bin/ara generate $OOOQ_LOGS/ara || true
popd
echo 'Run completed.'
# TODO(sshnaidm): remove this when we're sure there's enough space
# Watch free space, the outage could break jobs
sudo df -h
if [[ "$exit_value" != 0 ]]; then
exit $exit_value
elif [[ "$tempest_exit_value" != 0 ]]; then
exit $tempest_exit_value
fi
exit $exit_value

View File

@ -5,7 +5,6 @@ set -o pipefail
## Signal to toci_gate_test.sh we've started by
touch /tmp/toci.started
exit_value=0
export CURRENT_DIR=$(dirname ${BASH_SOURCE[0]:-$0})
export TRIPLEO_CI_DIR=$CURRENT_DIR/../
@ -120,7 +119,7 @@ sed -i '/ansible_user: stack/d' $TRIPLEO_ROOT/tripleo-quickstart/roles/common/de
# deploy hangs. 90m = 90 minutes = 1.5 hours
/usr/bin/timeout --preserve-status 90m \
$TRIPLEO_ROOT/tripleo-quickstart/quickstart.sh \
${OOOQ_ARGS} 2>&1 | tee $OOOQ_LOGS/quickstart_install.log || exit_value=2
${OOOQ_ARGS} 2>&1 | tee $OOOQ_LOGS/quickstart_install.log && exit_value=0 || exit_value=$?
# We use the tripleo.sh pingtest rather than the validate-simple role in
# quickstart-extras so that we can easily support the multinode scenario
@ -133,9 +132,7 @@ fi
sudo journalctl -u os-collect-config | sudo tee /var/log/os-collect-config.txt
# TODO(sshnaidm): to prepare collect-logs role for tripleo-ci specific paths
# and remove this function then
collect_oooq_logs
tar -czf $OOOQ_LOGS/quickstart.tar.gz $OPT_WORKDIR
# TODO(sshnaidm): fix this either in role or quickstart.sh
# it will not duplicate logs from undercloud and 127.0.0.2
@ -145,7 +142,7 @@ $TRIPLEO_ROOT/tripleo-quickstart/quickstart.sh --bootstrap --no-clone \
$OOOQ_DEFAULT_ARGS \
--config $CONFIG \
--playbook collect-logs.yml \
-e artcl_collect_dir=$OOOQ_LOGS/collected_logs \
-e artcl_collect_dir=$OOOQ_LOGS \
-e @$TRIPLEO_ROOT/tripleo-ci/scripts/quickstart/multinode-settings.yml \
-e tripleo_root=$TRIPLEO_ROOT \
127.0.0.2 &> $OOOQ_LOGS/quickstart_collectlogs.log ||