INNER CODE UNIT · Python

die

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

def die(msg):
    print("ERROR: " + msg, file=sys.stderr)
    sys.exit(1)


def local_node(cluster_nodes=None):
    """This node's name as LINSTOR knows it.

    Node names are whatever was registered: short on some clusters, fully
    qualified on others. Match the local hostname against the cluster's own
    list rather than assuming one form -- stripping the domain unconditionally
    makes this node look unregistered on an FQDN cluster.
    """
    host = socket.gethostname()
    short = host.split(".")[0]
    if cluster_nodes:
        for candidate in (host, short):
            if candidate in cluster_nodes:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…