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: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Wed, 22 Feb 2006 06:54:12 -0700 (MST)
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/cib
Modified Files:
io.c
Log Message:
Give the logs time to be printed/dispached
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- io.c 15 Feb 2006 13:19:14 -0000 1.47
+++ io.c 22 Feb 2006 13:54:12 -0000 1.48
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.47 2006/02/15 13:19:14 andrew Exp $ */
+/* $Id: io.c,v 1.48 2006/02/22 13:54:12 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -140,6 +140,7 @@
if( S_ISREG(buf.st_mode) == FALSE ) {
crm_err("%s must be a regular file", filename);
+ sleep(5);
exit(100);
} else if( user_readwritable == FALSE ) {
@@ -153,6 +154,7 @@
crm_err("%s must be owned and read/writeable by
user %s,"
" or owned and read/writable by group
%s",
filename, HA_CCMUSER, HA_APIGROUP);
+ sleep(5);
exit(100);
}
crm_warn("%s should be owned and read/writeable by user
%s",
------------------------------
Message: 2
Date: Wed, 22 Feb 2006 07:44:26 -0700 (MST)
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_resource.c
Log Message:
Avoid creating -INFINITY constraints where humanly possible
Include notes on when they will be created and their effect in the help text.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_resource.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- crm_resource.c 22 Feb 2006 13:46:23 -0000 1.13
+++ crm_resource.c 22 Feb 2006 14:44:25 -0000 1.14
@@ -1,4 +1,4 @@
-/* $Id: crm_resource.c,v 1.13 2006/02/22 13:46:23 lars Exp $ */
+/* $Id: crm_resource.c,v 1.14 2006/02/22 14:44:25 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -53,6 +53,7 @@
#include <crm/dmalloc_wrapper.h>
void usage(const char *cmd, int exit_status);
+gboolean do_force = FALSE;
gboolean BE_QUIET = FALSE;
char *host_id = NULL;
const char *rsc_id = NULL;
@@ -65,7 +66,7 @@
char *our_pid = NULL;
IPC_Channel *crmd_channel = NULL;
-#define OPTARGS "V?SLRQDCPp:WMUr:H:v:t:g:G:g:"
+#define OPTARGS "V?SLRQDCPp:WMUr:H:v:t:g:G:g:f"
static int
do_find_resource(const char *rsc, pe_working_set_t *data_set)
@@ -454,6 +455,7 @@
{"set-property", 1, 0, 'p'},
{"property-value", 1, 0, 'v'},
{"resource-type", 1, 0, 't'},
+ {"force-relocation", 0, 0, 'f'},
{0, 0, 0, 0}
};
@@ -542,6 +544,9 @@
case 'U':
rsc_cmd = flag;
break;
+ case 'f':
+ do_force = TRUE;
+ break;
case 'r':
crm_debug_2("Option %c => %s", flag, optarg);
rsc_id = optarg;
@@ -676,15 +681,16 @@
"%s is already active on %s",
rsc_id, host_uname);
- } else if(rsc->stickiness == 0 && host_uname != NULL) {
- rc = migrate_resource(
- rsc_id, NULL, host_uname, cib_conn);
-
- } else if(g_list_length(rsc->running_on) == 1
- || host_uname != NULL) {
+ } else if(current_uname != NULL
+ && (do_force || host_uname == NULL)) {
rc = migrate_resource(rsc_id, current_uname,
host_uname, cib_conn);
+
+ } else if(host_uname != NULL) {
+ rc = migrate_resource(
+ rsc_id, NULL, host_uname, cib_conn);
+
} else {
fprintf(stderr, "Resource %s not migrated: "
"not-active and no prefered location"
@@ -779,7 +785,11 @@
"\t\t\t Requires: -r\n", "locate", 'W');
fprintf(stream, "\t--%s (-%c)\t: Migrate a resource from it current"
" location. Use -H to specify a destination\n"
- "\t\t\t Requires: -r, Optional: -H\n", "migrate", 'M');
+ "\t\tIf -H is not specified, we will force the resource to move
by"
+ " creating a rule for the current location and a score of
-INFINITY\n"
+ "\t\tNOTE: This will prevent the resource from running on this"
+ " node until the constraint is removed with -U\n"
+ "\t\t\t Requires: -r, Optional: -H, -f\n", "migrate", 'M');
fprintf(stream, "\t--%s (-%c)\t: Remove all constraints created by -M\n"
"\t\t\t Requires: -r\n", "un-migrate", 'U');
fprintf(stream, "\t--%s (-%c)\t: Delete a resource from the CIB\n"
@@ -809,6 +819,14 @@
"Property value\n", "property-value", 'v');
fprintf(stream, "\t--%s (-%c) <string>\t: "
"Host name\n", "host-uname", 'H');
+ fprintf(stream, "\t--%s (-%c)\t: "
+ "Force the resource to move by creating a rule for the"
+ " current location and a score of -INFINITY\n"
+ "\t\tThis should be used if the resource's stickiness and"
+ " constraint scores total more than INFINITY (Currently
10,000)\n"
+ "\t\tNOTE: This will prevent the resource from running on this"
+ " node until the constraint is removed with -U\n",
+ "force-relocation", 'f');
fflush(stream);
exit(exit_status);
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 27, Issue 92
********************************************