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: mgmt by zhenh from
([email protected])
2. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Fri, 16 Jun 2006 03:53:53 -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 haclient.py.in haclient.zh_CN.po
Log Message:
update the Chinese labels of the GUI
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.glade,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- haclient.glade 14 Jun 2006 08:11:05 -0000 1.19
+++ haclient.glade 16 Jun 2006 09:53:52 -0000 1.20
@@ -1706,7 +1706,7 @@
<child>
<widget class="GtkLabel" id="label209">
<property name="visible">True</property>
- <property name="label" translatable="yes"> Attributes
</property>
+ <property name="label" translatable="yes">Attributes</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -1801,7 +1801,7 @@
<child>
<widget class="GtkLabel" id="label210">
<property name="visible">True</property>
- <property name="label" translatable="yes"> Parameters
</property>
+ <property name="label" translatable="yes">Parameters</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -1896,7 +1896,7 @@
<child>
<widget class="GtkLabel" id="label211">
<property name="visible">True</property>
- <property name="label" translatable="yes"> Operations
</property>
+ <property name="label" translatable="yes">Operations</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -4007,7 +4007,7 @@
<child>
<widget class="GtkLabel" id="label207">
<property name="visible">True</property>
- <property name="label" translatable="yes"> Attributes
</property>
+ <property name="label" translatable="yes">Attributes</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -4102,7 +4102,7 @@
<child>
<widget class="GtkLabel" id="label208">
<property name="visible">True</property>
- <property name="label" translatable="yes"> Parameters
</property>
+ <property name="label" translatable="yes">Parameters</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -3 -r1.62 -r1.63
--- haclient.py.in 16 Jun 2006 07:09:56 -0000 1.62
+++ haclient.py.in 16 Jun 2006 09:53:52 -0000 1.63
@@ -1012,7 +1012,7 @@
_("Add Parameter"), fields)
param_list.insert({"id":uuid(),"name":"target_role",
"value":"stopped","shortdesc": \
- "press \"Default\" or \"Start\" button in toolbar/menu to start
the resource"})
+ _("press \"Default\" or \"Start\" button in toolbar/menu to
start the resource")})
self.param_list = param_list
if meta != None :
for param in meta.parameters :
@@ -1612,7 +1612,7 @@
('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),
- ('cleanuprsc', "ha-cleanup-resource", _('Clean up
resource'), None,_('cleanup the resource'), self.on_item_cleanup),
+ ('cleanuprsc', "ha-cleanup-resource", _('Cleanup
resource'), None,_('cleanup resource'), self.on_item_cleanup),
('startrsc', "ha-start-resource", _('Start'),
None,_('start resource'), self.on_item_action),
('stoprsc', "ha-stop-resource", _('Stop'), None,_('stop
resource'), self.on_item_action),
('defaultrsc', "ha-default-resource", _('Default'),
None,_('work as default'), self.on_item_action),
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.zh_CN.po,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- haclient.zh_CN.po 14 Apr 2006 09:04:06 -0000 1.4
+++ haclient.zh_CN.po 16 Jun 2006 09:53:52 -0000 1.5
@@ -169,6 +169,9 @@
msgid "Provider:"
msgstr "æä¾è
ï¼"
+msgid "Provider"
+msgstr "æä¾è
"
+
#: haclient.glade.h:26
msgid "Reset"
msgstr "éç½®"
@@ -510,7 +513,7 @@
msgstr "认å®å®æºæ¶é´ï¼"
#: haclient.py.in:618
-msgid "Intial Dead Time:"
+msgid "Initial Dead Time:"
msgstr "å¯å¨æ¶è®¤å®å®æºæ¶é´ï¼"
#: haclient.py.in:619
@@ -521,12 +524,15 @@
msgid "Resource Stickiness:"
msgstr "èµæºç²é»æ§ï¼"
+msgid "Resource Failure Stickiness:"
+msgstr "èµæºå¤±è´¥ç²é»æ§ï¼"
+
#: haclient.py.in:621
msgid "No Quorum Policy:"
msgstr "èç¹æ°æ æçç¥ï¼"
#: haclient.py.in:622
-msgid "Sysmmetric Cluster"
+msgid "Symmetric Cluster"
msgstr "对称é群"
#: haclient.py.in:623
@@ -597,8 +603,69 @@
msgid "Failed in the authentication.\n User Name or Password may be wrong.\n
or the user doesn't belong to haclient group"
msgstr
"ç¨æ·è®¤è¯å¤±è´¥ï¼å¯è½æ¯ç¨æ·æå¯ç ä¸å¯¹ï¼æè¯¥ç¨æ·ä¸å±äºhaclientç»"
-msgid "running(Master)"
+msgid "running (Master)"
msgstr "è¿è¡(主)"
-msgid "running(Slave)"
+msgid "running (Slave)"
msgstr "è¿è¡(ä»)"
+
+msgid "cleanup resource"
+msgstr "æ¸
çèµæº"
+
+msgid "Cleanup resource"
+msgstr "æ¸
çèµæº"
+
+msgid "Default"
+msgstr "缺ç"
+
+msgid "work as default"
+msgstr "缺çè¿è¡"
+
+msgid "Move Up"
+msgstr "ä¸ç§»"
+
+msgid "Move Down"
+msgstr "ä¸ç§»"
+
+msgid "move the resource down in the group"
+msgstr "å¨èµæºç»éä¸ç§»èµæº"
+
+msgid "move the resource up in the group"
+msgstr "å¨èµæºç»éä¸ç§»èµæº"
+
+msgid "Resource ID:"
+msgstr "èµæº IDï¼"
+
+msgid "Attributes"
+msgstr "屿§"
+
+msgid "Parameters"
+msgstr "åæ°"
+
+msgid "Operations"
+msgstr "æä½"
+
+msgid "Delete Parameter"
+msgstr "å é¤åæ°"
+
+msgid "Delete Operation"
+msgstr "å 餿ä½"
+
+msgid "Delete Expression"
+msgstr "å é¤è¡¨è¾¾å¼"
+
+msgid "Belong to group:\n(type for new one)"
+msgstr "å±äºèµæºç»ï¼\n(æ°èµæºç»è¯·è¾å
¥)"
+
+msgid "Type(double click for detail):"
+msgstr "ç±»å(åå»å¯ç详ç»ä¿¡æ¯)"
+
+msgid "If belong to a clone or master/slave:"
+msgstr "妿å±äºå
éèµæºæä¸»ä»èµæºï¼"
+
+msgid "Clone or Master/Slave ID:"
+msgstr "å
éèµæºæä¸»ä»èµæºçIDï¼"
+
+msgid "press \"Default\" or \"Start\" button in toolbar/menu to start the
resource"
+msgstr
"ç¹å»å·¥å
·æ¡æèåä¸ç\"缺ç\"æ\"å¼å§\"å¯ä»¥å¯å¨èµæº"
+
------------------------------
Message: 2
Date: Fri, 16 Jun 2006 04:00:17 -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/admin
Modified Files:
crm_mon.c crm_resource.c crm_verify.c
Log Message:
Allow crm_mon and crm_resource to be feed the CIB from an XML file rather
than querying a live cluster for it
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_mon.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- crm_mon.c 7 Jun 2006 12:46:57 -0000 1.26
+++ crm_mon.c 16 Jun 2006 10:00:17 -0000 1.27
@@ -1,4 +1,4 @@
-/* $Id: crm_mon.c,v 1.26 2006/06/07 12:46:57 andrew Exp $ */
+/* $Id: crm_mon.c,v 1.27 2006/06/16 10:00:17 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -57,7 +57,7 @@
/* GMainLoop *mainloop = NULL; */
const char *crm_system_name = "crm_mon";
-#define OPTARGS "V?i:nrh:cdp:1"
+#define OPTARGS "V?i:nrh:cdp:1X:"
void usage(const char *cmd, int exit_status);
@@ -70,6 +70,7 @@
gboolean mon_timer_popped(gpointer data);
void mon_update(const HA_Message*, int, int, crm_data_t*,void*);
+char *xml_file = NULL;
char *as_html_file = NULL;
char *pid_file = NULL;
gboolean as_console = FALSE;
@@ -112,6 +113,7 @@
{"one-shot", 0, 0, '1'},
{"daemonize", 0, 0, 'd'},
{"pid-file", 0, 0, 'p'},
+ {"xml-file", 0, 0, 'X'},
{0, 0, 0, 0}
};
@@ -151,6 +153,10 @@
case 'p':
pid_file = crm_strdup(optarg);
break;
+ case 'X':
+ xml_file = crm_strdup(optarg);
+ one_shot = TRUE;
+ break;
case 'h':
as_html_file = crm_strdup(optarg);
break;
@@ -199,7 +205,6 @@
if(one_shot) {
daemonize = FALSE;
as_console = FALSE;
- as_html_file = NULL;
}
if(daemonize && as_html_file == NULL) {
@@ -220,6 +225,11 @@
if(one_shot == FALSE) {
timer_id = Gmain_timeout_add(
interval, mon_timer_popped, NULL);
+ } else if(xml_file != NULL) {
+ FILE *xml_strm = fopen(xml_file, "r");
+ crm_data_t *cib_object = file2xml(xml_strm);
+ one_shot = TRUE;
+ mon_update(NULL, 0, cib_ok, cib_object, NULL);
}
mon_timer_popped(NULL);
@@ -300,7 +310,6 @@
return FALSE;
}
-
void
mon_update(const HA_Message *msg, int call_id, int rc,
crm_data_t *output, void*user_data)
@@ -323,6 +332,10 @@
} else {
print_status(cib);
}
+ if(one_shot) {
+ exit(LSB_EXIT_OK);
+ }
+
} else if(one_shot) {
fprintf(stderr, "Query failed: %s", cib_error2string(rc));
@@ -458,10 +471,6 @@
);
}
- if(one_shot) {
- exit(LSB_EXIT_OK);
- }
-
refresh();
data_set.input = NULL;
cleanup_calculations(&data_set);
@@ -596,6 +605,7 @@
cl_perror("Unable to rename %s->%s", filename_tmp, filename);
}
crm_free(filename_tmp);
+
return 0;
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_resource.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- crm_resource.c 9 Jun 2006 10:16:51 -0000 1.38
+++ crm_resource.c 16 Jun 2006 10:00:17 -0000 1.39
@@ -1,4 +1,4 @@
-/* $Id: crm_resource.c,v 1.38 2006/06/09 10:16:51 andrew Exp $ */
+/* $Id: crm_resource.c,v 1.39 2006/06/16 10:00:17 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -67,8 +67,9 @@
char rsc_cmd = 'L';
char *our_pid = NULL;
IPC_Channel *crmd_channel = NULL;
+char *xml_file = NULL;
-#define OPTARGS "V?LRQXDCPp:WMUr:H:v:t:p:g:d:i:s:G:S:f"
+#define OPTARGS "V?LRQxDCPp:WMUr:H:v:t:p:g:d:i:s:G:S:fX:"
static int
do_find_resource(const char *rsc, pe_working_set_t *data_set)
@@ -96,7 +97,9 @@
if(BE_QUIET == FALSE && found == 0) {
fprintf(stderr, "resource %s is NOT running\n", rsc);
}
-
+
+ the_rsc->fns->print(the_rsc, NULL, pe_print_printf, stdout);
+
return 0;
}
@@ -558,7 +561,7 @@
{"list", 0, 0, 'L'},
{"refresh", 0, 0, 'R'},
{"reprobe", 0, 0, 'P'},
- {"query-xml", 0, 0, 'X'},
+ {"query-xml", 0, 0, 'x'},
{"delete", 0, 0, 'D'},
{"cleanup", 0, 0, 'C'},
{"locate", 0, 0, 'W'},
@@ -576,6 +579,8 @@
{"set-property", 1, 0, 'S'},
{"resource-type", 1, 0, 't'},
+ {"xml-file", 0, 0, 'X'},
+
{0, 0, 0, 0}
};
#endif
@@ -607,6 +612,9 @@
case '?':
usage(crm_system_name, LSB_EXIT_OK);
break;
+ case 'X':
+ xml_file = crm_strdup(optarg);
+ break;
case 'Q':
BE_QUIET = TRUE;
break;
@@ -619,7 +627,7 @@
rsc_cmd = flag;
break;
- case 'X':
+ case 'x':
rsc_cmd = flag;
break;
@@ -735,23 +743,28 @@
our_pid[10] = '\0';
}
- if(rsc_cmd == 'L' || rsc_cmd == 'W' || rsc_cmd == 'D' || rsc_cmd == 'X'
+ if(rsc_cmd == 'L' || rsc_cmd == 'W' || rsc_cmd == 'D' || rsc_cmd == 'x'
|| rsc_cmd == 'M' || rsc_cmd == 'U' || rsc_cmd == 'C'
|| rsc_cmd == 'p' || rsc_cmd == 'd' || rsc_cmd == 'g'
|| rsc_cmd == 'G' || rsc_cmd == 'S') {
resource_t *rsc = NULL;
- cib_conn = cib_new();
- rc = cib_conn->cmds->signon(
- cib_conn, crm_system_name, cib_command_synchronous);
- if(rc != cib_ok) {
- fprintf(stderr, "Error signing on to the CIB service:
%s\n",
- cib_error2string(rc));
- return rc;
- }
-
- cib_xml_copy = get_cib_copy(cib_conn);
+ if(xml_file != NULL) {
+ FILE *xml_strm = fopen(xml_file, "r");
+ cib_xml_copy = file2xml(xml_strm);
+ } else {
+ cib_conn = cib_new();
+ rc = cib_conn->cmds->signon(
+ cib_conn, crm_system_name,
cib_command_synchronous);
+ if(rc != cib_ok) {
+ fprintf(stderr, "Error signing on to the CIB
service: %s\n",
+ cib_error2string(rc));
+ return rc;
+ }
+ cib_xml_copy = get_cib_copy(cib_conn);
+ }
+
set_working_set_defaults(&data_set);
data_set.input = cib_xml_copy;
data_set.now = new_ha_date(TRUE);
@@ -816,7 +829,7 @@
CRM_DEV_ASSERT(rsc_id != NULL);
rc = do_find_resource(rsc_id, &data_set);
- } else if(rsc_cmd == 'X') {
+ } else if(rsc_cmd == 'x') {
CRM_DEV_ASSERT(rsc_id != NULL);
rc = dump_resource(rsc_id, &data_set);
@@ -974,7 +987,7 @@
fprintf(stream, "\nCommands\n");
fprintf(stream, "\t--%s (-%c)\t: List all resources\n", "list", 'L');
fprintf(stream, "\t--%s (-%c)\t: Query a resource\n"
- "\t\t\t Requires: -r\n", "query-xml", 'X');
+ "\t\t\t Requires: -r\n", "query-xml", 'x');
fprintf(stream, "\t--%s (-%c)\t: Locate a resource\n"
"\t\t\t Requires: -r\n", "locate", 'W');
fprintf(stream, "\t--%s (-%c)\t: Migrate a resource from it current"
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_verify.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- crm_verify.c 8 Jun 2006 16:53:01 -0000 1.13
+++ crm_verify.c 16 Jun 2006 10:00:17 -0000 1.14
@@ -1,4 +1,4 @@
-/* $Id: crm_verify.c,v 1.13 2006/06/08 16:53:01 andrew Exp $ */
+/* $Id: crm_verify.c,v 1.14 2006/06/16 10:00:17 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -193,7 +193,7 @@
crm_info("Reading XML from: %s", xml_file);
cib_object = file2xml(xml_strm);
} else {
- fprintf(stderr, "Reading XML from: stdin");
+ fprintf(stderr, "Reading XML from: stdin\n");
cib_object = stdin2xml();
}
------------------------------
_______________________________________________
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 52
********************************************