cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rhtyd commented on a change in pull request #2878: Fixed Issue 2868, libvirt resize notify failure
Date Fri, 05 Oct 2018 01:20:48 GMT
rhtyd commented on a change in pull request #2878: Fixed Issue 2868, libvirt resize notify
failure
URL: https://github.com/apache/cloudstack/pull/2878#discussion_r222870615
 
 

 ##########
 File path: scripts/storage/qcow2/resizevolume.sh
 ##########
 @@ -92,7 +92,8 @@ notifyqemu() {
     if `virsh domstate $vmname >/dev/null 2>&1`
     then
       sizeinkb=$(($newsize/1024))
-      virsh blockresize --domain $vmname --path $path --size $sizeinkb >/dev/null 2>&1
+      devicepath=$(virsh domblklist $vmname|grep $path|tr -s ' ' | cut -d' ' -f1)
 
 Review comment:
   @kiwiflyer Instead of tr and cut, can you improve string processing (maybe use more predictable
sed/awk like simply do this `grep $path | awk '{print $1}'`  if you only want the target device,
like vda, vdb etc.)? I'm concerned if different versions of libvirt or different distributions
may give a different kind of output.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message