def disable_cluster(argv): if len(argv) > 0: for node in argv: utils.disableCluster(node) return utils.disableServices()
def cluster_destroy(argv): if "--all" in utils.pcs_options: threads = {} for node in utils.getNodesFromCorosyncConf(): threads[node] = DestroyClusterThread(node) threads[node].start() for thread in threads.values(): thread.join() else: print "Shutting down pacemaker/corosync services..." print os.system("service pacemaker stop") print os.system("service corosync stop") print "Killing any remaining services..." os.system("killall -q -9 corosync aisexec heartbeat pacemakerd ccm stonithd ha_logd lrmd crmd pengine attrd pingd mgmtd cib fenced dlm_controld gfs_controld") utils.disableServices() print "Removing all cluster configuration files..." if utils.is_rhel6(): os.system("rm /etc/cluster/cluster.conf") else: os.system("rm /etc/corosync/corosync.conf") state_files = ["cib.xml*", "cib-*", "core.*", "hostcache", "cts.*", "pe*.bz2","cib.*"] for name in state_files: os.system("find /var/lib -name '"+name+"' -exec rm -f \{\} \;")
def cluster_destroy(argv): if "--all" in utils.pcs_options: threads = {} for node in utils.getNodesFromCorosyncConf(): threads[node] = DestroyClusterThread(node) threads[node].start() for thread in threads.values(): thread.join() else: print "Shutting down pacemaker/corosync services..." print os.system("service pacemaker stop") print os.system("service corosync stop") print "Killing any remaining services..." os.system( "killall -q -9 corosync aisexec heartbeat pacemakerd ccm stonithd ha_logd lrmd crmd pengine attrd pingd mgmtd cib fenced dlm_controld gfs_controld" ) utils.disableServices() print "Removing all cluster configuration files..." if utils.is_rhel6(): os.system("rm /etc/cluster/cluster.conf") else: os.system("rm /etc/corosync/corosync.conf") state_files = [ "cib.xml*", "cib-*", "core.*", "hostcache", "cts.*", "pe*.bz2", "cib.*" ] for name in state_files: os.system("find /var/lib -name '" + name + "' -exec rm -f \{\} \;")
def disable_cluster(argv): if len(argv) > 0: failure = False errors = "" for node in argv: (retval, err) = utils.disableCluster(node) if retval != 0: failure = True errors = errors + err+"\n" if failure: utils.err("unable to disable all nodes\n" + errors.rstrip()) return utils.disableServices()
def disable_cluster(argv): if len(argv) > 0: failure = False errors = "" for node in argv: (retval, err) = utils.disableCluster(node) if retval != 0: failure = True errors = errors + err + "\n" if failure: utils.err("unable to disable all nodes\n" + errors.rstrip()) return utils.disableServices()
def disable_cluster(argv): if len(argv) > 0: disable_cluster_nodes(argv) return utils.disableServices()