Skip to content
Snippets Groups Projects
Commit d768cc2a authored by Stephen C Phillips's avatar Stephen C Phillips
Browse files

Correctly gets IP in destroy; adds more sleep in create

parent ef0e2a57
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ for service_name in $service_names; do ...@@ -25,7 +25,7 @@ for service_name in $service_names; do
# start the container # start the container
lxc-start -n ${service_name} lxc-start -n ${service_name}
sleep 4 sleep 10
echo "Provisioning: ${service_name}" echo "Provisioning: ${service_name}"
if [ ${service_name} == "clmc-service" ] if [ ${service_name} == "clmc-service" ]
...@@ -47,10 +47,6 @@ for service_name in $service_names; do ...@@ -47,10 +47,6 @@ for service_name in $service_names; do
influxdb_url=$(echo $SERVICE | jq -r '.influxdb_url') influxdb_url=$(echo $SERVICE | jq -r '.influxdb_url')
database_name=$(echo $SERVICE | jq -r '.database_name') database_name=$(echo $SERVICE | jq -r '.database_name')
echo "*********************"
echo $location
echo $sf_id
cmd=/vagrant/clmctest/services/${sf_id}/install.sh cmd=/vagrant/clmctest/services/${sf_id}/install.sh
lxc-attach -n ${service_name} -v REPO_ROOT=/vagrant -- ${cmd} lxc-attach -n ${service_name} -v REPO_ROOT=/vagrant -- ${cmd}
......
...@@ -9,7 +9,8 @@ for service_name in $service_names; do ...@@ -9,7 +9,8 @@ for service_name in $service_names; do
lxc-stop -n ${service_name} lxc-stop -n ${service_name}
echo "Destroying container: ${service_name}" echo "Destroying container: ${service_name}"
lxc-destroy -n ${service_name} lxc-destroy -n ${service_name}
ip=$(jq -r --arg NAME ${service_name} '.[] | select(.name==$NAME | .ip_address') ip=$(jq -r --arg NAME ${service_name} '.[] | select(.name==$NAME) | .ip_address' ${rspec_file})
sed -i '/${ip}/d' /etc/lxc/dnsmasq.conf #TODO: this line doesn't work for some reason and it's also dangerous because an IP could match more than 1 line in the file
#sed -i '/${ip}/d' /etc/lxc/dnsmasq.conf
fi fi
done done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment