From 7bd0b34de8dd6862da25a401eacb8d12b3ab6c3a Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Thu, 6 Aug 2015 12:26:11 +0300 Subject: [PATCH] Fix how agent is installed inside the image Change-Id: I7598bb8a691d43cc35b506569d938cba73274481 --- shaker/openstack/clients/nova.py | 2 +- shaker/resources/image_builder_templates/centos.yaml | 3 +-- shaker/resources/image_builder_templates/debian.yaml | 3 +-- shaker/resources/image_builder_templates/ubuntu.yaml | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/shaker/openstack/clients/nova.py b/shaker/openstack/clients/nova.py index 911b58a..0a29f11 100644 --- a/shaker/openstack/clients/nova.py +++ b/shaker/openstack/clients/nova.py @@ -85,7 +85,7 @@ def _poll_for_status(nova_client, server_id, final_ok_states, poll_period=20, while True: obj = nova_client.servers.get(server_id) - err_msg = check_server_console(nova_client, server_id, len_limit=25) + err_msg = check_server_console(nova_client, server_id) if err_msg: raise Exception('Critical error in instance %s console: %s' % (server_id, err_msg)) diff --git a/shaker/resources/image_builder_templates/centos.yaml b/shaker/resources/image_builder_templates/centos.yaml index e70354f..99b9db8 100644 --- a/shaker/resources/image_builder_templates/centos.yaml +++ b/shaker/resources/image_builder_templates/centos.yaml @@ -92,8 +92,7 @@ resources: make make install wget -O get-pip.py https://bootstrap.pypa.io/get-pip.py && python get-pip.py - pip install -U "pip<7.0" - pip install pbr netperf-wrapper flent pyshaker-agent + pip install netperf-wrapper flent pyshaker-agent service network restart cat<<'EOF' >> /etc/systemd/system/iperf.service [Unit] diff --git a/shaker/resources/image_builder_templates/debian.yaml b/shaker/resources/image_builder_templates/debian.yaml index fe52ca8..c1890df 100644 --- a/shaker/resources/image_builder_templates/debian.yaml +++ b/shaker/resources/image_builder_templates/debian.yaml @@ -69,8 +69,7 @@ resources: sudo apt-get update sudo apt-get -y install iperf netperf python-dev libzmq-dev screen wget -O get-pip.py https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py - sudo pip install -U "pip<7.0" - sudo pip install pbr netperf-wrapper flent pyshaker-agent + sudo pip install netperf-wrapper flent pyshaker-agent echo -e 'start on startup\ntask\nexec /usr/bin/screen -dmS sudo nice -n -20 /usr/bin/iperf -s' | sudo tee /etc/init/iperf-tcp.conf echo -e 'start on startup\ntask\nexec /usr/bin/screen -dmS sudo nice -n -20 /usr/bin/iperf -s --udp' | sudo tee /etc/init/iperf-udp.conf sudo shutdown now diff --git a/shaker/resources/image_builder_templates/ubuntu.yaml b/shaker/resources/image_builder_templates/ubuntu.yaml index f471350..fbee74c 100644 --- a/shaker/resources/image_builder_templates/ubuntu.yaml +++ b/shaker/resources/image_builder_templates/ubuntu.yaml @@ -69,8 +69,8 @@ resources: sudo apt-get update sudo apt-get -y install iperf netperf python-dev libzmq-dev screen wget -O get-pip.py https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py - sudo pip install -U "pip<7.0" - sudo pip install pbr netperf-wrapper flent pyshaker-agent + sudo pip install netperf-wrapper flent pyshaker-agent + shaker-agent -h || (echo "[critical] Failed to run pyshaker-agent. Check if it installed into the image"; sleep 20) sudo apt-add-repository "deb http://ftp.debian.org/debian/ jessie main" && sudo apt-get update sudo apt-get -y --force-yes install iperf3 echo -e 'start on startup\ntask\nexec /usr/bin/screen -dmS sudo nice -n -20 /usr/bin/iperf -s' | sudo tee /etc/init/iperf-tcp.conf