[Pacemaker] Low cost stonith device

Florian Haas florian.haas at linbit.com
Mon Oct 5 12:39:19 UTC 2009


On 2009-10-05 14:28, Dejan Muhamedagic wrote:
> Hi,
> 
> On Mon, Oct 05, 2009 at 02:01:49PM +0200, Florian Haas wrote:
>> On 2009-10-05 10:37, Johan Verrept wrote:
>>> Hello guys,
>>>
>>>    I completed the RA and have attached it. As far as I can tell it is
>>> fully functional but I would appreciate it if someone "in the know"
>>> would take a look and gave me some feedback.
>> I'm unable to test this as I don't have a device available, but:
>>
>>> gethosts)
>>> 	# print hosts with domainname
>>> 	domain=`domainname`
>>> 	for host in `list_devices`;
>>> 	do
>>> 		echo $host.$domain
>>> 	done;
>> Can you make sure that this works both on systems where "uname -n"
>> returns just the hostname (such as Debian or SuSE), and on those where
>> it returns the FQDN (such as RHEL/CentOS)? I'm not sure if gethosts
>> always expects to get the FQDN, or whether it expects node names as
>> found in the CIB -- which, outside RHEL/CentOS, are unqualified.
> 
> Well spotted. But actually gethosts should return a list of
> nodenames, as they are configured in the CIB.

And whether or not these node names are fully-qualified or not is
actually not up to the user, but depends on the distro used. That was my
point. :)

> Now, if
> list_devices, which actually uses GetPowerName.cgi, shows host
> names as they are defined by the user, I wonder why it's needed
> to append the domain. If the user wants node names with domain
> couldn't he also define them so in the stonith device?

It should be the other way round: If the CIB contains node names with a
domain (RHEL/CentOS), then the stonith device should also be configured
with FQDNs for host names. At which point appending `domainname` becomes
pointless. If conversely the CIB contains unqualified node names (other
platforms), then the stonith device should be configured to refer to
unqualified host names as well.

So the above snippet can probably be reduced to
gethosts)
  list_devices
  ;;

... and then it would be up to the user to configure the stonith device
to match the CIB.

Florian


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20091005/6a886b1a/attachment-0004.sig>


More information about the Pacemaker mailing list