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: lib by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Wed, 7 Jun 2006 06:46:57 -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:
Makefile.am crm_mon.c crm_resource.c crm_verify.c crmadmin.c
xml_diff.c
Log Message:
Split the PE into three distinct parts:
- a library for processing rules
- a library for determining the current cluster status
- and a library for calculating the next cluster state
Most tools (such as crm_mon) will only need to use the 2nd library
The first library can be used by the crmd to parse its options (without
needing the rest of the PE)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/Makefile.am,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- Makefile.am 17 Mar 2006 18:01:44 -0000 1.33
+++ Makefile.am 7 Jun 2006 12:46:57 -0000 1.34
@@ -52,7 +52,7 @@
crmadmin_SOURCES = crmadmin.c
crmadmin_CFLAGS = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
crmadmin_LDADD = $(COMMONLIBS) \
- $(top_builddir)/crm/pengine/libpengine.la
+ $(top_builddir)/lib/crm/pengine/libpe_status.la
crm_uuid_SOURCES = crm_uuid.c
crm_uuid_CFLAGS = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
@@ -74,11 +74,13 @@
crm_mon_SOURCES = crm_mon.c
crm_mon_CFLAGS = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
crm_mon_LDADD = $(COMMONLIBS) \
- $(top_builddir)/crm/pengine/libpengine.la
+ $(top_builddir)/lib/crm/pengine/libpe_status.la
+# Arguments could be made that this should live in crm/pengine
crm_verify_SOURCES = crm_verify.c
crm_verify_CFLAGS = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
crm_verify_LDADD = $(COMMONLIBS) \
+ $(top_builddir)/lib/crm/pengine/libpe_status.la \
$(top_builddir)/crm/pengine/libpengine.la
crm_master_SOURCES = crm_attribute.c
@@ -100,7 +102,7 @@
crm_resource_SOURCES = crm_resource.c
crm_resource_CFLAGS = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
crm_resource_LDADD = $(COMMONLIBS) \
- $(top_builddir)/crm/pengine/libpengine.la
+ $(top_builddir)/lib/crm/pengine/libpe_status.la
iso8601_SOURCES = test.iso8601.c
iso8601_CFLAGS = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_mon.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- crm_mon.c 25 May 2006 18:18:39 -0000 1.25
+++ crm_mon.c 7 Jun 2006 12:46:57 -0000 1.26
@@ -1,4 +1,4 @@
-/* $Id: crm_mon.c,v 1.25 2006/05/25 18:18:39 lars Exp $ */
+/* $Id: crm_mon.c,v 1.26 2006/06/07 12:46:57 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -46,7 +46,7 @@
#include <crm/common/ipc.h>
#include <crm/cib.h>
-#include <crm/pengine/pengine.h>
+#include <crm/pengine/status.h>
#ifdef HAVE_GETOPT_H
# include <getopt.h>
@@ -59,6 +59,7 @@
#define OPTARGS "V?i:nrh:cdp:1"
+
void usage(const char *cmd, int exit_status);
void blank_screen(void);
int print_status(crm_data_t *cib);
@@ -383,7 +384,7 @@
updates++;
set_working_set_defaults(&data_set);
data_set.input = cib;
- stage0(&data_set);
+ cluster_status(&data_set);
dc = data_set.dc_node;
@@ -483,7 +484,7 @@
updates++;
set_working_set_defaults(&data_set);
data_set.input = cib;
- stage0(&data_set);
+ cluster_status(&data_set);
dc = data_set.dc_node;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_resource.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- crm_resource.c 6 Jun 2006 06:17:53 -0000 1.34
+++ crm_resource.c 7 Jun 2006 12:46:57 -0000 1.35
@@ -1,4 +1,4 @@
-/* $Id: crm_resource.c,v 1.34 2006/06/06 06:17:53 andrew Exp $ */
+/* $Id: crm_resource.c,v 1.35 2006/06/07 12:46:57 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -44,8 +44,8 @@
#include <crm/common/ipc.h>
#include <crm/cib.h>
-#include <crm/pengine/pengine.h>
-#include <crm/pengine/pe_utils.h>
+#include <crm/pengine/rules.h>
+#include <crm/pengine/status.h>
#ifdef HAVE_GETOPT_H
# include <getopt.h>
@@ -165,8 +165,8 @@
}
unpack_instance_attributes(
- the_rsc->xml, XML_TAG_ATTR_SETS, current, the_rsc->parameters,
- NULL, 0, data_set);
+ the_rsc->xml, XML_TAG_ATTR_SETS, current->details->attrs,
+ the_rsc->parameters, NULL, data_set->now);
if(the_rsc->parameters != NULL) {
crm_debug("Looking up %s in %s", attr, the_rsc->id);
@@ -756,7 +756,7 @@
data_set.input = cib_xml_copy;
data_set.now = new_ha_date(TRUE);
- stage0(&data_set);
+ cluster_status(&data_set);
rsc = pe_find_resource(data_set.resources, rsc_id);
if(rsc != NULL) {
rsc_id = rsc->id;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_verify.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- crm_verify.c 15 May 2006 10:21:05 -0000 1.11
+++ crm_verify.c 7 Jun 2006 12:46:57 -0000 1.12
@@ -1,4 +1,4 @@
-/* $Id: crm_verify.c,v 1.11 2006/05/15 10:21:05 andrew Exp $ */
+/* $Id: crm_verify.c,v 1.12 2006/06/07 12:46:57 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -44,14 +44,13 @@
# include <getopt.h>
#endif
#include <glib.h>
-#include <crm/pengine/pengine.h>
-#include <crm/pengine/pe_utils.h>
+#include <crm/pengine/status.h>
gboolean USE_LIVE_CIB = FALSE;
char *cib_save = NULL;
const char *crm_system_name = NULL;
void usage(const char *cmd, int exit_status);
-extern void cleanup_calculations(pe_working_set_t *data_set);
+extern gboolean stage0(pe_working_set_t *data_set);
int
main(int argc, char **argv)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crmadmin.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -3 -r1.72 -r1.73
--- crmadmin.c 30 May 2006 12:21:40 -0000 1.72
+++ crmadmin.c 7 Jun 2006 12:46:57 -0000 1.73
@@ -1,4 +1,4 @@
-/* $Id: crmadmin.c,v 1.72 2006/05/30 12:21:40 andrew Exp $ */
+/* $Id: crmadmin.c,v 1.73 2006/06/07 12:46:57 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -42,8 +42,6 @@
#include <crm/common/xml.h>
#include <crm/common/ctrl.h>
#include <crm/common/ipc.h>
-#include <crm/pengine/pengine.h>
-#include <crm/pengine/pe_utils.h>
#include <crm/cib.h>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/xml_diff.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- xml_diff.c 12 Apr 2006 08:22:50 -0000 1.8
+++ xml_diff.c 7 Jun 2006 12:46:57 -0000 1.9
@@ -1,4 +1,4 @@
-/* $Id: xml_diff.c,v 1.8 2006/04/12 08:22:50 andrew Exp $ */
+/* $Id: xml_diff.c,v 1.9 2006/06/07 12:46:57 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -199,7 +199,7 @@
}
}
-
+
CRM_ASSERT(object_1 != NULL);
CRM_ASSERT(object_2 != NULL);
------------------------------
Message: 2
Date: Wed, 7 Jun 2006 06:46:57 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/crm/pengine
Modified Files:
Makefile.am clone.c common.c complex.c group.c native.c
rules.c status.c unpack.c utils.c utils.h
Added Files:
pengine.h
Removed Files:
common.h complex.h rules.h status.h
Log Message:
Split the PE into three distinct parts:
- a library for processing rules
- a library for determining the current cluster status
- and a library for calculating the next cluster state
Most tools (such as crm_mon) will only need to use the 2nd library
The first library can be used by the crmd to parse its options (without
needing the rest of the PE)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- Makefile.am 2 Jun 2006 15:34:18 -0000 1.2
+++ Makefile.am 7 Jun 2006 12:46:55 -0000 1.3
@@ -47,10 +47,7 @@
AM_CFLAGS = @CFLAGS@ $(CRM_DEBUG_FLAGS)
## libraries
-lib_LTLIBRARIES = libpe_rules.la libpe_status.la libpengine.la
-
-## binary progs
-#halib_PROGRAMS = ptest
+lib_LTLIBRARIES = libpe_rules.la libpe_status.la
## SOURCES
@@ -63,23 +60,6 @@
libpe_status_la_LDFLAGS = -version-info 1:0:0
libpe_status_la_SOURCES = $(rule_files) $(status_files)
-libpengine_la_LDFLAGS = -version-info 3:0:0
-# -L$(top_builddir)/lib/pils -lpils -export-dynamic -module -avoid-version
-libpengine_la_SOURCES = pengine.c allocate.c \
- native_allocate.c group_allocate.c \
- clone_allocate.c master.c graph.c
-
-noinst_HEADERS = utils.h allocate.h pengine.h
-
-#ptest_SOURCES = ptest.c
-
-#ptest_CFLAGS = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
-#ptest_LDADD = $(COMMONLIBS) \
-# libpe_status.la \
-# libpengine.la \
-# $(top_builddir)/lib/crm/cib/libcib.la \
-# $(top_builddir)/lib/crm/transition/libtransitioner.la
-
clean-generic:
rm -f *.log *.debug *~
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/clone.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- clone.c 2 Jun 2006 15:34:18 -0000 1.2
+++ clone.c 7 Jun 2006 12:46:55 -0000 1.3
@@ -1,4 +1,4 @@
-/* $Id: clone.c,v 1.2 2006/06/02 15:34:18 andrew Exp $ */
+/* $Id: clone.c,v 1.3 2006/06/07 12:46:55 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -19,7 +19,7 @@
#include <portability.h>
-#include <lib/crm/pengine/status.h>
+#include <crm/pengine/status.h>
#include <utils.h>
#include <crm/msg_xml.h>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/common.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- common.c 31 May 2006 14:59:12 -0000 1.1
+++ common.c 7 Jun 2006 12:46:56 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Id: common.c,v 1.1 2006/05/31 14:59:12 andrew Exp $ */
+/* $Id: common.c,v 1.2 2006/06/07 12:46:56 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -25,8 +25,8 @@
#include <glib.h>
-#include <status.h>
-#include <common.h>
+#include <crm/pengine/status.h>
+#include <crm/pengine/common.h>
gboolean was_processing_error = FALSE;
gboolean was_processing_warning = FALSE;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/complex.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- complex.c 31 May 2006 15:00:38 -0000 1.1
+++ complex.c 7 Jun 2006 12:46:56 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Id: complex.c,v 1.1 2006/05/31 15:00:38 andrew Exp $ */
+/* $Id: complex.c,v 1.2 2006/06/07 12:46:56 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -22,7 +22,7 @@
#include <crm/cib.h>
#include <pengine.h>
#include <utils.h>
-#include <lib/crm/pengine/rules.h>
+#include <crm/pengine/rules.h>
#include <crm/msg_xml.h>
#include <clplumbing/cl_misc.h>
@@ -299,6 +299,18 @@
crm_debug_2("\tDesired next state: %s",
(*rsc)->next_role!=RSC_ROLE_UNKNOWN?role2text((*rsc)->next_role):"default");
+ if((*rsc)->next_role == RSC_ROLE_STOPPED) {
+ crm_debug_2("Making sure %s doesn't get colored", (*rsc)->id);
+ /* make sure it doesnt come up again */
+ pe_free_shallow_adv((*rsc)->allowed_nodes, TRUE);
+ (*rsc)->allowed_nodes = node_list_dup(
+ data_set->nodes, FALSE, FALSE);
+ slist_iter(
+ node, node_t, (*rsc)->allowed_nodes, lpc,
+ node->weight = -INFINITY;
+ );
+ }
+
if((*rsc)->is_managed == FALSE) {
crm_warn("Resource %s is currently not managed", (*rsc)->id);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/group.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- group.c 31 May 2006 14:59:12 -0000 1.1
+++ group.c 7 Jun 2006 12:46:56 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Id: group.c,v 1.1 2006/05/31 14:59:12 andrew Exp $ */
+/* $Id: group.c,v 1.2 2006/06/07 12:46:56 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -19,7 +19,7 @@
#include <portability.h>
-#include <lib/crm/pengine/status.h>
+#include <crm/pengine/status.h>
#include <utils.h>
#include <crm/msg_xml.h>
#include <clplumbing/cl_misc.h>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/native.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- native.c 31 May 2006 14:59:12 -0000 1.1
+++ native.c 7 Jun 2006 12:46:56 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Id: native.c,v 1.1 2006/05/31 14:59:12 andrew Exp $ */
+/* $Id: native.c,v 1.2 2006/06/07 12:46:56 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -19,8 +19,8 @@
#include <portability.h>
-#include <lib/crm/pengine/status.h>
-#include <lib/crm/pengine/rules.h>
+#include <crm/pengine/status.h>
+#include <crm/pengine/rules.h>
#include <utils.h>
#include <crm/msg_xml.h>
@@ -91,6 +91,8 @@
HAURL("v2/faq/resource_too_active"));
if(rsc->recovery_type == recovery_stop_only) {
+ crm_debug("Making sure %s doesn't come up again",
rsc->id);
+ /* make sure it doesnt come up again */
pe_free_shallow_adv(rsc->allowed_nodes, TRUE);
rsc->allowed_nodes = node_list_dup(
data_set->nodes, FALSE, FALSE);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/rules.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- rules.c 31 May 2006 14:59:12 -0000 1.1
+++ rules.c 7 Jun 2006 12:46:56 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Id: rules.c,v 1.1 2006/05/31 14:59:12 andrew Exp $ */
+/* $Id: rules.c,v 1.2 2006/06/07 12:46:56 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -24,7 +24,7 @@
#include <glib.h>
-#include <lib/crm/pengine/rules.h>
+#include <crm/pengine/rules.h>
ha_time_t *parse_xml_duration(ha_time_t *start, crm_data_t *duration_spec);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/status.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- status.c 31 May 2006 14:59:12 -0000 1.1
+++ status.c 7 Jun 2006 12:46:56 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Id: status.c,v 1.1 2006/05/31 14:59:12 andrew Exp $ */
+/* $Id: status.c,v 1.2 2006/06/07 12:46:56 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -30,7 +30,7 @@
#include <glib.h>
-#include <status.h>
+#include <crm/pengine/status.h>
#include <utils.h>
crm_data_t * do_calculations(
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/unpack.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- unpack.c 2 Jun 2006 15:34:18 -0000 1.2
+++ unpack.c 7 Jun 2006 12:46:56 -0000 1.3
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.2 2006/06/02 15:34:18 andrew Exp $ */
+/* $Id: unpack.c,v 1.3 2006/06/07 12:46:56 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -30,9 +30,9 @@
#include <heartbeat.h> /* for ONLINESTATUS */
-#include <lib/crm/pengine/status.h>
+#include <crm/pengine/status.h>
#include <utils.h>
-#include <lib/crm/pengine/rules.h>
+#include <crm/pengine/rules.h>
gint sort_op_by_callid(gconstpointer a, gconstpointer b);
@@ -1568,6 +1568,7 @@
}
if(action->fail_role == RSC_ROLE_STOPPED) {
+ crm_err("Making sure %s doesn't come up again",
rsc->id);
/* make sure it doesnt come up again */
pe_free_shallow_adv(rsc->allowed_nodes, TRUE);
rsc->allowed_nodes = node_list_dup(
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/utils.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- utils.c 2 Jun 2006 15:34:18 -0000 1.2
+++ utils.c 7 Jun 2006 12:46:56 -0000 1.3
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.2 2006/06/02 15:34:18 andrew Exp $ */
+/* $Id: utils.c,v 1.3 2006/06/07 12:46:56 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -26,7 +26,7 @@
#include <glib.h>
#include <pengine.h>
-#include <lib/crm/pengine/rules.h>
+#include <crm/pengine/rules.h>
#include <utils.h>
void print_str_str(gpointer key, gpointer value, gpointer user_data);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/utils.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- utils.h 31 May 2006 14:59:12 -0000 1.1
+++ utils.h 7 Jun 2006 12:46:56 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Id: utils.h,v 1.1 2006/05/31 14:59:12 andrew Exp $ */
+/* $Id: utils.h,v 1.2 2006/06/07 12:46:56 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -19,7 +19,7 @@
#ifndef PE_UTILS__H
#define PE_UTILS__H
#include <lib/crm/pengine/pengine.h>
-#include <lib/crm/pengine/common.h>
+#include <crm/pengine/common.h>
/* Node helper functions */
extern node_t *pe_find_node_id(GListPtr node_list, const char *id);
------------------------------
_______________________________________________
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 20
********************************************