Revision 9cb8e914 src/vmm_mad/kvm/one_vmm_kvm.rb

View differences:

src/vmm_mad/kvm/one_vmm_kvm.rb
107 107
    # Basic Domain Management Operations                                       #
108 108
    # ------------------------------------------------------------------------ #
109 109
    def shutdown(id, host, deploy_id, not_used)
110
        cmd="#{LIBVIRT[:shutdown]} #{deploy_id} && " \
111
            "while [ $(#{LIBVIRT[:poll]} #{deploy_id} > /dev/null 2>&1; " \
112
            "echo $?) -eq \"0\" ]; do sleep 2; done ; sleep 4"
110
        cmd = "#{LIBVIRT[:shutdown]} #{deploy_id} && " \
111
                    "c=0 && while [ $c -lt \"5\" ]; do " \
112
                    "if [ $(#{LIBVIRT[:poll]} #{deploy_id} > /dev/null 2>&1; echo $?) -ne \"0\" ]; " \
113
                    "then let 'c=c+1'; else c=0; fi; sleep 2; done; sleep 4"
113 114

  
114 115
        execution=SSHCommand.run('bash', host, log_method(id), cmd)
115 116

  

Also available in: Unified diff