[Pacemaker] [PATCH] pingd: set ICMP6 filter
Hi all, I'm posting patch for pignd in Pacemaker 1.0 (changeset:6cf252e61e25). This patch sets the filter of ICMP6 and fixed some bugs. I hope they are helpful to you. Regards, Kazunori INOUE diff -urN stable-1.0.org/tools/pingd.c stable-1.0.mod/tools/pingd.c --- stable-1.0.org/tools/pingd.c2009-10-09 14:05:07.0 +0900 +++ stable-1.0.mod/tools/pingd.c2009-10-09 13:57:21.0 +0900 @@ -40,6 +40,9 @@ #include sys/un.h #include sys/socket.h #include sys/uio.h +#include sys/time.h +#include net/if.h +#include sys/ioctl.h #include arpa/inet.h #include netinet/ip.h @@ -89,6 +92,9 @@ int ident; /* our pid */ +unsigned char cmsgbuf[4096]; +int cmsglen = 0; + typedef struct ping_node_s { intfd; /* ping socket */ uint16_tiseq; /* sequence number */ @@ -109,7 +115,8 @@ const char *node, const char *link, const char *status, void *private_data); void send_update(int active); -int process_icmp_error(ping_node *node, struct sockaddr_in *whereto); +int process_icmp6_error(ping_node *node, struct sockaddr_in6 *whereto); +int process_icmp4_error(ping_node *node, struct sockaddr_in *whereto); /* * in_cksum -- @@ -148,102 +155,248 @@ return answer; } -static const char *ping_desc(uint8_t type, uint8_t code) +static const char *ping_desc(gboolean family, uint8_t type, uint8_t code) { -switch(type) { - case ICMP_ECHOREPLY: - return Echo Reply; - case ICMP_ECHO: - return Echo Request; - case ICMP_PARAMPROB: - return Bad Parameter; - case ICMP_SOURCEQUENCH: - return Packet lost, slow down; - case ICMP_TSTAMP: - return Timestamp Request; - case ICMP_TSTAMPREPLY: - return Timestamp Reply; - case ICMP_IREQ: - return Information Request; - case ICMP_IREQREPLY: - return Information Reply; - - case ICMP_UNREACH: - switch(code) { - case ICMP_UNREACH_NET: - return Unreachable Network; - case ICMP_UNREACH_HOST: - return Unreachable Host; - case ICMP_UNREACH_PROTOCOL: - return Unreachable Protocol; - case ICMP_UNREACH_PORT: - return Unreachable Port; - case ICMP_UNREACH_NEEDFRAG: - return Unreachable: Fragmentation needed; - case ICMP_UNREACH_SRCFAIL: - return Unreachable Source Route; - case ICMP_UNREACH_NET_UNKNOWN: - return Unknown Network; - case ICMP_UNREACH_HOST_UNKNOWN: - return Unknown Host; - case ICMP_UNREACH_ISOLATED: - return Unreachable: Isolated; - case ICMP_UNREACH_NET_PROHIB: - return Prohibited network; - case ICMP_UNREACH_HOST_PROHIB: - return Prohibited host; - case ICMP_UNREACH_FILTER_PROHIB: - return Unreachable: Prohibited filter; - case ICMP_UNREACH_TOSNET: - return Unreachable: Type of Service and Network; - case ICMP_UNREACH_TOSHOST: - return Unreachable: Type of Service and Host; - case ICMP_UNREACH_HOST_PRECEDENCE: - return Unreachable: Prec vio; - case ICMP_UNREACH_PRECEDENCE_CUTOFF: - return Unreachable: Prec cutoff; + if(family == AF_INET6) { + switch(type) { + case ICMP6_DST_UNREACH: + switch(code) { + case ICMP6_DST_UNREACH_NOROUTE: + return No Route to Destination; + case ICMP6_DST_UNREACH_ADMIN: + return Destination Administratively Unreachable; + case ICMP6_DST_UNREACH_BEYONDSCOPE: + return Destination Unreachable Beyond Scope; + case ICMP6_DST_UNREACH_ADDR: + return Destination Address Unreachable; + case ICMP6_DST_UNREACH_NOPORT: + return Destination Port Unreachable; + default: + crm_err(Unreachable: Unkown subtype: %d, code); + return Unreachable: Unkown Subtype; + } + case ICMP6_PACKET_TOO_BIG: + return Packet too big; + case ICMP6_TIME_EXCEEDED: + switch(code) { + case ICMP6_TIME_EXCEED_TRANSIT: + return Time to live exceeded; + case ICMP6_TIME_EXCEED_REASSEMBLY: + return Frag
[Pacemaker] fedora11: openais fails to start
Hi, I wanted to try pacemaker/openais on a fedora11. Packages from OSBS: # rpm -qa | grep ais\|pace pacemaker-1.0.5-4.1.i386 libopenais2-0.80.5-15.1.i386 pacemaker-libs-1.0.5-4.1.i386 openais-0.80.5-15.1.i386 pacemaker-mgmt-1.99.2-6.1.i386 When I start /etc/init.d/openais start - There are some entries in the log. Nothing what I could identify as an error. See: http://www.pastebin.org/41120 - openais-cfgtool -s stops at Printing ring status. Need to CTRL-C to stop. - No pacemaker process are really started: ps uax | grep crm is empty. Any ideas? Using corosync-1.0.0 from fedora11 is no option. Results in another error. -- Dr. Michael Schwartzkopff MultiNET Services GmbH Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany Tel: +49 - 89 - 45 69 11 0 Fax: +49 - 89 - 45 69 11 21 mob: +49 - 174 - 343 28 75 mail: mi...@multinet.de web: www.multinet.de Sitz der Gesellschaft: 85630 Grasbrunn Registergericht: Amtsgericht München HRB 114375 Geschäftsführer: Günter Jurgeneit, Hubert Martens --- PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B Skype: misch42 ___ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker
[Pacemaker] Access CIB/CRM via IPC/Library?
Hi All, after having understood the concepts (if not all details) of configuring Pacemaker (Configuration Explained does a good job) I started checking out how to actually create/activate a configuration. Seems that there's some GUI (wherever it is, it's not included in my packages, but we don't need it anyhow) and the command-line utilities crm and cibadmin. However what we really need is a more direct access in order to programmatically change the cluster configuration [without calling out to the command-line utilities from Python or C]. It also seems that crm and cibadmin use libcrmcommon to communicate via the Unix sockets in /var/run/crm. Is this library documented anywhere? Are there Python-bindings? Is there any other officially supported API? Thanks, Colin ___ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Re: [Pacemaker] fedora11: openais fails to start
You could try the f12 rpms - we have tested these. We are in the process of making these available in f11/f10, but there is a bit of a lag because of fedora process. The f12 rpms are at koji.fedoraproject.org. From looking at your logs, it appears iptables is enabled and not configured properly. try service iptables stop. Regards -steve On Fri, 2009-10-09 at 14:31 +0200, Michael Schwartzkopff wrote: Hi, I wanted to try pacemaker/openais on a fedora11. Packages from OSBS: # rpm -qa | grep ais\|pace pacemaker-1.0.5-4.1.i386 libopenais2-0.80.5-15.1.i386 pacemaker-libs-1.0.5-4.1.i386 openais-0.80.5-15.1.i386 pacemaker-mgmt-1.99.2-6.1.i386 When I start /etc/init.d/openais start - There are some entries in the log. Nothing what I could identify as an error. See: http://www.pastebin.org/41120 - openais-cfgtool -s stops at Printing ring status. Need to CTRL-C to stop. - No pacemaker process are really started: ps uax | grep crm is empty. Any ideas? Using corosync-1.0.0 from fedora11 is no option. Results in another error. ___ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Re: [Pacemaker] crm command syntax for defining multiple instance_attributes
Hi Andrew, According to the Pacemaker Configuration Explained, the meta attribute and instance attribute object can have rule inside of it. But cibadmin command does not accept it. Is it a documentation error or bug in software? Thank you On Thu, Oct 8, 2009 at 6:11 PM, hj lee kerd...@gmail.com wrote: Hi, I had the same error of the previous post about stickiness when I tried to import below xml. [r...@s2 tmp]# cibadmin --replace --obj_type resources --xml-file special-rex.xml Call cib_replace failed (-47): Update does not conform to the configured schema/DTD It seems instance_attributes does not accept rule same as meta_attributes. Is there any other way to set a different value to instance attribute? Thanks On Thu, Oct 8, 2009 at 2:47 PM, hj lee kerd...@gmail.com wrote: Hi, The XML below is an example in Configuration Explained 1.0 section of Using Rules to Control Resource Options. Is there any way to create the same instance_attribute by crm command? Thanks primitive id=mySpecialRsc class=ocf type=Special provider=”me” instance_attributes id=”special-node1” score=”3” rule id=node1-special-case expression id=node1-special-case-expr attribute=#uname operation=eq value=node1/ /rule nvpair id=node1-interface name=interface value=eth1/ /instance_attributes . -- Dream with longterm vision! kerdosa -- Dream with longterm vision! kerdosa ___ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker
[Pacemaker] Recommended versions for the cluster stack?
Hello: I'm trying to set up a pacemaker/openais cluster on Gentoo, which requires building the entire stack from source. I have everything running, but the stack has some strange stability issues, (in particular during a reboot), that I'm sure are due to some version incompatibilities. What software versions comprise the recommended stack for Pacemaker? (I.E. what versions are currently tested and/or in production?) In particular, I am interested in the version numbers of: pacemaker openais libdlm drbd and ocfs2 If my software versions aren't too far off, I'll post my logs after the weekend. It's been a frustrating afternoon trying to get my cluster back up. Thanks! Jonathan -- J. deBoer Computer Consulting. 42 Birchmont Dr. Leduc, AB. T9E-8S4 cell: 780-717-0669 ___ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Re: [Pacemaker] Recommended versions for the cluster stack?
I do not know what the recommended versions are, but I wrote ebuilds for the pacemaker/corosync cluster stack with the latest versions that were available at the time. They are located here http://code.tjhsst.edu/vm-overlay/vm-overlay. I believe there might be a small bug in the permissions in the pacemaker ebuild, but I do not remember if I fixed it. We are currently using the ebuilds in a testing environment running semi-production services (secondary mailserver, nameserver). However, we do not have need of dlm, drbd, or ocfs2 yet. If you do use ebuilds, please respond with what you used, or if you modify mine, how you modified them. Thomas Georgiou P.S. Now I see you already have things installed. Did you install them by hand, or through ebuilds? On Fri, Oct 9, 2009 at 7:13 PM, Jonathan jdccde...@gmail.com wrote: Hello: I'm trying to set up a pacemaker/openais cluster on Gentoo, which requires building the entire stack from source. I have everything running, but the stack has some strange stability issues, (in particular during a reboot), that I'm sure are due to some version incompatibilities. What software versions comprise the recommended stack for Pacemaker? (I.E. what versions are currently tested and/or in production?) In particular, I am interested in the version numbers of: pacemaker openais libdlm drbd and ocfs2 If my software versions aren't too far off, I'll post my logs after the weekend. It's been a frustrating afternoon trying to get my cluster back up. Thanks! Jonathan -- J. deBoer Computer Consulting. 42 Birchmont Dr. Leduc, AB. T9E-8S4 cell: 780-717-0669 ___ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker ___ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker