diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-05-06 14:58:51 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-05-06 14:58:51 +0000 |
| commit | 33ab6f8cc1623fdded8aba7e3e581f20ac4b2819 (patch) | |
| tree | c3ef2cd1aff358addf778703d04218dabfee9ee3 | |
| parent | 0b563fa5b898328ae4461bd7a4a5db1920131c8b (diff) | |
| parent | 6ffe08d76e98dd5eb44d9e5db4f8c549dc745144 (diff) | |
| download | kolla-33ab6f8cc1623fdded8aba7e3e581f20ac4b2819.tar.gz kolla-33ab6f8cc1623fdded8aba7e3e581f20ac4b2819.zip | |
Merge "Fix the gate lying"
| -rwxr-xr-x | tools/deploy_aio.sh | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/tools/deploy_aio.sh b/tools/deploy_aio.sh index 17f10eb81..73f6285ec 100755 --- a/tools/deploy_aio.sh +++ b/tools/deploy_aio.sh @@ -12,21 +12,32 @@ export KEEPALIVED_VIRTUAL_ROUTER_ID=$(shuf -i 1-255 -n 1) function copy_logs { cp -rnL /var/lib/docker/volumes/kolla_logs/_data/* /tmp/logs/kolla/ # NOTE(SamYaple): Fix permissions for log extraction in gate + + if [[ -x "$(command -v journalctl)" ]]; then + journalctl --no-pager -u docker.service > /tmp/logs/kolla/docker.log + else + cp /var/log/upstart/docker.log > /tmp/logs/kolla/docker.log + fi + chmod -R 777 /tmp/logs/kolla/ } -function check_failure { - # Command failures after this point can be expected - set +o errexit - - # TODO(SamYaple): Move these out of the check_failure function once logs - # are reddy with Heka +function sanity_check { # Wait for service ready sleep 15 - nova boot --poll --image $(openstack image list | awk '/cirros/ {print $2}') --nic net-id=$(openstack network list | awk '/demo-net/ {print $2}') --flavor 1 kolla_boot_test + source /etc/kolla/admin-openrc.sh + nova --debug service-list + neutron --debug agent-list + tools/init-runonce + nova --debug boot --poll --image $(openstack image list | awk '/cirros/ {print $2}') --nic net-id=$(openstack network list | awk '/demo-net/ {print $2}') --flavor 1 kolla_boot_test + nova --debug list # If the status is not ACTIVE, print info and exit 1 - nova show kolla_boot_test | awk '{buf=buf"\n"$0} $2=="status" && $4!="ACTIVE" {failed="yes"}; END {if (failed=="yes") {print buf; exit 1}}' + nova --debug show kolla_boot_test | awk '{buf=buf"\n"$0} $2=="status" && $4!="ACTIVE" {failed="yes"}; END {if (failed=="yes") {print buf; exit 1}}' +} +function check_failure { + # Command failures after this point can be expected + set +o errexit docker ps -a failed_containers=$(docker ps -a --format "{{.Names}}" --filter status=exited) @@ -35,18 +46,6 @@ function check_failure { docker logs --tail all ${failed} done - if [[ -x "$(command -v journalctl)" ]]; then - journalctl --no-pager -u docker.service - else - cat /var/log/upstart/docker.log - fi - - nova service-list - neutron agent-list - - nova list - nova list | awk '/4/ {print $2}' | xargs -n1 nova show - copy_logs } @@ -105,5 +104,4 @@ tools/kolla-ansible -vvv deploy tools/kolla-ansible -vvv post-deploy # Test OpenStack Environment -source /etc/kolla/admin-openrc.sh -tools/init-runonce +sanity_check |
