This fixes the issue described yesterday. Comments?
Regards Dominik
exporting patch: # HG changeset patch # User Dominik Klein <dominik.kl...@gmail.com> # Date 1308909599 -7200 # Node ID 2b1615aaca2c90f2f4ab93eb443e5902906fb28a # Parent 7a11934b142d1daf42a04fbaa0391a3ac47cee4c RA VirtualDomain: Fix probe if config is not on shared storage diff -r 7a11934b142d -r 2b1615aaca2c heartbeat/VirtualDomain --- a/heartbeat/VirtualDomain Fri Feb 25 12:23:17 2011 +0100 +++ b/heartbeat/VirtualDomain Fri Jun 24 11:59:59 2011 +0200 @@ -19,9 +19,11 @@ # Defaults OCF_RESKEY_force_stop_default=0 OCF_RESKEY_hypervisor_default="$(virsh --quiet uri)" +OCF_RESKEY_config_on_shared_storage_default=1 : ${OCF_RESKEY_force_stop=${OCF_RESKEY_force_stop_default}} : ${OCF_RESKEY_hypervisor=${OCF_RESKEY_hypervisor_default}} +: ${OCF_RESKEY_config_on_shared_storage=${OCF_RESKEY_config_on_shared_storage_default}} ####################################################################### ## I'd very much suggest to make this RA use bash, @@ -421,8 +423,8 @@ # check if we can read the config file (otherwise we're unable to # deduce $DOMAIN_NAME from it, see below) if [ ! -r $OCF_RESKEY_config ]; then - if ocf_is_probe; then - ocf_log info "Configuration file $OCF_RESKEY_config not readable during probe." + if ocf_is_probe && ocf_is_true $OCF_RESKEY_config_on_shared_storage; then + ocf_log info "Configuration file $OCF_RESKEY_config not readable during probe. Assuming it is on shared storage and therefore reporting VM is not running." else ocf_log error "Configuration file $OCF_RESKEY_config does not exist or is not readable." return $OCF_ERR_INSTALLED
exporting patch: # HG changeset patch # User Dominik Klein <dominik.kl...@gmail.com> # Date 1308911272 -7200 # Node ID 312adf2449eb59dcc41686626b1726428d13227b # Parent 2b1615aaca2c90f2f4ab93eb443e5902906fb28a RA VirtualDomain: Add metadata for the new parameter diff -r 2b1615aaca2c -r 312adf2449eb heartbeat/VirtualDomain --- a/heartbeat/VirtualDomain Fri Jun 24 11:59:59 2011 +0200 +++ b/heartbeat/VirtualDomain Fri Jun 24 12:27:52 2011 +0200 @@ -119,6 +119,16 @@ <content type="string" default="" /> </parameter> +<parameter name="config_on_shared_storage" unique="0" required="0"> +<longdesc lang="en"> +If your VMs configuration file is _not_ on shared storage, so that the config +file not being in place during a probe means that the VM is not installed/runnable +on that node, set this to 0. +</longdesc> +<shortdesc lang="en">Set to 0 if your VMs config file is not on shared storage</shortdesc> +<content type="boolean" default="1" /> +</parameter> + </parameters> <actions>
_______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/