Exemple #1
0
def config_show(argv):
    print "Cluster Name: %s" % utils.getClusterName()
    status.nodes_status(["config"])
    print ""
    print ""
    config_show_cib()
    cluster.cluster_uidgid([], True)
Exemple #2
0
def full_status():
    if "--full" in utils.pcs_options:
        (output, retval) = utils.run(["crm_mon", "-1", "-r", "-R", "-A", "-f"])
    else:
        (output, retval) = utils.run(["crm_mon", "-1", "-r"])

    if (retval != 0):
        utils.err("cluster is not currently running on this node")

    if not utils.usefile or "--corosync_conf" in utils.pcs_options:
        cluster_name = utils.getClusterName()
        print "Cluster name: %s" % cluster_name

    if utils.stonithCheck():
        print("WARNING: no stonith devices and stonith-enabled is not false")

    if utils.corosyncPacemakerNodeCheck():
        print("WARNING: corosync and pacemaker node names do not match (IPs used in setup?)")

    print output

    if not utils.usefile:
        if not utils.is_rhel6():
            print "PCSD Status:"
            cluster.cluster_gui_status([],True)
            print ""
        utils.serviceStatus("  ")
Exemple #3
0
def full_status():
    if "--full" in utils.pcs_options:
        (output, retval) = utils.run(["crm_mon", "-1", "-r", "-R", "-A", "-f"])
    else:
        (output, retval) = utils.run(["crm_mon", "-1", "-r"])

    if (retval != 0):
        utils.err("cluster is not currently running on this node")

    if not utils.usefile or "--corosync_conf" in utils.pcs_options:
        cluster_name = utils.getClusterName()
        print("Cluster name: %s" % cluster_name)

    if utils.stonithCheck():
        print("WARNING: no stonith devices and stonith-enabled is not false")

    if utils.corosyncPacemakerNodeCheck():
        print(
            "WARNING: corosync and pacemaker node names do not match (IPs used in setup?)"
        )

    print(output)

    if not utils.usefile:
        print_pcsd_daemon_status()
        print()
        utils.serviceStatus("  ")
Exemple #4
0
def config_show(argv):
    print("Cluster Name: %s" % utils.getClusterName())
    status.nodes_status(["config"])
    print("")
    print("")
    config_show_cib()
    cluster.cluster_uidgid([], True)
Exemple #5
0
def print_config():
    print "Cluster Name: %s" % utils.getClusterName()
    status.nodes_status(["config"])
    print ""
    print ""
    print "Resources: "
    utils.pcs_options["--all"] = 1
    resource.resource_show([])
    print ""
    constraint.location_show([])
    constraint.order_show([])
    constraint.colocation_show([])
    print ""
    prop.list_property([])
Exemple #6
0
def full_status():
    #print("rrr 02010 full_status")

    with open("/python.out", "a") as myfile:
        myfile.write("rrr 02010 full_status")

    if "--full" in utils.pcs_options:
        (output, retval) = utils.run(["crm_mon", "-1", "-r", "-R", "-A", "-f"])
    else:
        (output, retval) = utils.run(["crm_mon", "-1", "-r"])

    if (retval != 0):
        utils.err("cluster is not currently running on this node")

    if not utils.usefile or "--corosync_conf" in utils.pcs_options:
        cluster_name = utils.getClusterName()
        print "Cluster name: %s" % cluster_name

    #print("rrr 02015 utils.stonithCheck()")
    
    with open("/python.out", "a") as myfile:
        myfile.write("rrr 02015 utils.stonithCheck()")
    
    if utils.stonithCheck():
        print("WARNING: no stonith devices and stonith-enabled is not false")
    
    #print("rrr 02016 utils.corosyncPacemakerNodeCheck()")
    with open("/python.out", "a") as myfile:
        myfile.write("rrr 02016 utils.corosyncPacemakerNodeCheck()")

    if utils.corosyncPacemakerNodeCheck():
        print("WARNING: corosync and pacemaker node names do not match (IPs used in setup?)")
    #print("rrr 02017 print output")
    #print output

    #print("rrr 02020: status.py not utils.usefile print_pcsd_daemon_status()")
    with open("/python.out", "a") as myfile:
        myfile.write("rrr 02017 print output")
        myfile.write(output)
        myfile.write("rrr 02020: status.py not utils.usefile print_pcsd_daemon_status()")
    if not utils.usefile:
        print_pcsd_daemon_status()
        print
        utils.serviceStatus("  ")
Exemple #7
0
def full_status():
    (output, retval) = utils.run(["crm_mon", "-1", "-r"])

    if (retval != 0):
        utils.err("cluster is not currently running on this node")

    cluster_name = utils.getClusterName()
    print "Cluster name: %s" % cluster_name

    if utils.stonithCheck():
        print("WARNING: no stonith devices and stonith-enabled is not false")

    print output
    print ""
    if not utils.is_rhel6():
        print "PCSD Status:"
        cluster.cluster_gui_status([],True)
        print ""
    utils.serviceStatus("  ")
Exemple #8
0
def full_status():
    (output, retval) = utils.run(["crm_mon", "-1", "-r"])

    if (retval != 0):
        utils.err("cluster is not currently running on this node")

    cluster_name = utils.getClusterName()
    print "Cluster name: %s" % cluster_name

    if utils.stonithCheck():
        print("WARNING: no stonith devices and stonith-enabled is not false")

    print output
    print ""
    if not utils.is_rhel6():
        print "PCSD Status:"
        cluster.cluster_gui_status([], True)
        print ""
    utils.serviceStatus("  ")
Exemple #9
0
def print_config():
    print "Cluster Name: %s" % utils.getClusterName()
    status.nodes_status(["config"])
    print ""
    print ""
    print "Resources: "
    utils.pcs_options["--all"] = 1
    resource.resource_show([])
    print ""
    print "Stonith Devices: "
    resource.resource_show([], True)
    print "Fencing Levels: "
    print ""
    stonith.stonith_level_show()
    constraint.location_show([])
    constraint.order_show([])
    constraint.colocation_show([])
    print ""
    del utils.pcs_options["--all"]
    prop.list_property([])
Exemple #10
0
def full_status():
    if "--full" in utils.pcs_options:
        (output, retval) = utils.run(["crm_mon", "-1", "-r", "-R"])
    else:
        (output, retval) = utils.run(["crm_mon", "-1", "-r"])

    if (retval != 0):
        utils.err("cluster is not currently running on this node")

    if not utils.usefile or "--corosync_conf" in utils.pcs_options:
        cluster_name = utils.getClusterName()
        print "Cluster name: %s" % cluster_name

    if utils.stonithCheck():
        print("WARNING: no stonith devices and stonith-enabled is not false")

    print output

    if not utils.usefile:
        if not utils.is_rhel6():
            print "PCSD Status:"
            cluster.cluster_gui_status([], True)
            print ""
        utils.serviceStatus("  ")