INNER CODE UNIT · Python

reactor_conf

LINBIT/linstor-server · scripts/linstor-controller-ha-setup.py:52

def reactor_conf(vip=None):
    """The promoter snippet. With a VIP, an ocf:heartbeat:IPaddr2 agent is
    started between the mount and the controller, so the address follows the
    active controller — the user guide's alternative to pointing every client
    at a list of controller IPs."""
    services = ['"var-lib-linstor.mount"']
    if vip:
        address, prefix = vip
        services.append('"ocf:heartbeat:IPaddr2 service_ip ip=' + address
                        + ' cidr_netmask=' + str(prefix) + '"')
    services.append('"linstor-controller.service"')
    return ("""[[promoter]]
[promoter.resources.linstor_db]
start = [
  """ + ",\n  ".join(services) + """,
]
""")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…