예제 #1
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("  ")
예제 #2
0
파일: status.py 프로젝트: disco-stu/pcs
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("  ")
예제 #3
0
파일: status.py 프로젝트: ingted/xlbase
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("  ")
예제 #4
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("  ")
예제 #5
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("  ")
예제 #6
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("  ")