From 6b19d3a7fce0c6e8955c6cc7676d83b6f3db714d Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Thu, 21 Sep 2023 20:40:01 +0530 Subject: [PATCH] [octavia] Fix custom image preparation Added octavia_test_bin_download_cmd variable to allow using different command for test_bin file download, like:- octavia_test_bin_download_cmd: "curl -O --insecure" Also use absolute path for test_bin file as relative path requires the script to run from specific directory. Change-Id: Id7a6cabd10889abad8ea54745fb6fec7b1db4ffc --- ansible/install/group_vars/all.yml | 3 +++ ansible/install/roles/workloads/templates/custom-cirros.file | 2 +- .../install/roles/workloads/templates/octavia-userdata.file | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ansible/install/group_vars/all.yml b/ansible/install/group_vars/all.yml index 7a5dc0c1b..45be88a64 100644 --- a/ansible/install/group_vars/all.yml +++ b/ansible/install/group_vars/all.yml @@ -65,6 +65,9 @@ iptables_file: /etc/sysconfig/iptables #octavia_test_bin_path: +# Command to use to download test_bin file +octavia_test_bin_download_cmd: "wget" + ######################################## # Browbeat Workloads ######################################## diff --git a/ansible/install/roles/workloads/templates/custom-cirros.file b/ansible/install/roles/workloads/templates/custom-cirros.file index ddf056f36..0543c80de 100755 --- a/ansible/install/roles/workloads/templates/custom-cirros.file +++ b/ansible/install/roles/workloads/templates/custom-cirros.file @@ -1,5 +1,5 @@ #!/bin/sh sudo echo "nameserver {{ dns_server }}" > /etc/resolv.conf -cd /home/cirros/ && wget "{{ octavia_test_bin_path }}" +cd /home/cirros/ && {{ octavia_test_bin_download_cmd }} "{{ octavia_test_bin_path }}" echo "Browbeat workload installed" diff --git a/ansible/install/roles/workloads/templates/octavia-userdata.file b/ansible/install/roles/workloads/templates/octavia-userdata.file index 7787d5138..1514eb33d 100644 --- a/ansible/install/roles/workloads/templates/octavia-userdata.file +++ b/ansible/install/roles/workloads/templates/octavia-userdata.file @@ -8,5 +8,5 @@ chmod 777 /home/cirros/test_server.bin sudo su && echo 1 > /proc/sys/vm/overcommit_memory for i in $(seq 0 $(($NUM_POOLS-1))); do - ./home/cirros/test_server.bin -port $(($PORT+ $i)) & + /home/cirros/test_server.bin -port $(($PORT+ $i)) & done