[Pacemaker] Writing RAs - Parameters per node

2013-03-13 Thread Riccardo Bicelli

Hello,
does anyone know if it is possible to have, in CIB declaration, a set of 
parameters with different value per node?


For example, I have an RA which is dealing with SCSI target on 
infiniband HCA card.


on node1 the port I want to use is port1 of Infiniband card 1
on node2 the the port I want to use is port2 of Infiniband Card 2

Is there any way to declare parameters per host both on a standard and 
cloned  resource?


And how to deal with it into the RA script?

Or in this case have I to do this mapping on local files end reading 
from them?


Thank you :)



___
Pacemaker mailing list: Pacemaker@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


Re: [Pacemaker] Writing RAs - Parameters per node

2013-03-13 Thread Lars Marowsky-Bree
On 2013-03-13T19:38:57, Riccardo Bicelli r.bice...@gmail.com wrote:

 Hello,
 does anyone know if it is possible to have, in CIB declaration, a set of
 parameters with different value per node?

Yes.

 For example, I have an RA which is dealing with SCSI target on infiniband
 HCA card.
 
 on node1 the port I want to use is port1 of Infiniband card 1
 on node2 the the port I want to use is port2 of Infiniband Card 2
 
 Is there any way to declare parameters per host both on a standard and
 cloned  resource?

This is possible (you can have rules for the instance attributes), *but*
it is a really bad idea for administrative reasons. It'll be a nightmare
to remember, and bite you in every single script.

It's usually a lot better to rename the ports via udev/ipaddr rules. Not
sure how to do that for IB, but it's possible for everything else.

Of course, it's even better to plug everything into the same ports ;-)
That makes working on the hardware less confusing.


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


___
Pacemaker mailing list: Pacemaker@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


Re: [Pacemaker] Writing RAs - Parameters per node

2013-03-13 Thread Riccardo Bicelli


Hello,
This is possible (you can have rules for the instance attributes), 

Could you provide me an example?
*but* it is a really bad idea for administrative reasons. It'll be a 
nightmare to remember, and bite you in every single script. It's 
usually a lot better to rename the ports via udev/ipaddr rules. Not 
sure how to do that for IB
In this case is not possible (or is more nightmare than defining 
parameter in RA), because is the target created by SCST, that is not 
mapped to a device but only creates control interface under sysfs.

Each port has a specific GUID.
I need to control where to migrate the scsi target, because different 
boards do different things.


Regards,
Riccardo

___
Pacemaker mailing list: Pacemaker@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


Re: [Pacemaker] Writing RAs - Parameters per node

2013-03-13 Thread Andrew Beekhof
On Thu, Mar 14, 2013 at 6:22 AM, Riccardo Bicelli r.bice...@gmail.com wrote:

 Hello,

 This is possible (you can have rules for the instance attributes),

 Could you provide me an example?

This should do it:

http://clusterlabs.org/doc/en-US/Pacemaker/1.1-crmsh/html/Pacemaker_Explained/_using_rules_to_control_resource_options.html


 *but* it is a really bad idea for administrative reasons. It'll be a
 nightmare to remember, and bite you in every single script. It's usually a
 lot better to rename the ports via udev/ipaddr rules. Not sure how to do
 that for IB

 In this case is not possible (or is more nightmare than defining parameter
 in RA), because is the target created by SCST, that is not mapped to a
 device but only creates control interface under sysfs.
 Each port has a specific GUID.
 I need to control where to migrate the scsi target, because different
 boards do different things.

 Regards,
 Riccardo


 ___
 Pacemaker mailing list: Pacemaker@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

___
Pacemaker mailing list: Pacemaker@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