Author: xwhu Date: Wed Jun 15 05:15:14 2011 New Revision: 64363 URL: http://svn.opensuse.org/viewcvs/yast?rev=64363&view=rev Log: Update the module to use corosync instead of openais Modified: trunk/cluster/agents/ag_openais trunk/cluster/src/Cluster.ycp trunk/cluster/src/dialogs.ycp Modified: trunk/cluster/agents/ag_openais URL: http://svn.opensuse.org/viewcvs/yast/trunk/cluster/agents/ag_openais?rev=64363&r1=64362&r2=64363&view=diff ============================================================================== --- trunk/cluster/agents/ag_openais (original) +++ trunk/cluster/agents/ag_openais Wed Jun 15 05:15:14 2011 @@ -68,8 +68,8 @@ "send_join":{"doc":"This timeout specifies in milliseconds an upper range between 0 and send_join to wait before sending a join message.", "type":"int", "default_value":0}, "consensus":{"doc":"How long to wait for consensus to be achieved before starting a new round of membership configuration.", - "type":"int", "default_value":800, - "suggested_value":1500}, + "type":"int", "default_value":3600, + "suggested_value":4000}, "merge":{"doc":"How long to wait before checking for a partition when no multicast traffic is being sent.", "type":"int", "default_value":200}, "downcheck":{"doc":"How long to wait before checking that a network interface is back up after it has been downed.", @@ -90,9 +90,7 @@ "type":"int", "default_value":2000}, "rrp_problem_count_threshhold":{"doc":"The number of times a problem is detected with a link before setting the link faulty.", "type":"int", "default_value":10}, - "rrp_token_expired_timeout":{"doc":"This specifies the time in milliseconds to increment the problem counter for the redundant ring protocol after not having received a token from all rings for a particular processor.", "type":"int", "default_value":47}, - "keyfile":{"doc":"Location of key file. If not set, it defaults to the environoment OPENAIS_TOTEM_AUTHKEY_FILE, then /etc/ais/authkey", "default_value":"/etc/ais/authkey"}, - "key":{"doc":"The key itself in the configuration file. Should be 128 characters. Dont use the default value", "default_value":"CatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMeeCatchMee"} + "rrp_token_expired_timeout":{"doc":"This specifies the time in milliseconds to increment the problem counter for the redundant ring protocol after not having received a token from all rings for a particular processor.", "type":"int", "default_value":47} } @@ -101,12 +99,9 @@ "group":{"doc":"Group to run aisexec as. Needs to be root for Pacemaker", "default_value":"root"}} service_option_table = { - "name":{"doc":"The name of the service", "default_value":"pacemaker"}, - "ver":{"doc":"Version", "default_value":"0"}, + "clustername":{"doc":"The name of the service", "default_value":"pacemaker"}, "use_mgmtd":{"doc":"Default to start mgmtd with pacemaker", "default_value":"yes"}, - "expected_nodes":{"doc":"Nodes we expected to see in the cluster", "default_value":2}, - "expected_votes":{"doc":"Votes we expected to see in the cluster", "default_value":2}, - "quorum_votes":{"doc":"Votes needed to have the quorum", "default_value":1}, + "to_file":{"doc":"Log to a specified file", "default_value":"no", "suggested_value":"no"}, "use_logd":{"doc":"Use logd for pacemaker", "default_value":"no"}, } @@ -134,7 +129,7 @@ "to_syslog":{"doc":"Log to syslog", "default_value":"yes", "suggested_value":"yes"}, "to_stderr":{"doc":"Log to the standard error output", "default_value":"yes", "suggested_value":"yes"}, - "to_file":{"doc":"Log to a specified file", "default_value":"no", "suggested_value":"no"}, + "to_logfile":{"doc":"Log to a specified file", "default_value":"no", "suggested_value":"no"}, "logfile":{"doc":"Log to be saved in this specified file", "default_value":"/tmp/saved_pacemaker_log"}, "syslog_facility":{"doc":"Facility in syslog", "default_value":"daemon", "suggested_value":"daemon"}, "timestamp":{"doc":"Log timestamp as well", "default_value":"on", "suggested_value":"on"}, @@ -406,7 +401,7 @@ f.close() except: try: - os.rename(filename, "/etc/ais/openais.conf.corrupted"); + os.rename(filename, "/etc/corosync/corosync.conf.corrupted"); except: pass f = open(filename, "w") @@ -417,7 +412,7 @@ class OpenAISConf_Parser: def __init__(self): - load_ais_conf("/etc/ais/openais.conf") + load_ais_conf("/etc/corosync/corosync.conf") def doList(self, path): #remove the leading dot, @@ -530,7 +525,7 @@ fulfill_default_logging_options() fulfill_suggested_totem_options() - f = open("/etc/ais/openais.conf.YaST2", "w") + f = open("/etc/corosync/corosync.conf.YaST2", "w") print_ais_options(f) print_pacemaker_service_options(f) print_service_options(f) @@ -541,8 +536,8 @@ f.close() try: - os.rename("/etc/ais/openais.conf", "/etc/ais/openais.conf.YasT2.bak") - os.rename("/etc/ais/openais.conf.YaST2", "/etc/ais/openais.conf") + os.rename("/etc/corosync/corosync.conf", "/etc/corosync/corosync.conf.YasT2.bak") + os.rename("/etc/corosync/corosync.conf.YaST2", "/etc/corosync/corosync.conf") except OSError: pass pass Modified: trunk/cluster/src/Cluster.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/cluster/src/Cluster.ycp?rev=64363&r1=64362&r2=64363&view=diff ============================================================================== --- trunk/cluster/src/Cluster.ycp (original) +++ trunk/cluster/src/Cluster.ycp Wed Jun 15 05:15:14 2011 @@ -298,7 +298,7 @@ ); boolean ret = false; - list<string> required_pack_list = ["pacemaker", "pacemaker-pygui", "csync2"]; + list<string> required_pack_list = ["pacemaker", "pacemaker-mgmt", "pacemaker-mgmt-client", "csync2"]; ret = PackageSystem::CheckAndInstallPackagesInteractive(required_pack_list); if (ret == false) { Report::Error(_("Cannot install required package")); @@ -313,7 +313,7 @@ Report::Error(_("Cannot load existing configuration")); return false; } - if (SCR::Read(.target.size, "/etc/ais/openais.conf") <= 1) { + if (SCR::Read(.target.size, "/etc/corosync/corosync.conf") <= 1) { firstrun = true; use_mgmtd = true; //the only interested default option } Modified: trunk/cluster/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/cluster/src/dialogs.ycp?rev=64363&r1=64362&r2=64363&view=diff ============================================================================== --- trunk/cluster/src/dialogs.ycp (original) +++ trunk/cluster/src/dialogs.ycp Wed Jun 15 05:15:14 2011 @@ -45,7 +45,7 @@ include "cluster/helps.ycp"; include "cluster/common.ycp"; -list<string> csync2_suggest_files = []; +list<string> csync2_suggest_files = ["/etc/corosync/corosync.conf", "/etc/corosync/authkey", "/etc/sysconfig/pacemaekr", "/etc/drbd.d", "/etc/lvm/lvm.conf", "/etc/multipath.conf", "/etc/ha.d/ldirectord.cf", "/etc/ctdb/nodes", "/etc/samba/smb.conf"]; string csync2_port = "30865"; // return `cacel or a string @@ -346,8 +346,8 @@ `VBox( `InputField(`id(`threads), `opt(`hstretch), "Threads:"), `VSpacing(1), - `Label(_("For newly created cluster, push the button below to generate /etc/ais/authkey.")), - `Label(_("To join an existing cluster, please copy /etc/ais/authkey from other nodes manually.")), + `Label(_("For newly created cluster, push the button below to generate /etc/corosync/authkey.")), + `Label(_("To join an existing cluster, please copy /etc/corosync/authkey from other nodes manually.")), `PushButton(`id(`genf), `opt(`notify), "Generate Auth Key File") ) ), @@ -365,11 +365,12 @@ if (ret == `genf) { map result = $[]; - result = (map)SCR::Execute(.target.bash_output, "/usr/sbin/ais-keygen"); + result = (map)SCR::Execute(.target.bash_output, "/usr/sbin/corosync-keygen"); if (result["exit"]:-1 != 0) { - Popup::Message("Failed to create /etc/ais/authkey"); + Popup::Message("Failed to create /etc/corosync/authkey"); } else { - Popup::Message(result["stdout"]:"Create /etc/ais/authkey successed"); + //Popup::Message(result["stdout"]:"Create /etc/corosync/authkey successed"); + Popup::Message("Create /etc/corosync/authkey successed"); } continue; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org