• Iustin Pop's avatar
    Allow disk object to set their own physical ID · 0402302c
    Iustin Pop authored
    Currently, the way to customize a DRBD disk from (node name 1, node name
    2, port) to (ip1, port, ip2, port) is to use the ConfigWriter method
    SetDiskID. However, since this needs a ConfigWriter object, it can be
    run only on the master, and therefore disk object can't be passed to
    more than one node unchanged. This, coupled with the rpc layer
    limitation that all nodes in a multi-node call receive the same
    arguments, prevent any kind of multi-node operation that has disks as an
    This patch takes the SetDiskID method from ConfigWriter and ports it to
    the disk object itself, and instead of the full node configuration it
    uses a simple {node_name: replication_ip} mapping for all the nodes
    involved in the disk tree (currently we only pass primary and secondary
    node since we don't support nested drbd devices).
    This allows us to send disks to both the primary and secondary nodes at
    once and perform synchronized drbd activation on primary/secondary
    Note that while for the 1.2 branch this will not change old methods, it
    is worth to investigate and possible replace all such calls on the
    master to the nodes themselves for the 2.0 branch.
    Reviewed-by: ultrotter
objects.py 21.9 KB