Re: [Linux-ha-dev] Stonith turns node names to lowercase

2011-10-20 Thread Alan Robertson
On 10/19/2011 04:11 AM, Lars Marowsky-Bree wrote:
 On 2011-10-18T12:40:40, Florian Haasflor...@hastexo.com  wrote:

g_strdown(nodecopy);

 Is there a reason for this ?
 I suppose Dejan will accept a patch making this configurable.
 Please, no. We fence by hostname; hostnames are case insensitive by
 definition. Plugins need to handle that.
More specifically - this patch was put in to make this work in the real 
world.  In the real world, host names correspond to DNS names (or you 
will go crazy).  DNS names are case-insensitive - and that's how it is.


-- 
 Alan Robertsonal...@unix.sh

Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions. - William Wilberforce
___
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/


Re: [Linux-ha-dev] Stonith turns node names to lowercase

2011-10-19 Thread Alberic de Pertat
Hi,

  I am currently in the process of writing a fencing agent for VMware
  vCenter. After some tests, I noticed that the stonith command is
  turning the nodename to lowercase.

 But there is already a vcenter stonith plugin (external/vcenter).

Argh I should have started there.

  The problem is that almost every VM in my inventory is uppercase
  with some mixed case too. VMware allows you to have two VM with
  the same name but different cases. I cannot find a proper way to
  deal with this as a case insensitive search through the inventory
  could yield more than one result.

 Interesting. Not sure why would one want to have two VM's names
 differ only in case.

I can't really say, but since it is possible, people will do eventually it.

  Looking through the stonith command source (Mercurial HEAD), I
  found the following in stonith.c (l. 456) :
 
  g_strdown(nodecopy);
 
  Is there a reason for this ?

 Not completely sure, but most probably it was there because some
 devices ignore case and produce only upper (or lower) case names.
 The case should be ignored when matching node names.

Well, I went around it by using VMware UUIDs, which are known to be unique and 
persistent, so the problem is solved for me but may arise again later.


I'm attaching what I did for reference. If I can find time to do it, I'll try 
to merge this (UUID support) with the vcenter agent.


Thanks to all.
--
Albéric de Pertat
ADELUX
01 40 86 45 81


vmware-vcenter
Description: Perl program
___
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/


Re: [Linux-ha-dev] Stonith turns node names to lowercase

2011-10-19 Thread Lars Marowsky-Bree
On 2011-10-18T12:12:05, Alberic de Pertat alberic.deper...@adelux.fr wrote:

 I am currently in the process of writing a fencing agent for VMware vCenter. 
 After some tests, I noticed that the stonith command is turning the nodename 
 to lowercase.

Yes, that was added because host/nodenames by definition *are* case
insensitive. DNS, /etc/hosts, etc.

If you use VM name == hostname as a convention, even though VM names
themselves are case sensitive in VMware, you have effectively adopted a
policy that makes them case insensitive.

Names that differ just in case thus need to be considered a policy
violation; the stonith agent probably should detect and warn about this
(perhaps in the monitor?).


Regards,
Lars

-- 
Architect Storage/HA
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 
21284 (AG Nürnberg)
Experience is the name everyone gives to their mistakes. -- Oscar Wilde

___
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/


Re: [Linux-ha-dev] Stonith turns node names to lowercase

2011-10-19 Thread Lars Marowsky-Bree
On 2011-10-18T12:40:40, Florian Haas flor...@hastexo.com wrote:

g_strdown(nodecopy);
  
  Is there a reason for this ?
 I suppose Dejan will accept a patch making this configurable.

Please, no. We fence by hostname; hostnames are case insensitive by
definition. Plugins need to handle that.



Regards,
Lars

-- 
Architect Storage/HA
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 
21284 (AG Nürnberg)
Experience is the name everyone gives to their mistakes. -- Oscar Wilde

___
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/


Re: [Linux-ha-dev] Stonith turns node names to lowercase

2011-10-19 Thread Dejan Muhamedagic
Hi,

On Wed, Oct 19, 2011 at 10:49:57AM +0200, Alberic de Pertat wrote:
 Hi,
 
   I am currently in the process of writing a fencing agent for VMware
   vCenter. After some tests, I noticed that the stonith command is
   turning the nodename to lowercase.
 
  But there is already a vcenter stonith plugin (external/vcenter).
 
 Argh I should have started there.
 
   The problem is that almost every VM in my inventory is uppercase
   with some mixed case too. VMware allows you to have two VM with
   the same name but different cases. I cannot find a proper way to
   deal with this as a case insensitive search through the inventory
   could yield more than one result.
 
  Interesting. Not sure why would one want to have two VM's names
  differ only in case.
 
 I can't really say, but since it is possible, people will do eventually it.

I'd really be very reluctant to support such setups. It can only
cause headache for everybody involved.

Thanks,

Dejan

   Looking through the stonith command source (Mercurial HEAD), I
   found the following in stonith.c (l. 456) :
  
   g_strdown(nodecopy);
  
   Is there a reason for this ?
 
  Not completely sure, but most probably it was there because some
  devices ignore case and produce only upper (or lower) case names.
  The case should be ignored when matching node names.
 
 Well, I went around it by using VMware UUIDs, which are known to be unique 
 and persistent, so the problem is solved for me but may arise again later.
 
 
 I'm attaching what I did for reference. If I can find time to do it, I'll try 
 to merge this (UUID support) with the vcenter agent.
 
 
 Thanks to all.
 --
 Albéric de Pertat
 ADELUX
 01 40 86 45 81


 ___
 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/

___
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/


[Linux-ha-dev] Stonith turns node names to lowercase

2011-10-18 Thread Alberic de Pertat
Hi,


I am currently in the process of writing a fencing agent for VMware vCenter. 
After some tests, I noticed that the stonith command is turning the nodename to 
lowercase.


The problem is that almost every VM in my inventory is uppercase with some 
mixed case too. VMware allows you to have two VM with the same name but 
different cases. I cannot find a proper way to deal with this as a case 
insensitive search through the inventory could yield more than one result.


Looking through the stonith command source (Mercurial HEAD), I found the 
following in stonith.c (l. 456) :


g_strdown(nodecopy);


Is there a reason for this ?




Thanks a lot
--

Albéric de Pertat
ADELUX
01 40 86 45 81
___
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/


Re: [Linux-ha-dev] Stonith turns node names to lowercase

2011-10-18 Thread Dejan Muhamedagic
Hi,

On Tue, Oct 18, 2011 at 12:12:05PM +0200, Alberic de Pertat wrote:
 Hi,
 
 
 I am currently in the process of writing a fencing agent for VMware vCenter. 
 After some tests, I noticed that the stonith command is turning the nodename 
 to lowercase.

But there is already a vcenter stonith plugin (external/vcenter).

 The problem is that almost every VM in my inventory is uppercase with some 
 mixed case too. VMware allows you to have two VM with the same name but 
 different cases. I cannot find a proper way to deal with this as a case 
 insensitive search through the inventory could yield more than one result.

Interesting. Not sure why would one want to have two VM's names
differ only in case.

 Looking through the stonith command source (Mercurial HEAD), I found the 
 following in stonith.c (l. 456) :
 
 
 g_strdown(nodecopy);
 
 
 Is there a reason for this ?

Not completely sure, but most probably it was there because some
devices ignore case and produce only upper (or lower) case names.
The case should be ignored when matching node names.

Thanks,

Dejan

 
 
 
 Thanks a lot
 --
 
 Albéric de Pertat
 ADELUX
 01 40 86 45 81

 ___
 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/

___
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/


Re: [Linux-ha-dev] Stonith turns node names to lowercase

2011-10-18 Thread Florian Haas
On 2011-10-18 12:12, Alberic de Pertat wrote:
 Hi,
 
 I am currently in the process of writing a fencing agent for VMware
 vCenter. After some tests, I noticed that the stonith command is turning
 the nodename to lowercase.
 
 The problem is that almost every VM in my inventory is uppercase with
 some mixed case too. VMware allows you to have two VM with the same name
 but different cases.

Gah. That sounds like a great way to go insane, or drive someone else
nuts. I really wonder why on earth anyone would want to do this.

 I cannot find a proper way to deal with this as a
 case insensitive search through the inventory could yield more than one
 result.
 
 Looking through the stonith command source (Mercurial HEAD), I found the
 following in stonith.c (l. 456) : 
 
   g_strdown(nodecopy);
 
 Is there a reason for this ?

I suppose Dejan will accept a patch making this configurable.

Cheers,
Florian

-- 
Need help with fencing?
http://www.hastexo.com/now
___
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/