Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: include by zhenh from
([email protected])
2. Linux-HA CVS: mgmt by zhenh from
([email protected])
3. Linux-HA CVS: mgmt by zhenh from
([email protected])
4. Linux-HA CVS: mgmt by zhenh from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Mon, 12 Jun 2006 03:22:06 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : include
Dir : linux-ha/include/mgmt
Modified Files:
mgmt_common.h
Log Message:
return the nodes known by crm
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/mgmt/mgmt_common.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- mgmt_common.h 6 Jun 2006 05:18:06 -0000 1.12
+++ mgmt_common.h 12 Jun 2006 09:22:06 -0000 1.13
@@ -190,6 +190,18 @@
/*
description:
+ return nodes configured in crm
+format:
+ MSG_CRMNODES
+return:
+ MSG_OK node1 node2 ... noden
+or
+ MSG_FAIL
+*/
+#define MSG_CRMNODES "crm_nodes"
+
+/*
+description:
return DC in cluster
format:
MSG_DC
------------------------------
Message: 2
Date: Mon, 12 Jun 2006 03:23:13 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : mgmt
Dir : linux-ha/mgmt/daemon
Modified Files:
mgmt_crm.c
Log Message:
return the nodes known by crm
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_crm.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- mgmt_crm.c 8 Jun 2006 08:03:57 -0000 1.50
+++ mgmt_crm.c 12 Jun 2006 09:23:13 -0000 1.51
@@ -51,6 +51,7 @@
static char* on_get_crm_config(char* argv[], int argc);
static char* on_update_crm_config(char* argv[], int argc);
static char* on_get_activenodes(char* argv[], int argc);
+static char* on_get_crmnodes(char* argv[], int argc);
static char* on_get_dc(char* argv[], int argc);
static char* on_set_node_standby(char* argv[], int argc);
@@ -447,6 +448,7 @@
reg_msg(MSG_DC, on_get_dc);
reg_msg(MSG_ACTIVENODES, on_get_activenodes);
+ reg_msg(MSG_CRMNODES, on_get_crmnodes);
reg_msg(MSG_NODE_CONFIG, on_get_node_config);
reg_msg(MSG_RUNNING_RSC, on_get_running_rsc);
reg_msg(MSG_STANDBY, on_set_node_standby);
@@ -620,6 +622,26 @@
return ret;
}
+char*
+on_get_crmnodes(char* argv[], int argc)
+{
+ node_t* node;
+ GList* cur;
+ char* ret;
+ pe_working_set_t* data_set;
+
+ data_set = get_data_set();
+ cur = data_set->nodes;
+ ret = cl_strdup(MSG_OK);
+ while (cur != NULL) {
+ node = (node_t*) cur->data;
+ ret = mgmt_msg_append(ret, node->details->uname);
+ cur = g_list_next(cur);
+ }
+ free_data_set(data_set);
+ return ret;
+}
+
char*
on_get_dc(char* argv[], int argc)
{
@@ -649,10 +671,6 @@
ARGC_CHECK(2);
while (cur != NULL) {
node = (node_t*) cur->data;
- if (!node->details->online) {
- cur = g_list_next(cur);
- continue;
- }
if (strncmp(argv[1],node->details->uname,MAX_STRLEN) == 0) {
char* ret = cl_strdup(MSG_OK);
ret = mgmt_msg_append(ret, node->details->uname);
------------------------------
Message: 3
Date: Mon, 12 Jun 2006 03:33:39 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : mgmt
Dir : linux-ha/mgmt/client
Modified Files:
haclient.py.in
Log Message:
add a new status of node: never started, which means that the node is in ha.cf
but never started
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- haclient.py.in 12 Jun 2006 05:57:04 -0000 1.53
+++ haclient.py.in 12 Jun 2006 09:33:38 -0000 1.54
@@ -532,6 +532,10 @@
msgbox(_("can not get information from cluster!"))
return
+ crm_nodes = manager.get_crm_nodes()
+ if crm_nodes == None :
+ msgbox(_("can not get information from cluster!"))
+ return
config = manager.get_cluster_config()
if config["have_quorum"] == "True" :
@@ -542,7 +546,7 @@
nodes_root = self.store.append(root, [_("Nodes"),"", "nodes"])
for node in nodes :
- self.add_node(nodes_root, node, node in active_nodes)
+ self.add_node(nodes_root, node, node in active_nodes,
node in crm_nodes)
rscs_root = self.store.append(root, [_("Resources"),"",
"resources"])
rscs = manager.get_all_rsc_id()
@@ -594,17 +598,19 @@
for subrsc in manager.get_rsc_sub_rsc(rsc) :
self.add_rsc(iter, subrsc)
- def add_node(self, nodes_root, node, active):
+ def add_node(self, nodes_root, node, active, started):
status = _("unknown")
- if not active :
- status = _("stopped")
- else :
- dc = manager.get_dc()
- if node in dc :
- status = _("running(dc)")
- else :
- status = _("running")
-
+ if not started :
+ status = _("never started")
+ else :
+ if not active :
+ status = _("stopped")
+ else :
+ dc = manager.get_dc()
+ if node in dc :
+ status = _("running(dc)")
+ else :
+ status = _("running")
if manager.get_node_config(node)["standby"] == "True" :
status = status + "-"+ _("standby")
@@ -1289,13 +1295,13 @@
manager.connected
and self.cur_type in [_("node")]
and string.find(self.cur_status, _("standby")) == -1
- and string.find(self.cur_status, _("running")) != -1)
+ and string.find(self.cur_status, _("never started")) ==
-1)
self.set_action_sensitive('active',
manager.connected
and self.cur_type in [_("node")]
and string.find(self.cur_status, _("standby")) != -1
- and string.find(self.cur_status, _("running")) != -1)
+ and string.find(self.cur_status, _("never started")) ==
-1)
self.set_action_sensitive('cleanuprsc',
manager.connected
@@ -1349,7 +1355,7 @@
self.update_ui()
if type == "cluster" :
self.cur_view = ClusterView()
- elif type == "node" and status != _("stopped"):
+ elif type == "node" and status != _("never started"):
self.cur_view = NodeView(name)
elif type in [_("native")] :
self.cur_view = RscView(name)
@@ -1830,6 +1836,9 @@
def get_active_nodes(self):
self.active_nodes = self.query("active_nodes")
return self.active_nodes
+
+ def get_crm_nodes(self):
+ return self.query("crm_nodes")
def get_node_config(self, node) :
node_attr_names = ["uname", "online","standby", "unclean",
"shutdown",
------------------------------
Message: 4
Date: Mon, 12 Jun 2006 04:36:38 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : mgmt
Dir : linux-ha/mgmt/client
Modified Files:
haclient.glade
Log Message:
make the tab selection sticky
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.glade,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- haclient.glade 5 Jun 2006 11:09:38 -0000 1.15
+++ haclient.glade 12 Jun 2006 10:36:37 -0000 1.16
@@ -1424,7 +1424,7 @@
</child>
<child>
- <widget class="GtkNotebook" id="notebook2">
+ <widget class="GtkNotebook" id="notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_tabs">True</property>
@@ -3968,7 +3968,7 @@
</child>
<child>
- <widget class="GtkNotebook" id="notebook1">
+ <widget class="GtkNotebook" id="notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_tabs">True</property>
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 31, Issue 38
********************************************