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: crm by andrew from
([email protected])
2. Linux-HA CVS: mgmt by zhenh from
([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Tue, 11 Apr 2006 01:37:54 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/crmd
Modified Files:
fsa.c
Log Message:
The extra debugging is not required
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/fsa.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -3 -r1.141 -r1.142
--- fsa.c 9 Apr 2006 14:38:05 -0000 1.141
+++ fsa.c 11 Apr 2006 07:37:54 -0000 1.142
@@ -248,11 +248,11 @@
fsa_cause2string(fsa_data->fsa_cause),
fsa_data->origin);
}
-
+/*
if(fsa_actions & A_SHUTDOWN) {
crm_log_level = LOG_DEBUG_2;
}
-
+*/
#ifdef FSA_TRACE
if(new_actions != A_NOTHING) {
crm_debug_2("Adding FSA actions %.16llx for %s/%s",
------------------------------
Message: 2
Date: Tue, 11 Apr 2006 02:28: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.py.in
Log Message:
start/stop resource manually
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- haclient.py.in 11 Apr 2006 05:53:49 -0000 1.26
+++ haclient.py.in 11 Apr 2006 08:28:37 -0000 1.27
@@ -1151,6 +1151,17 @@
and string.find(self.cur_status, _("standby")) != -1
and string.find(self.cur_status, _("running")) != -1)
+ self.set_action_sensitive('startrsc',
+ manager.connected
+ and self.cur_type in [_("native")]
+ and string.find(self.cur_status, _("not running")) !=
-1)
+
+ self.set_action_sensitive('stoprsc',
+ manager.connected
+ and self.cur_type in [_("native")]
+ and string.find(self.cur_status, _("not running")) == -1
+ and string.find(self.cur_status, _("running")) != -1)
+
# functions
def update(self) :
self.tree.update()
@@ -1283,7 +1294,23 @@
manager.do_cmd("del_co\nrsc_colocation\n"+self.cur_name)
if manager.failed_reason != "" :
msgbox(manager.failed_reason)
-
+
+ def on_start_item(self, action) :
+ (attrs, running_on, params, ops) = \
+ manager.get_rsc_info(self.cur_name)
+ for param in params :
+ if param["name"] == "target_role" and param["value"] ==
"Stopped" :
+ manager.do_cmd("del_rsc_param\n"+param["id"])
+ return
+
+ def on_stop_item(self, action) :
+ (attrs, running_on, params, ops) = \
+ manager.get_rsc_info(self.cur_name)
+ for param in params :
+ if param["name"] == "target_role" and param["value"] ==
"Stopped" :
+ return
+
manager.do_cmd("up_rsc_params\n%s\n%s_target_role\n%s\n%s"%(self.cur_name,self.cur_name,"target_role","Stopped"))
+
# constructor
def __init__(self) :
# create window
@@ -1317,9 +1344,13 @@
<menuitem action="logout"/>
<menuitem action="quit"/>
</menu>
- <menu action="action">
+ <menu action="resource">
<menuitem action="addrsc"/>
<menuitem action="delrsc"/>
+ <menuitem action="startrsc"/>
+ <menuitem action="stoprsc"/>
+ </menu>
+ <menu action="node">
<menuitem action="standby"/>
<menuitem action="active"/>
</menu>
@@ -1327,10 +1358,15 @@
<toolbar name="toolbar">
<toolitem action="login"/>
<toolitem action="logout"/>
+ <separator/>
<toolitem action="addrsc"/>
<toolitem action="delrsc"/>
+ <toolitem action="startrsc"/>
+ <toolitem action="stoprsc"/>
+ <separator/>
<toolitem action="standby"/>
<toolitem action="active"/>
+ <separator/>
<toolitem action="quit"/>
</toolbar>
</ui>'''
@@ -1341,9 +1377,12 @@
('login', "ha-login", _('Login...'), None,_('login to
cluster'), self.on_login),
('logout', "ha-logout", _('Logout'), None,_('logout
from cluster'), self.on_logout),
('quit', "ha-exit", _('Quit'), None,_('Quit the
Program'), self.on_quit),
- ('action', None, _('Action')),
+ ('resource', None, _('Resources')),
('addrsc', "ha-add-resource", _('Add New Item'),
None,_('add new item'), self.on_add_item),
('delrsc', "ha-remove-resource", _('Delete'),
None,_('delete current item'), self.on_del_item),
+ ('startrsc', "ha-start-resource", _('Start'),
None,_('start resource'), self.on_start_item),
+ ('stoprsc', "ha-stop-resource", _('Stop'), None,_('stop
resource'), self.on_stop_item),
+ ('node', None, _('Nodes')),
('standby', "ha-standby-node", _('Standby'),
None,_('make the node standby'), self.on_standby),
('active', "ha-active-node", _('Active'), None,_('make
the node active'), self.on_active)
])
@@ -1378,7 +1417,7 @@
self.tree = Tree(glade.get_widget("mainwin_tree"))
self.view_widget = glade.get_widget("mainwin_view")
self.update_ui()
- self.statusbar.push(0,"Not Connected")
+ self.statusbar.push(0,_("Not Connected"))
class Manager :
'''
@@ -1444,17 +1483,18 @@
ret = mgmt_connect(ip, username, password)
if ret != 0 :
if ret == -1 :
- self.failed_reason = "Can't connect to server"
+ self.failed_reason = _("Can't connect to
server")
elif ret == -2 :
- self.failed_reason = "Failed in the
authentication.\n User Name or Password may be wrong."
+ self.failed_reason = _("Failed in the
authentication.\n User Name or Password may be wrong." \
+ "\n or the user doesn't belong
to haclient group")
mgmt_disconnect()
return False
- window.statusbar.push(1,"Connected to "+server)
+ window.statusbar.push(1,_("Connected to ")+server)
self.connected = True
self.username = username
self.password = password
- window.statusbar.push(2,"Updating data from server...")
+ window.statusbar.push(2,_("Updating data from server..."))
self.update_timer = gobject.timeout_add(100, self.update)
self.do_cmd("regevt\nevt:cib_changed")
------------------------------
Message: 3
Date: Tue, 11 Apr 2006 02:51:50 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/pengine
Modified Files:
unpack.c
Log Message:
Restore the target role *after* we've done the processing... sort of pointless
doing it before
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/unpack.c,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -3 -r1.182 -r1.183
--- unpack.c 9 Apr 2006 15:34:13 -0000 1.182
+++ unpack.c 11 Apr 2006 08:51:49 -0000 1.183
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.182 2006/04/09 15:34:13 andrew Exp $ */
+/* $Id: unpack.c,v 1.183 2006/04/11 08:51:49 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -938,18 +938,6 @@
op_list = g_list_append(op_list, rsc_op);
);
- value = g_hash_table_lookup(rsc->parameters, XML_RSC_ATTR_TARGET_ROLE);
- if(value != NULL) {
- enum rsc_role_e req_role = text2role(value);
- if(req_role != RSC_ROLE_UNKNOWN && req_role != rsc->next_role){
- crm_debug("%s: Overwriting calculated next role %s"
- " with requested next role %s",
- rsc->id, role2text(rsc->next_role),
- role2text(req_role));
- rsc->next_role = req_role;
- }
- }
-
if(op_list != NULL) {
saved_role = rsc->role;
on_fail = action_fail_ignore;
@@ -969,6 +957,18 @@
process_rsc_state(rsc, node, on_fail, data_set);
}
+ value = g_hash_table_lookup(rsc->parameters, XML_RSC_ATTR_TARGET_ROLE);
+ if(value != NULL) {
+ enum rsc_role_e req_role = text2role(value);
+ if(req_role != RSC_ROLE_UNKNOWN && req_role != rsc->next_role){
+ crm_debug("%s: Overwriting calculated next role %s"
+ " with requested next role %s",
+ rsc->id, role2text(rsc->next_role),
+ role2text(req_role));
+ rsc->next_role = req_role;
+ }
+ }
+
if(delete_resource) {
DeleteRsc(rsc, node, data_set);
}
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 29, Issue 73
********************************************