Test zun container creation in gates
Change-Id: If5b4ba975a65e07d2704eb6bdb9d841d6a9c3d42
This commit is contained in:
parent
404d0b1c12
commit
362b6ee40e
@ -59,6 +59,7 @@ zun_services:
|
|||||||
- "{{ kolla_dev_repos_directory ~ '/zun/zun:/var/lib/kolla/venv/lib/python2.7/site-packages/zun' if zun_dev_mode | bool else '' }}"
|
- "{{ kolla_dev_repos_directory ~ '/zun/zun:/var/lib/kolla/venv/lib/python2.7/site-packages/zun' if zun_dev_mode | bool else '' }}"
|
||||||
- "/run:/run:shared"
|
- "/run:/run:shared"
|
||||||
- "/usr/lib/docker:/usr/lib/docker"
|
- "/usr/lib/docker:/usr/lib/docker"
|
||||||
|
- "/var/lib/docker:/var/lib/docker"
|
||||||
dimensions: "{{ zun_compute_dimensions }}"
|
dimensions: "{{ zun_compute_dimensions }}"
|
||||||
|
|
||||||
####################
|
####################
|
||||||
|
@ -37,7 +37,7 @@ copy_logs() {
|
|||||||
ps -eo user,pid,ppid,lwp,%cpu,%mem,size,rss,cmd > ${LOG_DIR}/system_logs/ps.txt
|
ps -eo user,pid,ppid,lwp,%cpu,%mem,size,rss,cmd > ${LOG_DIR}/system_logs/ps.txt
|
||||||
|
|
||||||
# docker related information
|
# docker related information
|
||||||
(docker info && docker images && docker ps -a) > ${LOG_DIR}/system_logs/docker-info.txt
|
(docker info && docker images && docker ps -a && docker network ls) > ${LOG_DIR}/system_logs/docker-info.txt
|
||||||
|
|
||||||
# ceph related logs
|
# ceph related logs
|
||||||
if [[ $(docker ps --filter name=ceph_mon --format "{{.Names}}") ]]; then
|
if [[ $(docker ps --filter name=ceph_mon --format "{{.Names}}") ]]; then
|
||||||
|
@ -39,5 +39,6 @@ glance_enable_rolling_upgrade: "yes"
|
|||||||
{% if scenario == "zun" %}
|
{% if scenario == "zun" %}
|
||||||
enable_zun: "yes"
|
enable_zun: "yes"
|
||||||
enable_kuryr: "yes"
|
enable_kuryr: "yes"
|
||||||
docker_custom_option: " -H unix:///var/run/docker.sock -H tcp://{{ api_interface_address }}:2375"
|
enable_etcd: "yes"
|
||||||
|
docker_custom_option: " -H unix:///var/run/docker.sock -H tcp://{{ api_interface_address }}:2375 --cluster-store=etcd://{{ api_interface_address }}:2379 --cluster-advertise={{ api_interface_address }}:2375"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -48,10 +48,25 @@ function test_openstack_logged {
|
|||||||
|
|
||||||
if echo $ACTION | grep -q "zun"; then
|
if echo $ACTION | grep -q "zun"; then
|
||||||
echo "TESTING: Zun"
|
echo "TESTING: Zun"
|
||||||
openstack --debug appcontainer service list
|
openstack appcontainer service list
|
||||||
openstack --debug appcontainer host list
|
openstack appcontainer host list
|
||||||
# TODO(hongbin): Run a Zun container and assert the container becomes
|
openstack subnet set --no-dhcp demo-subnet
|
||||||
# Running
|
sudo docker pull alpine
|
||||||
|
sudo docker save alpine | openstack image create alpine --public --container-format docker --disk-format raw
|
||||||
|
openstack appcontainer run --name test alpine sleep 1000
|
||||||
|
attempt=1
|
||||||
|
while [[ $(openstack appcontainer show test -f value -c status) != "Running" ]]; do
|
||||||
|
echo "Container not running yet"
|
||||||
|
attempt=$((attempt+1))
|
||||||
|
if [[ $attempt -eq 10 ]]; then
|
||||||
|
echo "Container failed to start"
|
||||||
|
openstack appcontainer show test
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
openstack appcontainer list
|
||||||
|
openstack appcontainer delete --force --stop test
|
||||||
echo "SUCCESS: Zun"
|
echo "SUCCESS: Zun"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $ACTION == "zun" ]]; then
|
if [[ $ACTION == "zun" ]]; then
|
||||||
GATE_IMAGES+=",zun,kuryr"
|
GATE_IMAGES+=",zun,kuryr,etcd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat <<EOF | sudo tee /etc/kolla/kolla-build.conf
|
cat <<EOF | sudo tee /etc/kolla/kolla-build.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user