On Tue, Jul 27, 2010 at 03:44:21PM +0900, Keisuke MORI wrote:
> 2010/7/26 Lars Ellenberg <lars.ellenb...@linbit.com>:
> > On Mon, Jul 26, 2010 at 06:39:50PM +0900, Keisuke MORI wrote:
> >> By the way, do we have any plan to release the next
> >> agents/glue/heartbeat packages from the Linux-HA project?
> >> I think it's good time to consider them for the best use of 
> >> pacemaker-1.0.9.
> >
> > I think glue was released by dejan just before he went on vacation,
> > though the release announcement is missing (1.0.6).
> >
> > Heartbeat does not have many changes (appart from some cleanup in the
> > build dependencies), so there is no urge to release a 3.0.4, but we
> > could do so any time.
> >
> > Agents has a few fixes, but also has some big changes.
> > I have to take an other close look, but yes, I think we should release
> > an agents 1.0.4 within the next few weeks.
> 
> Great! Then let's go for the next release for agents/heartbeat along with 
> glue.
> 
> My most concern about agents is LF#2378:
> http://developerbugs.linux-foundation.org/show_bug.cgi?id=2378
> It is a change but it's a necessary change to make the maintenance
> mode work fine.
> 
> For heartbeat, I personally like "pacemaker on" in ha.cf :)
> 
> 
> >> "find_if" for IPv6 is also missing if you want to write a script based one.
> >
> > I'm sure that can be scripted itself around
> > ip -o -f inet6 a s | grep ...
> >
> > but we already sort of agreed that this would
> > not be development time well spent.
> 
> find_if does more than just grepping. It has to do matching against
> "the network address" calculated from the given address and the prefix
> to find out which interface would be appropriate to be assigned the
> virtual address. The current IPaddr2 also relies on find_if to do
> this.
> 
> But anyway, I would also agree that we are not going to develop such.
> Just off topic.

Personally I think find_if is an abomination to mankind.
But if one really wants such a thing, I wonder if it can be done like this:

        ip -o addr show to PREFIX | cut -d ' ' -f 2

Where PREFIX can either be the address to be added:

        ip -o addr show to 172.16.4.222/16 | cut -d ' ' -f 2
        ip -o addr show to 172.16.4.222 | cut -d ' ' -f 2

Or the network to which the address is to be added:

        ip -o addr show to 172.16.0.0/16 | cut -d ' ' -f 2

And this also works with IPv6

        ip -o addr show to fe80::20c:76ff:fe24:932/64 | cut -d ' ' -f 2
        ip -o addr show to fe80::20c:76ff:fe24:932 | cut -d ' ' -f 2
        ip -o addr show to fe80::20c:76ff:0:0/64 | cut -d ' ' -f 2

Although I suspect its schemantics are slightly different that of find_if
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to