validate-simple: small improvements
* silence the console output from curl but keep error output to avoid garbled download output in the logs * acquire the floating IP address from the stack output to test the same way as tripleo-ci * follow up the heat template differences (key -> key_pair) Change-Id: I4c2bbbc3d542bf62f375d81f70069dff2490fc36
This commit is contained in:
parent
5a0e394294
commit
9ddd43f440
|
@ -54,9 +54,9 @@ fi
|
||||||
IMAGE_PATH={{ validate_image_dir }}/cirros.img
|
IMAGE_PATH={{ validate_image_dir }}/cirros.img
|
||||||
INITRAMFS_PATH={{ validate_image_dir }}/cirros.initramfs
|
INITRAMFS_PATH={{ validate_image_dir }}/cirros.initramfs
|
||||||
KERNEL_PATH={{ validate_image_dir }}/cirros.kernel
|
KERNEL_PATH={{ validate_image_dir }}/cirros.kernel
|
||||||
curl -L -o $IMAGE_PATH {{ validate_image_url }}{{ image_disk }}
|
curl -L -s -S -o $IMAGE_PATH {{ validate_image_url }}{{ image_disk }}
|
||||||
curl -L -o $INITRAMFS_PATH {{ validate_image_url }}{{ image_initramfs }}
|
curl -L -s -S -o $INITRAMFS_PATH {{ validate_image_url }}{{ image_initramfs }}
|
||||||
curl -L -o $KERNEL_PATH {{ validate_image_url }}{{ image_kernel }}
|
curl -L -s -S -o $KERNEL_PATH {{ validate_image_url }}{{ image_kernel }}
|
||||||
|
|
||||||
## * Upload cirros image into glance
|
## * Upload cirros image into glance
|
||||||
## ::
|
## ::
|
||||||
|
@ -99,25 +99,41 @@ fi
|
||||||
|
|
||||||
heat stack-create {{ validate_stack_name }} --template-file {{ working_dir }}/tenantvm_floatingip.yaml
|
heat stack-create {{ validate_stack_name }} --template-file {{ working_dir }}/tenantvm_floatingip.yaml
|
||||||
|
|
||||||
|
## * Wait for the stack creation to complete
|
||||||
|
## * Give time to the instance to boot
|
||||||
|
|
||||||
### --stop_docs
|
### --stop_docs
|
||||||
# wait for stack complete or failed
|
|
||||||
/bin/bash /usr/libexec/openstack-tripleo/wait_for -w 600 --delay 30 \
|
/bin/bash /usr/libexec/openstack-tripleo/wait_for -w 600 --delay 30 \
|
||||||
--success-match {{ validate_success_status }} -- heat stack-show {{ validate_stack_name }}
|
--success-match {{ validate_success_status }} -- heat stack-show {{ validate_stack_name }}
|
||||||
# let time to the instance to boot
|
|
||||||
sleep 30
|
sleep 30
|
||||||
|
|
||||||
### --start_docs
|
### --start_docs
|
||||||
## * Get the floating ip
|
## * Get the floating ip
|
||||||
## ::
|
## ::
|
||||||
|
|
||||||
novaid=`nova list|grep {{ validate_server_name }} |awk '{print $2}'`
|
### --stop_docs
|
||||||
floating_ip=`nova floating-ip-list | grep $novaid | awk '{print $4}'`
|
set +e
|
||||||
nova console-log {{ validate_server_name }}
|
### --start_docs
|
||||||
ping -c 1 $floating_ip
|
|
||||||
nova show {{ validate_server_name }} || :
|
vm1_ip=`openstack stack output show {{ validate_stack_name }} server1_public_ip --f json | \
|
||||||
nova service-list || :
|
jq -r '.["output_value"]'`
|
||||||
neutron agent-list ||:
|
|
||||||
nova console-log {{ validate_server_name }}
|
ping -c 1 $vm1_ip
|
||||||
|
|
||||||
|
## * Print debug output if ping fails
|
||||||
|
## ::
|
||||||
|
|
||||||
|
if [ "$?" == "0" ]; then
|
||||||
|
echo "Overcloud pingtest, SUCCESS"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
nova console-log {{ validate_server_name }}
|
||||||
|
nova show {{ validate_server_name }}
|
||||||
|
nova service-list
|
||||||
|
neutron agent-list
|
||||||
|
openstack stack show {{ validate_stack_name }}
|
||||||
|
echo "Overcloud pingtest, FAIL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
### --stop_docs
|
### --stop_docs
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,8 @@ parameters:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
key:
|
|
||||||
|
key_pair:
|
||||||
type: OS::Nova::KeyPair
|
type: OS::Nova::KeyPair
|
||||||
properties:
|
properties:
|
||||||
save_private_key: true
|
save_private_key: true
|
||||||
|
@ -100,7 +101,7 @@ resources:
|
||||||
{% else %}
|
{% else %}
|
||||||
flavor: { get_resource: test_flavor }
|
flavor: { get_resource: test_flavor }
|
||||||
{% endif %}
|
{% endif %}
|
||||||
key_name: { get_resource: key }
|
key_name: { get_resource: key_pair }
|
||||||
networks:
|
networks:
|
||||||
- port: { get_resource: server1_port }
|
- port: { get_resource: server1_port }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue