<div dir="ltr"><div>Ok solution is <br><span style="font-family:monospace,monospace"><br>pcs resource unmanage testvm1<br>pcs resource update testvm1 migration_transport=ssh<br>pcs resource cleanup testvm1<br>pcs resource manage testvm1</span><br><br></div>Cheers <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 25, 2015 at 11:03 PM, Milos Buncic <span dir="ltr"><<a href="mailto:htchak19@gmail.com" target="_blank">htchak19@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi there,<br><br>Every time I run (CentOS 6.6)<br><br><span style="font-family:monospace,monospace">pcs resource update testvm1 migration_transport=ssh <br></span>or<br><span style="font-family:monospace,monospace">pcs resource update testvm1 migration_transport=</span><br></div><br><div>or when I try to set any VirtualDomain parameter, graceful shutdown is initiated! <br><br><span style="font-family:monospace,monospace">Jun 25 21:59:56 node1 VirtualDomain(testvm1)[10876]: INFO: Issuing graceful shutdown request for domain testvm1.</span><br><br></div><div>Can someone please explain me why this is happening?<br></div><div><br>I'm using VirtualDomain resource agent downloaded from github<br><a href="https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/VirtualDomain" target="_blank">https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/VirtualDomain</a><br></div><div><br><br><span style="font-family:monospace,monospace">VirtualDomain_Stop() {<br>        local i<br>        local status<br>        local shutdown_timeout<br>        <span style="color:rgb(0,0,255)">local needshutdown=1</span><br><br>        VirtualDomain_Status<br>        status=$?<br><br>        case $status in<br>                $OCF_SUCCESS)<br>                        if ocf_is_true $OCF_RESKEY_force_stop; then<br>                                # if force stop, don't bother attempting graceful shutdown.<br>                                force_stop<br>                                return $?<br>                        fi<br><br>                        ocf_log info "Issuing graceful shutdown request for domain ${DOMAIN_NAME}."<br><br>                        if [ -n "$OCF_RESKEY_snapshot" ]; then<br>                                virsh save $DOMAIN_NAME "$OCF_RESKEY_snapshot/${DOMAIN_NAME}.state"<br>                                if [ $? -eq 0 ]; then<br>                                        needshutdown=0<br>                                else<br>                                        ocf_log error "Failed to save snapshot state of ${DOMAIN_NAME} on stop"<br>                                fi<br>                        fi<br><br>                        # save config if needed<br>                        if ocf_is_true "$OCF_RESKEY_save_config_on_stop"; then<br>                                save_config<br>                        fi<br><br>                        <span style="color:rgb(0,0,255)"># issue the shutdown if save state didn't shutdown for us<br>                        if [ $needshutdown -eq 1 ]; then<br>                                # Issue a graceful shutdown request<br>                                <b>virsh $VIRSH_OPTIONS shutdown ${DOMAIN_NAME}</b><br>                        fi<br></span><br>                        # The "shutdown_timeout" we use here is the operation<br>                        # timeout specified in the CIB, minus 5 seconds<br>                        shutdown_timeout=$(( $NOW + ($OCF_RESKEY_CRM_meta_timeout/1000) -5 ))<br>                        # Loop on status until we reach $shutdown_timeout<br>                        while [ $NOW -lt $shutdown_timeout ]; do<br>                                VirtualDomain_Status<br>                                status=$?<br>                                case $status in<br>                                        $OCF_NOT_RUNNING)<br>                                                # This was a graceful shutdown.<br>                                                return $OCF_SUCCESS<br>                                        ;;<br>                                        $OCF_SUCCESS)<br>                                                # Domain is still running, keep<br>                                                # waiting (until shutdown_timeout<br>                                                # expires)<br>                                                sleep 1<br>                                                ;;<br>                                        *)<br>                                                # Something went wrong. Bail out and<br>                                                # resort to forced stop (destroy).<br>                                                break;<br>                                esac<br>                                NOW=$(date +%s)<br>                        done<br>                        ;;<br>                $OCF_NOT_RUNNING)<br>                        ocf_log info "Domain $DOMAIN_NAME already stopped."<br>                        return $OCF_SUCCESS<br>        esac<br><br>        # OK. Now if the above graceful shutdown hasn't worked, kill<br>        # off the domain with destroy. If that too does not work,<br>        # have the LRM time us out.<br>        force_stop<br>}</span><br><br><br></div><div>Thanks <br></div></div>
</blockquote></div><br></div>