1
0
mirror of https://github.com/rancher/os.git synced 2025-09-16 23:21:19 +00:00

Replace wait-for-network services with retries

This commit is contained in:
Josh Curl
2016-05-26 18:54:42 -07:00
parent afcb0d38fe
commit 6ec9ce1bc6
13 changed files with 122 additions and 130 deletions

View File

@@ -2,4 +2,4 @@
rancher:
cloud_init:
datasources:
- url:https://s3-us-west-2.amazonaws.com/rancher-os-test/cloud-config.yml
- url:https://gist.githubusercontent.com/joshwget/0bdc616cd26162ad87c535644c8b1ef6/raw/8cce947c08cf006e932b71d92ddbb96bae8e3325/gistfile1.txt

View File

@@ -0,0 +1,11 @@
#cloud-config
rancher:
services:
missing_image:
image: tianon/true
labels:
io.rancher.os.scope: system
services_include:
debian-console: true
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC85w9stZyiLQp/DkVO6fqwiShYcj1ClKdtCqgHtf+PLpJkFReSFu8y21y+ev09gsSMRRrjF7yt0pUHV6zncQhVeqsZtgc5WbELY2DOYUGmRn/CCvPbXovoBrQjSorqlBmpuPwsStYLr92Xn+VVsMNSUIegHY22DphGbDKG85vrKB8HxUxGIDxFBds/uE8FhSy+xsoyT/jUZDK6pgq2HnGl6D81ViIlKecpOpWlW3B+fea99ADNyZNVvDzbHE5pcI3VRw8u59WmpWOUgT6qacNVACl8GqpBvQk8sw7O/X9DSZHCKafeD9G5k+GYbAUz92fKWrx/lOXfUXPS3+c8dRIF

View File

@@ -28,9 +28,6 @@ set -x -e
ip link show dev br0
ip link show dev br0.100 | grep br0.100@br0
ip link show dev eth1.100 | grep 'master br0'
ip link show dev eth6 | grep 'master bond0'
ip link show dev eth7 | grep 'master bond0'
[ "$(</sys/class/net/bond0/bonding/mode)" = "active-backup 1" ]
SCRIPT
sudo bash test-merge

View File

@@ -0,0 +1,26 @@
import pytest
import rostest.util as u
from rostest.util import SSH
pytestmark = pytest.mark.skipif(u.arch != 'amd64', reason='amd64 network setup impossible to replicate for arm64')
cloud_config_path = './tests/integration/assets/test_18/cloud-config.yml'
net_args_arch = {'amd64': ['-net', 'nic,vlan=1,model=virtio'],
'arm64': ['-device', 'virtio-net-device']}
net_args_arch['arm'] = net_args_arch['arm64']
net_args = net_args_arch[u.arch]
@pytest.fixture(scope="module")
def qemu(request):
q = u.run_qemu(request,
run_args=['--cloud-config', cloud_config_path] +
net_args + net_args + net_args)
u.flush_out(q.stdout)
return q
def test_network_resources_loaded(qemu):
SSH(qemu).check_call("apt-get --version")
SSH(qemu).check_call("sudo system-docker images | grep tianon/true")