X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=monitor%2Fdispatch%2Fautomate_collectd_client.py;fp=monitor%2Fautomate_collectd_client.py;h=c4346e5188093603133d040fa7413f64741e88fe;hb=3f3676124f276985a0eb8986f53683a39f353dc2;hp=8358cfc5c0068620afc66f4b12f314ac5518f214;hpb=14add4c9ee3c3114a92ee6c8cf6a6f677ec386a8;p=bottlenecks.git diff --git a/monitor/automate_collectd_client.py b/monitor/dispatch/automate_collectd_client.py similarity index 81% rename from monitor/automate_collectd_client.py rename to monitor/dispatch/automate_collectd_client.py index 8358cfc5..c4346e51 100644 --- a/monitor/automate_collectd_client.py +++ b/monitor/dispatch/automate_collectd_client.py @@ -13,7 +13,7 @@ import utils.infra_setup.passwordless_SSH.ssh as ssh logger = logging.getLogger(__name__) collectd_client_install_sh =\ - "/home/opnfv/bottlenecks/monitor/install_collectd_client.sh" + "/home/opnfv/bottlenecks/monitor/dispatch/install_collectd_client.sh" collectd_client_install_conf =\ "/home/opnfv/bottlenecks/monitor/config/collectd_client.conf" @@ -30,16 +30,19 @@ with open('/tmp/pod.yaml') as f: "cd /etc && mkdir collectd_config" ) if status: - raise Exception("Command failed with non-zero status.") + print Exception( + "Command: \"mkdir collectd_config\" failed.") logger.info(stdout.splitlines()) with open(collectd_client_install_sh) as stdin_file: ssh_d.run("cat > /etc/collectd_config/install.sh", stdin=stdin_file) with open(collectd_client_install_conf) as stdin_file: - ssh_d.run("cat > /etc/collectd_config/collectd.conf", - stdin=stdin_file) + ssh_d.run( + "cat > /etc/collectd_config/collectd_client.conf", + stdin=stdin_file + ) status, stdout, stderr = ssh_d.execute( - "sudo apt-get install docker.io" + "sudo apt-get install -y docker.io" ) if status: raise Exception("Command for installing docker failed.")