* [Ocfs2-devel] New OCF edition of o2cb @ 2008-11-18 10:30 Andrew Beekhof 2008-11-18 23:15 ` Joel Becker 0 siblings, 1 reply; 6+ messages in thread From: Andrew Beekhof @ 2008-11-18 10:30 UTC (permalink / raw) To: ocfs2-devel Hi, Here is an OCF-compliant edition of o2cb for use by cluster managers to control userspace-based OCFS2 installations. It defaults to using the pcmk stack, but can also be configured to use cman. I believe the correct location for it is vendor/common Oh, and if the license is an issue, it can be changed. Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: o2cb.ocf.sh Type: application/octet-stream Size: 11056 bytes Desc: not available Url : http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20081118/9c3e6005/attachment.obj ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Ocfs2-devel] New OCF edition of o2cb 2008-11-18 10:30 [Ocfs2-devel] New OCF edition of o2cb Andrew Beekhof @ 2008-11-18 23:15 ` Joel Becker 2008-11-19 8:49 ` Andrew Beekhof 0 siblings, 1 reply; 6+ messages in thread From: Joel Becker @ 2008-11-18 23:15 UTC (permalink / raw) To: ocfs2-devel On Tue, Nov 18, 2008 at 11:30:18AM +0100, Andrew Beekhof wrote: > Here is an OCF-compliant edition of o2cb for use by cluster managers to > control userspace-based OCFS2 installations. > It defaults to using the pcmk stack, but can also be configured to use > cman. I'm guessing this is basically the same as o2cb.init, but using configuration and constants used by OCF? Coolness. Why does it need to 'default' to any stack? o2cb.init gets the answer out of /etc/sysconfig/o2cb, and I would assume OCF would have a similar sort of thing. > I believe the correct location for it is vendor/common Yes. > Oh, and if the license is an issue, it can be changed. GPLv2 is exactly what we use. You can remove the paragraph about "If you didn't receive a copy of the GPL"; the FSF has moved, and they recommend removing that paragraph. Regarding Copyright, much of the code comes from o2cb.init, which is Copyright Oracle 2005,2008. Please add that copyright. Joel -- "The question of whether computers can think is just like the question of whether submarines can swim." - Edsger W. Dijkstra Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Ocfs2-devel] New OCF edition of o2cb 2008-11-18 23:15 ` Joel Becker @ 2008-11-19 8:49 ` Andrew Beekhof 2008-11-19 18:10 ` Joel Becker 0 siblings, 1 reply; 6+ messages in thread From: Andrew Beekhof @ 2008-11-19 8:49 UTC (permalink / raw) To: ocfs2-devel On Nov 19, 2008, at 12:15 AM, Joel Becker wrote: > On Tue, Nov 18, 2008 at 11:30:18AM +0100, Andrew Beekhof wrote: >> Here is an OCF-compliant edition of o2cb for use by cluster >> managers to >> control userspace-based OCFS2 installations. >> It defaults to using the pcmk stack, but can also be configured to >> use >> cman. > > I'm guessing this is basically the same as o2cb.init, but using > configuration and constants used by OCF? Coolness. right > > Why does it need to 'default' to any stack? o2cb.init gets the > answer out of /etc/sysconfig/o2cb, and I would assume OCF would have a > similar sort of thing. Actually not. OCF expects any options to be supplied in the form of environment variables (which are specified as part of the cluster resource definition and the list of supported ones is described in the script's metadata). Options can also be mandatory or optional (also indicated in the metadata). eg. this is what an IP address looks like in a cluster configuration: <primitive id="myFirstIP" class="ocf" type="IPaddr" provider="heartbeat"> <instance_attributes id="attrs-myFirstIP"> <nvpair id="netmask-myFirstIP" name="cidr_netmask" value="32"/> <nvpair id="ip-myFirstIP" name="ip" value="1.2.3.4"/> </instance_attributes> </primitive> The cluster manager then translates that into: OCF_RESKEY_ip=1.2.3.4 OCF_RESKEY_netmask=32 /usr/lib/ocf/ resource.d/heartbeat/IPaddr {action} where {action} is one of the usual suspects: start, stop, monitor, etc Note that we didn't specify a value for "nic", so the script will figure out which interface to use. We could have also left out the netmask and the script would have used the one from the interface. (Tangent: Obviously the above XML is in Pacemaker syntax, but although cman uses different syntax, it effectively does the same thing) Applying that to the current topic, the cman version of the resource would be: <primitive id="o2cb-cman" class="ocf" type="o2cb" provider="ocfs2"> <instance_attributes id="o2cb-cman-attrs"> <nvpair id="cman-stack" name="stack" value="cman"/> </instance_attributes> </primitive> and the Pacemaker version (which can use the advertised default for "stack") would be: <primitive id="o2cb-pcmk" class="ocf" type="o2cb" provider="ocfs2"/> If I had knowledge of cman, its likely I could automatically work out the "right" stack to use instead of just defaulting to pcmk. But for the initial cut, I thought it best to provide a manual setting (that happened to favor the author :-) rather than an automatic one that was probably only half right. Does that all make sense? > > >> I believe the correct location for it is vendor/common > > Yes. > >> Oh, and if the license is an issue, it can be changed. > > GPLv2 is exactly what we use. You can remove the paragraph > about "If you didn't receive a copy of the GPL"; the FSF has moved, > and > they recommend removing that paragraph. Regarding Copyright, much > of the > code comes from o2cb.init, which is Copyright Oracle 2005,2008. > Please > add that copyright. Np. Do you want to fix that when you commit or shall I resend? ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Ocfs2-devel] New OCF edition of o2cb 2008-11-19 8:49 ` Andrew Beekhof @ 2008-11-19 18:10 ` Joel Becker 2008-11-19 20:23 ` Andrew Beekhof 0 siblings, 1 reply; 6+ messages in thread From: Joel Becker @ 2008-11-19 18:10 UTC (permalink / raw) To: ocfs2-devel On Wed, Nov 19, 2008 at 09:49:24AM +0100, Andrew Beekhof wrote: >> Why does it need to 'default' to any stack? o2cb.init gets the >> answer out of /etc/sysconfig/o2cb, and I would assume OCF would have a >> similar sort of thing. > > Actually not. <snip> > <primitive id="o2cb-cman" class="ocf" type="o2cb" > provider="ocfs2"> > <instance_attributes id="o2cb-cman-attrs"> > <nvpair id="cman-stack" name="stack" value="cman"/> > </instance_attributes> > </primitive> > > and the Pacemaker version (which can use the advertised default for > "stack") would be: > <primitive id="o2cb-pcmk" class="ocf" type="o2cb" > provider="ocfs2"/> > > If I had knowledge of cman, its likely I could automatically work out > the "right" stack to use instead of just defaulting to pcmk. > But for the initial cut, I thought it best to provide a manual setting > (that happened to favor the author :-) rather than an automatic one that > was probably only half right. Well, if you are just trying to figure out the value to stick in /sys/fs/ocfs2/cluster_stack, the answer is "cman", because I wrote those bits in ocfs2-tools ;-) > Np. > Do you want to fix that when you commit or shall I resend? Why don't you resend so we don't have me stomping on it? Thanks, Joel -- "Every day I get up and look through the Forbes list of the richest people in America. If I'm not there, I go to work." - Robert Orben Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Ocfs2-devel] New OCF edition of o2cb 2008-11-19 18:10 ` Joel Becker @ 2008-11-19 20:23 ` Andrew Beekhof 2008-12-02 14:09 ` Andrew Beekhof 0 siblings, 1 reply; 6+ messages in thread From: Andrew Beekhof @ 2008-11-19 20:23 UTC (permalink / raw) To: ocfs2-devel On Nov 19, 2008, at 7:10 PM, Joel Becker wrote: > Well, if you are just trying to figure out the value to stick in > /sys/fs/ocfs2/cluster_stack, the answer is "cman", because I wrote > those > bits in ocfs2-tools ;-) Yeah, but pcmk is the future man :) >> Np. >> Do you want to fix that when you commit or shall I resend? > > Why don't you resend so we don't have me stomping on it? attached I'll get together with Lon at some point and get the cman/pcmk auto- detection working - will send a patch when its done. -------------- next part -------------- A non-text attachment was scrubbed... Name: o2cb.ocf Type: application/octet-stream Size: 10885 bytes Desc: not available Url : http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20081119/0db265cd/attachment.obj -------------- next part -------------- ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Ocfs2-devel] New OCF edition of o2cb 2008-11-19 20:23 ` Andrew Beekhof @ 2008-12-02 14:09 ` Andrew Beekhof 0 siblings, 0 replies; 6+ messages in thread From: Andrew Beekhof @ 2008-12-02 14:09 UTC (permalink / raw) To: ocfs2-devel Just wondering what the status of this (and the other non-lsb patches) is... you're not waiting on me to commit are you? On Wed, Nov 19, 2008 at 21:23, Andrew Beekhof <abeekhof@suse.de> wrote: > > On Nov 19, 2008, at 7:10 PM, Joel Becker wrote: > >> Well, if you are just trying to figure out the value to stick in >> /sys/fs/ocfs2/cluster_stack, the answer is "cman", because I wrote those >> bits in ocfs2-tools ;-) > > Yeah, but pcmk is the future man :) > >>> Np. >>> Do you want to fix that when you commit or shall I resend? >> >> Why don't you resend so we don't have me stomping on it? > > attached > I'll get together with Lon at some point and get the cman/pcmk > auto-detection working - will send a patch when its done. > > > > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com > http://oss.oracle.com/mailman/listinfo/ocfs2-devel > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-02 14:09 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-11-18 10:30 [Ocfs2-devel] New OCF edition of o2cb Andrew Beekhof 2008-11-18 23:15 ` Joel Becker 2008-11-19 8:49 ` Andrew Beekhof 2008-11-19 18:10 ` Joel Becker 2008-11-19 20:23 ` Andrew Beekhof 2008-12-02 14:09 ` Andrew Beekhof
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.