Comment 65 for bug 350936

Revision history for this message
Martin Rusko (rusko) wrote :

On John Morrissey's libvirt-bin.conf file ... there is construct like:

 delay=$SHUTDOWN_TIMEOUT
 while [ $delay -gt 0 ]; do
  for uri in $URIS; do
   if ! run_virsh -c "$uri" list | awk '$3 == "running" {exit 1}'; then
    # VMs at this URI are still running. Wait, then
    # start at the beginning looking for running VMs.
    sleep 1
    delay=$(($delay - 1))
    continue 2
   fi
  done
 done

... what if no guest is running anymore? We will never enter if...then condition and thus never decrement $delay variable anymore. It looks like we stay in that while...done loop forever.