Brad,

sorry, I'll have to drop this one too as it's doing the wrong thing.

On 2010-05-06 01:49, Dag Stenstad wrote:
> # HG changeset patch
> # User Dag Stenstad <[email protected]>
> # Date 1273102293 -7200
> # Node ID 940da087b6b7c9dc0c2817691e408d169687b34e
> # Parent  82e2fcb22863c504182f51a3d8f714077d5fe4c2
> Low: RA: VirtualDomain: Add more error handling and logging to 
> VirtualDomain_Migrate_To.
> 
> diff -r 82e2fcb22863 -r 940da087b6b7 heartbeat/VirtualDomain
> --- a/heartbeat/VirtualDomain Thu May 06 01:07:47 2010 +0200
> +++ b/heartbeat/VirtualDomain Thu May 06 01:31:33 2010 +0200
> @@ -294,8 +294,21 @@ VirtualDomain_Migrate_To() {
>  
>      target_node="$OCF_RESKEY_CRM_meta_migrate_target"
>      if ocf_is_true $OCF_RESKEY_migrate_use_fqdn; then
> +        if [ ! $(which host) ]; then
> +            ocf_log error "The host binary is not in the path."
> +            ocf_log debug "Check your distribution for the correct package 
> to install."
> +            ocf_log debug "In Debian/Ubuntu: bind9-host"
> +            ocf_log debug "In RHEL/Centos: bind-utils"
> +            exit $OCF_ERR_CONFIGURED

That's got to be $OCF_ERR_INSTALLED, and we can use check_binary for
that during validate. I'll fix it up that way.

> +        fi
>          target_node=$(host $OCF_RESKEY_CRM_meta_migrate_target | \
>          awk '{ print $1; }')
> +        if [ ${target_node} = "Host" ]; then
> +            ocf_log error "Unable to resolve migrate target FQDN."
> +            ocf_log debug "This is probably due to a misconfigured 
> /etc/resolv.conf, missing"
> +            ocf_log debug "entries in /etc/hosts or a generally broken DNS 
> setup."
> +            exit $OCF_ERR_CONFIGURED
> +        fi

Hmmm. I'm ambiguous about this part. What this means is that if we
initiate migration, and we can't resolve the host name at that time, we
don't just stop the migration and recover the resource through an
in-place shutdown and restart, but we're forcing it away, without any VM
migration, to a different host. I think this should be
$OCF_ERR_GENERIC... what do others think?

Cheers,
Florian

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to