Skip to content

Commit 4b67937

Browse files
author
Alena Prokharchyk
committed
CS-15089: cloud-sysvmadm - fixed broken parsing in queryAsyncJobResult part of the code
reviewed-by: Frank Zhang
1 parent 4bb4e98 commit 4b67937

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

setup/bindir/cloud-sysvmadm.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ reboot_router(){
212212
}
213213

214214
restart_networks(){
215-
networks=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select n.id from networks n, network_offerings no where n.network_offering_id = no.id and no.system_only = 0 and n.removed is null"`)
215+
networks=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select n.id
216+
from networks n, network_offerings no where n.network_offering_id = no.id and no.system_only = 0 and n.removed is null"`)
216217
length_networks=(${#networks[@]})
217218

218219
echo -e "\nRestarting networks... "
@@ -295,7 +296,7 @@ restart_network(){
295296
query_async_job_result() {
296297
while [ 1 ]
297298
do
298-
jobstatus=`curl -sS "http://$ms:8096/?command=queryAsyncJobResult&jobId=$1&response=json" | sed 's/\"//g' | sed 's/ //g' | sed 's/{//g' | sed 's/}//g' | awk -F, {'print $2'} | awk -F: {'print $2'}`
299+
jobstatus=`curl -sS "http://$ms:8096/?command=queryAsyncJobResult&jobId=$1&response=json" | sed 's/\"//g' | sed 's/ //g' | sed 's/{//g' | sed 's/}//g' | awk -F, {'print $4'} | awk -F: {'print $2'}`
299300
if [ "$jobstatus" != "0" ]; then
300301
echo $jobstatus
301302
break

0 commit comments

Comments
 (0)