On 28/10/11 11:38, Sunil Mushran wrote:
On 10/27/2011 05:26 PM, Tim Serong wrote:
That ought to work... But where did PCMK_SERVICE_ID come from in that
context? AFAICT it's always been CRM_SERVICE there. See current head:

http://oss.oracle.com/git/?p=ocfs2-tools.git;a=blob;f=ocfs2_controld/pacemaker.c;hb=HEAD#l158


CRM_SERVICE is then mapped back to PCMK_SERVICE_ID in pacemaker's
include/crm/ais.h:

https://github.com/ClusterLabs/pacemaker/blob/master/include/crm/ais.h#L54



Where is PCMK_SERVICE_ID defined? This qs has come up more than once.


Damn. It was in Pacemaker's include/crm/ais.h, back before June 27 last year(!), when it was moved to Pacemaker's configure.ac:

https://github.com/ClusterLabs/pacemaker/commit/8e939b0ad779c65d445e2fa150df1cc046428a93#include/crm/ais.h

This means it probably no longer appears in any of Pacemaker's public (devel package) header files, which explains the compile error.

I did some more digging, and we (SUSE) presumably never had this problem because we've been carrying the attached patch for rather a long time. It replaces CRM_SERVICE (a relatively uninteresting number) with a somewhat more useful string literal...


I thought the O2CB OCF RA was always provided by either pacemaker (or,
on SUSE at least, in ocfs2-tools), but was never included in the
upstream ocfs2-tools source tree?


I thought we had checked-in all the pacemaker related patches. Are we
missing something?

The O2CB OCF RA is this thing:

https://github.com/ClusterLabs/pacemaker/blob/master/extra/resources/o2cb

It's the (better/stronger/faster :)) equivalent of the o2cb init script, which you use when OCFS2 is under Pacemaker's control.

There's (IMO) a good argument for having OCF RAs included with the project they're intended for use with (all code pertaining to the operation of some program lives in one place).

OTOH, there's another argument for having them included in the generic resource-agents or pacemaker package (Pacemaker and RHCS probably being the only things that actually use OCF RAs).

I suspect the RA was either never submitted to ocfs2-tools, or was never accepted (don't know which, I wasn't involved when it was originally written).

Regards,

Tim
--
Tim Serong
Senior Clustering Engineer
SUSE
tser...@suse.com
diff -rpu ocfs2-tools/ocfs2_controld/pacemaker.c ocfs2-tools-new//ocfs2_controld/pacemaker.c
--- ocfs2-tools/ocfs2_controld/pacemaker.c	2009-05-07 09:41:24.000000000 +0800
+++ ocfs2-tools-new//ocfs2_controld/pacemaker.c	2009-07-29 17:36:28.000000000 +0800
@@ -31,6 +31,8 @@
 #include <pacemaker/crm/ais.h>
 #include <pacemaker/crm/common/cluster.h>
 #include <pacemaker/crm/common/stack.h>
+#include <pacemaker/crm/common/ipc.h>
+#include <pacemaker/crm/msg_xml.h>
 
 #include "ocfs2-kernel/kernel-list.h"
 #include "o2cb/o2cb.h"
@@ -155,7 +157,7 @@ int setup_stack(void)
 	crm_log_init("ocfs2_controld", LOG_INFO, FALSE, TRUE, 0, NULL);
 
 	if(init_ais_connection(NULL, NULL, NULL, &local_node_uname, &our_nodeid) == FALSE) {
-		log_error("Connection to our AIS plugin (%d) failed", CRM_SERVICE);
+		log_error("Connection to our AIS plugin (CRM) failed");
 		return -1;
 	}
 
_______________________________________________
Ocfs2-users mailing list
Ocfs2-users@oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-users

Reply via email to