[Ocfs2-users] Error building ocfs2-tools
Hello Everyone, I am building ocfs2-tools from source. Modified /ocfs2_controld/Makefile to point to the correct pacemaker 1.1.6 headers: PCMK_INCLUDES = -I/usr/include/pacemaker -I/usr/include/heartbeat -I/usr/include/libxml2 $(GLIB_CFLAGS) However, for some reason I am getting: setup_stack: pacemaker.c:158: error: PCMK_SERVICE_ID undeclared (first use in this function) pacemaker.c:158: error: (Each undeclared identifier is reported only once pacemaker.c:158: error: for each function it appears in.) make[1]: *** [pacemaker.o] Error 1 make[1]: Leaving directory `/usr/local/src/ocfs2-tools-1.4.4/ocfs2_controld' The config I am using: ./configure --sbindir=/sbin --bin=/bin --libdir=/usr/lib --sysconfdir=/etc --datadir=/etc/ocfs2 --sharedstatedir=/var/ocfs2 --libexecdir=/usr/libexec --localstatedir=/var --mandir=/usr/man --enable-dynamic-fsck --enable-dynamic-ctl Thanks in Advance, Nick. ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Error building ocfs2-tools
ocfs2-tools-1.4.4 is too old. Build 1.6.4. The source tarball is on oss.oracle.com. On 10/27/2011 12:45 PM, Nick Khamis wrote: Hello Everyone, I am building ocfs2-tools from source. Modified /ocfs2_controld/Makefile to point to the correct pacemaker 1.1.6 headers: PCMK_INCLUDES = -I/usr/include/pacemaker -I/usr/include/heartbeat -I/usr/include/libxml2 $(GLIB_CFLAGS) However, for some reason I am getting: setup_stack: pacemaker.c:158: error: PCMK_SERVICE_ID undeclared (first use in this function) pacemaker.c:158: error: (Each undeclared identifier is reported only once pacemaker.c:158: error: for each function it appears in.) make[1]: *** [pacemaker.o] Error 1 make[1]: Leaving directory `/usr/local/src/ocfs2-tools-1.4.4/ocfs2_controld' The config I am using: ./configure --sbindir=/sbin --bin=/bin --libdir=/usr/lib --sysconfdir=/etc --datadir=/etc/ocfs2 --sharedstatedir=/var/ocfs2 --libexecdir=/usr/libexec --localstatedir=/var --mandir=/usr/man --enable-dynamic-fsck --enable-dynamic-ctl Thanks in Advance, Nick. ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Error building ocfs2-tools
Hello Sunil, Thank you so much for your response. I just downloaded 1.6. And had to add the following to pacemaker.c: #define PCMK_SERVICE_ID 9 line 158: log_error(Connection to our AIS plugin (%d) failed, PCMK_SERVICE_ID); to avoid. pacemaker.c: In function setup_stack: pacemaker.c:158: error: PCMK_SERVICE_ID undeclared (first use in this function) pacemaker.c:158: error: (Each undeclared identifier is reported only once pacemaker.c:158: error: for each function it appears in.) make[1]: *** [pacemaker.o] Error 1 make[1]: Leaving directory `/usr/local/src/ocfs2-tools-1.6.4/ocfs2_controld' make: *** [ocfs2_controld] Error 2 Not sure if that was the right thing to do? On a slightly unreallated. There use to be pacemaker ocf resource agent script included for o2cb o2cb.ocf. I take it this is now only provided by pacemaker? Cheers, Nick. ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Error building ocfs2-tools
I don't remember that resource. If it did exist, it would have existed in pacemaker. ocfs2-tools does not carry any pacemaker bits. It carries bits that allows it to work with pacemaker cman. On 10/27/2011 02:27 PM, Nick Khamis wrote: Hello Sunil, Thank you so much for your response. I just downloaded 1.6. And had to add the following to pacemaker.c: #define PCMK_SERVICE_ID 9 line 158: log_error(Connection to our AIS plugin (%d) failed, PCMK_SERVICE_ID); to avoid. pacemaker.c: In function setup_stack: pacemaker.c:158: error: PCMK_SERVICE_ID undeclared (first use in this function) pacemaker.c:158: error: (Each undeclared identifier is reported only once pacemaker.c:158: error: for each function it appears in.) make[1]: *** [pacemaker.o] Error 1 make[1]: Leaving directory `/usr/local/src/ocfs2-tools-1.6.4/ocfs2_controld' make: *** [ocfs2_controld] Error 2 Not sure if that was the right thing to do? On a slightly unreallated. There use to be pacemaker ocf resource agent script included for o2cb o2cb.ocf. I take it this is now only provided by pacemaker? Cheers, Nick. ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Error building ocfs2-tools
On 28/10/11 08:27, Nick Khamis wrote: Hello Sunil, Thank you so much for your response. I just downloaded 1.6. And had to add the following to pacemaker.c: #define PCMK_SERVICE_ID 9 line 158: log_error(Connection to our AIS plugin (%d) failed, PCMK_SERVICE_ID); to avoid. pacemaker.c: In function setup_stack: pacemaker.c:158: error: PCMK_SERVICE_ID undeclared (first use in this function) pacemaker.c:158: error: (Each undeclared identifier is reported only once pacemaker.c:158: error: for each function it appears in.) make[1]: *** [pacemaker.o] Error 1 make[1]: Leaving directory `/usr/local/src/ocfs2-tools-1.6.4/ocfs2_controld' make: *** [ocfs2_controld] Error 2 Not sure if that was the right thing to do? 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 On a slightly unreallated. There use to be pacemaker ocf resource agent script included for o2cb o2cb.ocf. I take it this is now only provided by pacemaker? 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? Regards, Tim -- Tim Serong Senior Clustering Engineer SUSE tser...@suse.com ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Error building ocfs2-tools
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. 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? ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Error building ocfs2-tools
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.0 +0800 +++ ocfs2-tools-new//ocfs2_controld/pacemaker.c 2009-07-29 17:36:28.0 +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