[ClusterLabs] nodes ID assignment issue

Radoslaw Garbacz radoslaw.garbacz at xtremedatainc.com
Thu Apr 13 17:40:09 CEST 2017


Hi,

I have a question regarding building CIB nodes scope and specifically
assignment to node IDs.
It seems like the preexisting scope is not honored and nodes can get
replaced based on check-in order.

I pre-create the nodes scope because it is faster, then setting parameters
for all the nodes later (when the number of nodes is large).

>From the listings below, one can see that node with ID=1 was replaced with
another node (uname), however not the options. This situation causes
problems when resource assignment is based on rules involving node options.

Is there a way to prevent this rearrangement of 'uname', if not whether
there is a way to make the options follow 'uname', or maybe the problem is
somewhere else - corosync configuration perhaps?
Is the corosync 'nodeid' enforced to be also CIB node 'id'?


Thanks in advance,


Below is CIB committed before nodes check-in:

    <nodes>
      <node uname="ip-10-182-231-211" id="1">
        <instance_attributes id="nodes-1">
          <nvpair id="nodes-1-STATE" value="Active" name="STATE"/>
          <nvpair id="nodes-1-ROLE" value="AD" name="ROLE"/>
          <nvpair id="nodes-1-Primary" value="True" name="Primary"/>
        </instance_attributes>
      </node>
      <node uname="ip-10-30-213-166" type="remote" id="ip-10-30-213-166">
        <instance_attributes id="nodes-ip-10-30-213-166">
          <nvpair id="nodes-ip-10-30-213-166-STATE" value="Active"
name="STATE"/>
          <nvpair id="nodes-ip-10-30-213-166-ROLE" value="AD" name="ROLE"/>
          <nvpair id="nodes-ip-10-30-213-166-Primary" value="False"
name="Primary"/>
        </instance_attributes>
      </node>
      <node uname="ip-10-183-158-204" type="remote" id="ip-10-183-158-204">
        <instance_attributes id="nodes-ip-10-183-158-204">
          <nvpair id="nodes-ip-10-183-158-204-STATE" value="Active"
name="STATE"/>
          <nvpair id="nodes-ip-10-183-158-204-ROLE" value="AD" name="ROLE"/>
          <nvpair id="nodes-ip-10-183-158-204-Primary" value="False"
name="Primary"/>
        </instance_attributes>
      </node>
      <node uname="ip-10-138-145-2" type="remote" id="ip-10-138-145-2">
        <instance_attributes id="nodes-ip-10-138-145-2">
          <nvpair id="nodes-ip-10-138-145-2-STATE" value="Active"
name="STATE"/>
          <nvpair id="nodes-ip-10-138-145-2-ROLE" value="AD" name="ROLE"/>
          <nvpair id="nodes-ip-10-138-145-2-Primary" value="False"
name="Primary"/>
        </instance_attributes>
      </node>
      <node uname="ip-10-146-241-194" id="2">
        <instance_attributes id="nodes-2">
          <nvpair id="nodes-2-STATE" value="Active" name="STATE"/>
          <nvpair id="nodes-2-ROLE" value="AH" name="ROLE"/>
          <nvpair id="nodes-2-Primary" value="True" name="Primary"/>
        </instance_attributes>
      </node>
    </nodes>



And automatic changes after nodes check-in:

    <nodes>
      <node uname="ip-10-146-241-194" id="1">
        <instance_attributes id="nodes-1">
          <nvpair id="nodes-1-STATE" value="Active" name="STATE"/>
          <nvpair id="nodes-1-ROLE" value="AD" name="ROLE"/>
          <nvpair id="nodes-1-Primary" value="True" name="Primary"/>
        </instance_attributes>
      </node>
      <node uname="ip-10-30-213-166" type="remote" id="ip-10-30-213-166">
        <instance_attributes id="nodes-ip-10-30-213-166">
          <nvpair id="nodes-ip-10-30-213-166-STATE" value="Active"
name="STATE"/>
          <nvpair id="nodes-ip-10-30-213-166-ROLE" value="AD" name="ROLE"/>
          <nvpair id="nodes-ip-10-30-213-166-Primary" value="False"
name="Primary"/>
        </instance_attributes>
      </node>
      <node uname="ip-10-183-158-204" type="remote" id="ip-10-183-158-204">
        <instance_attributes id="nodes-ip-10-183-158-204">
          <nvpair id="nodes-ip-10-183-158-204-STATE" value="Active"
name="STATE"/>
          <nvpair id="nodes-ip-10-183-158-204-ROLE" value="AD" name="ROLE"/>
          <nvpair id="nodes-ip-10-183-158-204-Primary" value="False"
name="Primary"/>
        </instance_attributes>
      </node>
      <node uname="ip-10-138-145-2" type="remote" id="ip-10-138-145-2">
        <instance_attributes id="nodes-ip-10-138-145-2">
          <nvpair id="nodes-ip-10-138-145-2-STATE" value="Active"
name="STATE"/>
          <nvpair id="nodes-ip-10-138-145-2-ROLE" value="AD" name="ROLE"/>
          <nvpair id="nodes-ip-10-138-145-2-Primary" value="False"
name="Primary"/>
        </instance_attributes>
      </node>
      <node uname="ip-10-182-231-211" id="2">
        <instance_attributes id="nodes-2">
          <nvpair id="nodes-2-STATE" value="Active" name="STATE"/>
          <nvpair id="nodes-2-ROLE" value="AH" name="ROLE"/>
          <nvpair id="nodes-2-Primary" value="True" name="Primary"/>
        </instance_attributes>
      </node>
    </nodes>



-- 
Best Regards,

Radoslaw Garbacz
XtremeData Incorporated
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/users/attachments/20170413/cdf40f9b/attachment.html>


More information about the Users mailing list