Discussion:
[Pacemaker] CentOS 7, VirtualDomain stop problem
A.Rubio
2015-01-21 16:14:48 UTC
Permalink
Hello

I have

CentOS 7
Pacemaker 1.1.10-32.el7_0.1
Corosync Cluster Engine, version '2.3.3'
libvirtd (libvirt) 1.1.1

with a virtual machine defined

Resource: srvdev02 (class=ocf provider=heartbeat type=VirtualDomain)
Attributes: hypervisor=qemu:///system
config=/home/datos/xmls/srvdev02.xml migration_transport=ssh
Meta Attrs: allow-migrate=true
Operations: start interval=0s timeout=90000
(srvdev02-start-timeout-90000)
stop interval=0s timeout=90000 (srvdev02-stop-timeout-90000)
monitor interval=10 timeout=30 (srvdev02-monitor-interval-10)

When I stop the Virtual Machine srvdev02 with

# pcs resource disable srvdev02

the system shutdown virtual machine ok, but VirtualDomain undefine this
virtual machine right away and this script re-entry in a bucle that
never finish.

If I put in this script, inside the function
VirtualDomain_Status() {

else
# During all other actions, we just wait and try
# again, relying on the CRM/LRM to time us out if
# this takes too long.
ocf_log info "Virtual domain $DOMAIN_NAME currently
has no state, retrying."

# MY MODIFICATION
virsh $VIRSH_OPTIONS define ${OCF_RESKEY_config}

fi
sleep 1
;;
*)
# any other output is unexpected.
ocf_log error "Virtual domain $DOMAIN_NAME has unknown
status \"$status\"!"
sleep 1
;;

it works fine.

Anyone known what is the problem ???

thanks.

Excuse my english :-(

_______________________________________________
Pacemaker mailing list: ***@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
Dejan Muhamedagic
2015-01-22 10:20:59 UTC
Permalink
Hi,
Post by A.Rubio
Hello
I have
CentOS 7
Pacemaker 1.1.10-32.el7_0.1
Corosync Cluster Engine, version '2.3.3'
libvirtd (libvirt) 1.1.1
with a virtual machine defined
Resource: srvdev02 (class=ocf provider=heartbeat type=VirtualDomain)
Attributes: hypervisor=qemu:///system
config=/home/datos/xmls/srvdev02.xml migration_transport=ssh
Meta Attrs: allow-migrate=true
Operations: start interval=0s timeout=90000
(srvdev02-start-timeout-90000)
stop interval=0s timeout=90000 (srvdev02-stop-timeout-90000)
monitor interval=10 timeout=30 (srvdev02-monitor-interval-10)
When I stop the Virtual Machine srvdev02 with
# pcs resource disable srvdev02
the system shutdown virtual machine ok, but VirtualDomain undefine
this virtual machine right away and this script re-entry in a bucle
that never finish.
Does it happen every time on stop?
Post by A.Rubio
If I put in this script, inside the function
VirtualDomain_Status() {
else
# During all other actions, we just wait and try
# again, relying on the CRM/LRM to time us out if
# this takes too long.
ocf_log info "Virtual domain $DOMAIN_NAME
currently has no state, retrying."
# MY MODIFICATION
virsh $VIRSH_OPTIONS define ${OCF_RESKEY_config}
This is not the right way, but I get your point. The VM is gone
and the status function thinks that it may be temporarily not
available.
Post by A.Rubio
fi
sleep 1
;;
*)
# any other output is unexpected.
ocf_log error "Virtual domain $DOMAIN_NAME has
unknown status \"$status\"!"
sleep 1
;;
it works fine.
Anyone known what is the problem ???
I think that we need to fix the script.

Can you show the output of the following command:

$ grep Build.version /usr/lib/ocf/lib/heartbeat/ocf-shellfuncs
Post by A.Rubio
thanks.
Excuse my english :-(
Your english is fine.

Thanks,

Dejan
Post by A.Rubio
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
_______________________________________________
Pacemaker mailing list: ***@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
A.Rubio
2015-01-22 16:14:37 UTC
Permalink
Post by Dejan Muhamedagic
Hi,
Post by A.Rubio
Hello
I have
CentOS 7
Pacemaker 1.1.10-32.el7_0.1
Corosync Cluster Engine, version '2.3.3'
libvirtd (libvirt) 1.1.1
with a virtual machine defined
Resource: srvdev02 (class=ocf provider=heartbeat type=VirtualDomain)
Attributes: hypervisor=qemu:///system
config=/home/datos/xmls/srvdev02.xml migration_transport=ssh
Meta Attrs: allow-migrate=true
Operations: start interval=0s timeout=90000
(srvdev02-start-timeout-90000)
stop interval=0s timeout=90000 (srvdev02-stop-timeout-90000)
monitor interval=10 timeout=30 (srvdev02-monitor-interval-10)
When I stop the Virtual Machine srvdev02 with
# pcs resource disable srvdev02
the system shutdown virtual machine ok, but VirtualDomain undefine
this virtual machine right away and this script re-entry in a bucle
that never finish.
Does it happen every time on stop?
Yes, it does
Post by Dejan Muhamedagic
Post by A.Rubio
If I put in this script, inside the function
VirtualDomain_Status() {
else
# During all other actions, we just wait and try
# again, relying on the CRM/LRM to time us out if
# this takes too long.
ocf_log info "Virtual domain $DOMAIN_NAME
currently has no state, retrying."
# MY MODIFICATION
virsh $VIRSH_OPTIONS define ${OCF_RESKEY_config}
This is not the right way, but I get your point. The VM is gone
and the status function thinks that it may be temporarily not
available.
It's true, but this patch solved my problem temporarily.
Post by Dejan Muhamedagic
Post by A.Rubio
fi
sleep 1
;;
*)
# any other output is unexpected.
ocf_log error "Virtual domain $DOMAIN_NAME has
unknown status \"$status\"!"
sleep 1
;;
it works fine.
Anyone known what is the problem ???
I think that we need to fix the script.
$ grep Build.version /usr/lib/ocf/lib/heartbeat/ocf-shellfuncs
# Build version: 5434e9646462d2c3c8f7aad2609d0ef1875839c7
Post by Dejan Muhamedagic
Post by A.Rubio
thanks.
Excuse my english :-(
Your english is fine.
Thanks,
Dejan
Post by A.Rubio
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
_______________________________________________
Pacemaker mailing list: ***@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bu
A.Rubio
2015-01-23 15:29:25 UTC
Permalink
Forgive me, I made a mistake

The script modification were

....
sleep 1
;;
*)
# any other output is unexpected.
ocf_log error "Virtual domain $DOMAIN_NAME has unknown
status \"$status\"!"

# MY MODIFICATION
virsh $VIRSH_OPTIONS define ${OCF_RESKEY_config}

sleep 1
;;
esac
done
return $rc

within the function VirtualDomain_Status() {

Because when I do an domain stop and the script VirtualDomain does a
virsh shutdown in the function VirtualDomain_Stop()

....
# issue the shutdown if save state didn't shutdown for us
if [ $needshutdown -eq 1 ]; then
# Issue a graceful shutdown request
virsh $VIRSH_OPTIONS shutdown ${DOMAIN_NAME}
fi
....

virsh undefined the domain, and VirtualDomain_Status not find the domain.

Regards
Post by A.Rubio
Post by Dejan Muhamedagic
Hi,
Post by A.Rubio
Hello
I have
CentOS 7
Pacemaker 1.1.10-32.el7_0.1
Corosync Cluster Engine, version '2.3.3'
libvirtd (libvirt) 1.1.1
with a virtual machine defined
Resource: srvdev02 (class=ocf provider=heartbeat type=VirtualDomain)
Attributes: hypervisor=qemu:///system
config=/home/datos/xmls/srvdev02.xml migration_transport=ssh
Meta Attrs: allow-migrate=true
Operations: start interval=0s timeout=90000
(srvdev02-start-timeout-90000)
stop interval=0s timeout=90000 (srvdev02-stop-timeout-90000)
monitor interval=10 timeout=30 (srvdev02-monitor-interval-10)
When I stop the Virtual Machine srvdev02 with
# pcs resource disable srvdev02
the system shutdown virtual machine ok, but VirtualDomain undefine
this virtual machine right away and this script re-entry in a bucle
that never finish.
Does it happen every time on stop?
Yes, it does
Post by Dejan Muhamedagic
Post by A.Rubio
If I put in this script, inside the function
VirtualDomain_Status() {
else
# During all other actions, we just wait and try
# again, relying on the CRM/LRM to time us out if
# this takes too long.
ocf_log info "Virtual domain $DOMAIN_NAME
currently has no state, retrying."
# MY MODIFICATION
virsh $VIRSH_OPTIONS define ${OCF_RESKEY_config}
This is not the right way, but I get your point. The VM is gone
and the status function thinks that it may be temporarily not
available.
It's true, but this patch solved my problem temporarily.
Post by Dejan Muhamedagic
Post by A.Rubio
fi
sleep 1
;;
*)
# any other output is unexpected.
ocf_log error "Virtual domain $DOMAIN_NAME has
unknown status \"$status\"!"
sleep 1
;;
it works fine.
Anyone known what is the problem ???
I think that we need to fix the script.
$ grep Build.version /usr/lib/ocf/lib/heartbeat/ocf-shellfuncs
# Build version: 5434e9646462d2c3c8f7aad2609d0ef1875839c7
Post by Dejan Muhamedagic
Post by A.Rubio
thanks.
Excuse my english :-(
Your english is fine.
Thanks,
Dejan
Post by A.Rubio
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
_______________________________________________
Pacemaker mailing list: ***@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Clust
Dejan Muhamedagic
2015-01-26 15:04:18 UTC
Permalink
Hi,
Post by A.Rubio
Forgive me, I made a mistake
The script modification were
....
sleep 1
;;
*)
# any other output is unexpected.
ocf_log error "Virtual domain $DOMAIN_NAME has
unknown status \"$status\"!"
# MY MODIFICATION
virsh $VIRSH_OPTIONS define ${OCF_RESKEY_config}
sleep 1
;;
esac
done
return $rc
within the function VirtualDomain_Status() {
Because when I do an domain stop and the script VirtualDomain does a
virsh shutdown in the function VirtualDomain_Stop()
....
# issue the shutdown if save state didn't shutdown for us
if [ $needshutdown -eq 1 ]; then
# Issue a graceful shutdown request
virsh $VIRSH_OPTIONS shutdown ${DOMAIN_NAME}
fi
....
virsh undefined the domain, and VirtualDomain_Status not find the domain.
That's most probably still not good, but I cannot tell you what
would be the right fix because the version you're running is
quite old and in the meantime VirtualDomain got changed and fixed
in many ways. You'll need to either upgrade by yourself or report
the bug to your vendor. Sorry that I cannot be of more help here.

Thanks,

Dejan
Post by A.Rubio
Regards
Post by A.Rubio
Post by Dejan Muhamedagic
Hi,
Post by A.Rubio
Hello
I have
CentOS 7
Pacemaker 1.1.10-32.el7_0.1
Corosync Cluster Engine, version '2.3.3'
libvirtd (libvirt) 1.1.1
with a virtual machine defined
Resource: srvdev02 (class=ocf provider=heartbeat type=VirtualDomain)
Attributes: hypervisor=qemu:///system
config=/home/datos/xmls/srvdev02.xml migration_transport=ssh
Meta Attrs: allow-migrate=true
Operations: start interval=0s timeout=90000
(srvdev02-start-timeout-90000)
stop interval=0s timeout=90000 (srvdev02-stop-timeout-90000)
monitor interval=10 timeout=30 (srvdev02-monitor-interval-10)
When I stop the Virtual Machine srvdev02 with
# pcs resource disable srvdev02
the system shutdown virtual machine ok, but VirtualDomain undefine
this virtual machine right away and this script re-entry in a bucle
that never finish.
Does it happen every time on stop?
Yes, it does
Post by Dejan Muhamedagic
Post by A.Rubio
If I put in this script, inside the function
VirtualDomain_Status() {
else
# During all other actions, we just wait and try
# again, relying on the CRM/LRM to time us out if
# this takes too long.
ocf_log info "Virtual domain $DOMAIN_NAME
currently has no state, retrying."
# MY MODIFICATION
virsh $VIRSH_OPTIONS define ${OCF_RESKEY_config}
This is not the right way, but I get your point. The VM is gone
and the status function thinks that it may be temporarily not
available.
It's true, but this patch solved my problem temporarily.
Post by Dejan Muhamedagic
Post by A.Rubio
fi
sleep 1
;;
*)
# any other output is unexpected.
ocf_log error "Virtual domain $DOMAIN_NAME has
unknown status \"$status\"!"
sleep 1
;;
it works fine.
Anyone known what is the problem ???
I think that we need to fix the script.
$ grep Build.version /usr/lib/ocf/lib/heartbeat/ocf-shellfuncs
# Build version: 5434e9646462d2c3c8f7aad2609d0ef1875839c7
Post by Dejan Muhamedagic
Post by A.Rubio
thanks.
Excuse my english :-(
Your english is fine.
Thanks,
Dejan
Post by A.Rubio
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
_______________________________________________
Pacemaker mailing list: ***@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Loading...