You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: setup/bindir/cloud-sysvmadm.in
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -122,8 +122,8 @@ prepare_ids_clause() {
122
122
123
123
stop_start_system() {
124
124
prepare_ids_clause
125
-
secondary=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select id from $vmtable where state=\"Running\" and type=\"SecondaryStorageVm\"$zone$vmidsclause"`)
126
-
console=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select id from $vmtable where state=\"Running\" and type=\"ConsoleProxy\"$zone$vmidsclause"`)
125
+
secondary=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select uuid from $vmtable where state=\"Running\" and type=\"SecondaryStorageVm\"$zone$vmidsclause"`)
126
+
console=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select uuid from $vmtable where state=\"Running\" and type=\"ConsoleProxy\"$zone$vmidsclause"`)
127
127
length_secondary=(${#secondary[@]})
128
128
length_console=(${#console[@]})
129
129
@@ -159,7 +159,7 @@ stop_start_system() {
159
159
160
160
fordin"${console[@]}";do
161
161
echo"[$(date "+%Y.%m.%d-%H.%M.%S")] INFO: Stopping console proxy with id $d">>$LOGFILE
162
-
jobresult=$(send_request stopSystemVm $d)
162
+
jobresult=$(send_request stopSystemVm $d)
163
163
if [ "$jobresult"!="1" ];then
164
164
echo -e "ERROR: Failed to stop console proxy vm with id $d \n"
165
165
echo"[$(date "+%Y.%m.%d-%H.%M.%S")] ERROR: Failed to stop console proxy vm with id $d">>$LOGFILE
@@ -183,7 +183,7 @@ stop_start_system() {
183
183
184
184
stop_start_router() {
185
185
prepare_ids_clause
186
-
router=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select id from vm_instance where state=\"Running\" and type=\"DomainRouter\"$zone$vmidsclause"`)
186
+
router=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select uuid from vm_instance where state=\"Running\" and type=\"DomainRouter\"$zone$vmidsclause"`)
187
187
length_router=(${#router[@]})
188
188
189
189
echo -e "\nStopping and starting $length_router running routing vm(s)$inzone$withids... "
@@ -391,7 +391,7 @@ restart_vpc(){
391
391
392
392
393
393
restart_vpcs(){
394
-
vpcs=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select id from vpc WHERE removed is null$zone"`)
394
+
vpcs=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select uuid from vpc WHERE removed is null$zone"`)
395
395
length_vpcs=(${#vpcs[@]})
396
396
397
397
echo -e "\nRestarting $length_vpcs vpcs... "
@@ -456,7 +456,7 @@ restart_vpcs(){
456
456
query_async_job_result() {
457
457
while [ 1 ]
458
458
do
459
-
jobstatus=`curl -sS "http://$ms:$integrationport/?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'}`
459
+
jobstatus=`curl -sS "http://$ms:$integrationport/?command=queryAsyncJobResult&jobId=$1&response=json"| sed 's/\"//g'| sed 's/ //g'| sed 's/{//g'| sed 's/}//g'| awk -F, {'print $7'} | awk -F: {'print $2'}`
0 commit comments