Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Dev

route del in IPaddr RA

 

 

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded


ikedaj at intellilink

Nov 9, 2009, 1:13 AM

Post #1 of 7 (957 views)
Permalink
route del in IPaddr RA

Hi,

I wonder why IPaddr RA needs to run "route del" before it deletes the
target interface.
Does the old version of IPaddr contain "route add"?

If "route del" fails, RA will be able to return $OCF_SUCCESS,
but I feel a little strange when I see the error message from route
command like this.

lrmd[2576]: 2009/11/09_17:24:08 info: RA output:
(prmIpPostgreSQLDB:stop:stderr) SIOCDELRT: No such process

Please see the attached file. (IPaddr-1.patch)

It might be possible to delete that line if LVS configuration doesn't also
need it.
See IPaddr-2.patch. Is it overkill?

Thanks,
Junko
Attachments: IPaddr-1.patch (0.32 KB)
  IPaddr-2.patch (0.23 KB)


ikedaj at intellilink

Nov 9, 2009, 1:51 AM

Post #2 of 7 (910 views)
Permalink
Re: route del in IPaddr RA [In reply to]

Hi,

By the way, this is a really trivial thing,
I have some requests about logging messages of IPaddr.
Please see the modified attachment.

Thanks,
Junko

On Mon, 09 Nov 2009 18:13:29 +0900, Junko IKEDA <ikedaj [at] intellilink>
wrote:

> Hi,
>
> I wonder why IPaddr RA needs to run "route del" before it deletes the
> target interface.
> Does the old version of IPaddr contain "route add"?
>
> If "route del" fails, RA will be able to return $OCF_SUCCESS,
> but I feel a little strange when I see the error message from route
> command like this.
>
> lrmd[2576]: 2009/11/09_17:24:08 info: RA output:
> (prmIpPostgreSQLDB:stop:stderr) SIOCDELRT: No such process
>
> Please see the attached file. (IPaddr-1.patch)
>
> It might be possible to delete that line if LVS configuration doesn't
> also
> need it.
> See IPaddr-2.patch. Is it overkill?
>
> Thanks,
> Junko
Attachments: IPaddr.patch (0.83 KB)


dejanmm at fastmail

Nov 9, 2009, 4:49 AM

Post #3 of 7 (905 views)
Permalink
Re: route del in IPaddr RA [In reply to]

Hi Junko-san,

On Mon, Nov 09, 2009 at 06:13:29PM +0900, Junko IKEDA wrote:
> Hi,
>
> I wonder why IPaddr RA needs to run "route del" before it deletes
> the target interface.

Perhaps in case when the new interface also includes a new
network mask. Though I'd expect that removing the interface would
also remove the route.

> Does the old version of IPaddr contain "route add"?

Looking through the logs, the route del has been there ever
since, though there was no explicit route add.

> If "route del" fails, RA will be able to return $OCF_SUCCESS,
> but I feel a little strange when I see the error message from route
> command like this.
>
> lrmd[2576]: 2009/11/09_17:24:08 info: RA output:
> (prmIpPostgreSQLDB:stop:stderr) SIOCDELRT: No such process
>
> Please see the attached file. (IPaddr-1.patch)
>
> It might be possible to delete that line if LVS configuration
> doesn't also need it.

The LVS support seems to take care of that in
lvs_remove_conflicting_loopback.

> See IPaddr-2.patch. Is it overkill?

Probably not, but I'd still rather go with the first version.
That is unless somebody comes up with some real need for route
removal.

Cheers,

Dejan


> Thanks,
> Junko



> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


dejanmm at fastmail

Nov 9, 2009, 4:51 AM

Post #4 of 7 (907 views)
Permalink
Re: route del in IPaddr RA [In reply to]

Hi Junko-san,

On Mon, Nov 09, 2009 at 06:51:52PM +0900, Junko IKEDA wrote:
> Hi,
>
> By the way, this is a really trivial thing,
> I have some requests about logging messages of IPaddr.
> Please see the modified attachment.

Won't this part be too verbose?

@@ -717,7 +719,7 @@ ip_monitor() {

PINGARGS="`pingargs $OCF_RESKEY_ip`"
for j in 1 2 3 4 5 6 7 8 9 10; do
- if $PING $PINGARGS >/dev/null 2>&1 ; then
+ if $PING $PINGARGS ; then


Thanks,

Dejan


> Thanks,
> Junko
>
> On Mon, 09 Nov 2009 18:13:29 +0900, Junko IKEDA
> <ikedaj [at] intellilink> wrote:
>
> >Hi,
> >
> >I wonder why IPaddr RA needs to run "route del" before it deletes the
> >target interface.
> >Does the old version of IPaddr contain "route add"?
> >
> >If "route del" fails, RA will be able to return $OCF_SUCCESS,
> >but I feel a little strange when I see the error message from route
> >command like this.
> >
> >lrmd[2576]: 2009/11/09_17:24:08 info: RA output:
> >(prmIpPostgreSQLDB:stop:stderr) SIOCDELRT: No such process
> >
> >Please see the attached file. (IPaddr-1.patch)
> >
> >It might be possible to delete that line if LVS configuration
> >doesn't also
> >need it.
> >See IPaddr-2.patch. Is it overkill?
> >
> >Thanks,
> >Junko


> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


misch at multinet

Nov 9, 2009, 4:54 AM

Post #5 of 7 (916 views)
Permalink
Re: route del in IPaddr RA [In reply to]

Am Montag, 9. November 2009 13:49:11 schrieb Dejan Muhamedagic:
> Hi Junko-san,
>
> On Mon, Nov 09, 2009 at 06:13:29PM +0900, Junko IKEDA wrote:
> > Hi,
> >
> > I wonder why IPaddr RA needs to run "route del" before it deletes
> > the target interface.
>
> Perhaps in case when the new interface also includes a new
> network mask. Though I'd expect that removing the interface would
> also remove the route.

Removing the interface also deletes the route. At least with the "ip" command
that is used in IPaddr2.

Be careful when automatically removing the route in the IPaddr RA. I do not
know this agent too good. Consider the following situation: Somebody has
several IP addresses from the same subnet on one interface. Removing the first
IP address from the interface remove the route to the local subnet and thus
all other IP addresses also cannot answer any packages any more.

So this removal, if no already done automatically by the ifconfig or ip
command, can only happen if this is the last address of that subnet on the
interface.

Greetings,
--
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: misch [at] multinet
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
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


ikedaj at intellilink

Nov 10, 2009, 12:45 AM

Post #6 of 7 (884 views)
Permalink
Re: route del in IPaddr RA [In reply to]

Hi Dejan,

> Won't this part be too verbose?

At first I think so too,
but ping command doesn't log any messages to ha-log if it succeed.

> @@ -717,7 +719,7 @@ ip_monitor() {
>
> PINGARGS="`pingargs $OCF_RESKEY_ip`"
> for j in 1 2 3 4 5 6 7 8 9 10; do
> - if $PING $PINGARGS >/dev/null 2>&1 ; then
> + if $PING $PINGARGS ; then
>

By the way, this is an alternative.

@@ -717,11 +719,13 @@ ip_monitor() {

PINGARGS="`pingargs $OCF_RESKEY_ip`"
for j in 1 2 3 4 5 6 7 8 9 10; do
- if $PING $PINGARGS >/dev/null 2>&1 ; then
- return $OCF_SUCCESS
- fi
+ MSG=`$PING $PINGARGS 2>&1`
+ if [ $? = 0 ]; then
+ return $OCF_SUCCESS
+ fi
done
-
+
+ ocf_log err "$MSG"
return $OCF_ERR_GENERIC
}

Thanks,
Junko


>> On Mon, 09 Nov 2009 18:13:29 +0900, Junko IKEDA
>> <ikedaj [at] intellilink> wrote:
>>
>> >Hi,
>> >
>> >I wonder why IPaddr RA needs to run "route del" before it deletes the
>> >target interface.
>> >Does the old version of IPaddr contain "route add"?
>> >
>> >If "route del" fails, RA will be able to return $OCF_SUCCESS,
>> >but I feel a little strange when I see the error message from route
>> >command like this.
>> >
>> >lrmd[2576]: 2009/11/09_17:24:08 info: RA output:
>> >(prmIpPostgreSQLDB:stop:stderr) SIOCDELRT: No such process
>> >
>> >Please see the attached file. (IPaddr-1.patch)
>> >
>> >It might be possible to delete that line if LVS configuration
>> >doesn't also
>> >need it.
>> >See IPaddr-2.patch. Is it overkill?
>> >
>> >Thanks,
>> >Junko
>
>
>> _______________________________________________________
>> Linux-HA-Dev: Linux-HA-Dev [at] lists
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> Home Page: http://linux-ha.org/
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
Attachments: IPaddr.patch (0.98 KB)


dejanmm at fastmail

Nov 10, 2009, 1:55 AM

Post #7 of 7 (886 views)
Permalink
Re: route del in IPaddr RA [In reply to]

Hi Junko-san,

On Tue, Nov 10, 2009 at 05:45:55PM +0900, Junko IKEDA wrote:
> Hi Dejan,
>
> >Won't this part be too verbose?
>
> At first I think so too,
> but ping command doesn't log any messages to ha-log if it succeed.
>
> >@@ -717,7 +719,7 @@ ip_monitor() {
> >
> > PINGARGS="`pingargs $OCF_RESKEY_ip`"
> > for j in 1 2 3 4 5 6 7 8 9 10; do
> > - if $PING $PINGARGS >/dev/null 2>&1 ; then
> > + if $PING $PINGARGS ; then
> >
>
> By the way, this is an alternative.
>
> @@ -717,11 +719,13 @@ ip_monitor() {
>
> PINGARGS="`pingargs $OCF_RESKEY_ip`"
> for j in 1 2 3 4 5 6 7 8 9 10; do
> - if $PING $PINGARGS >/dev/null 2>&1 ; then
> - return $OCF_SUCCESS
> - fi
> + MSG=`$PING $PINGARGS 2>&1`
> + if [ $? = 0 ]; then
> + return $OCF_SUCCESS
> + fi
> done
> -
> +
> + ocf_log err "$MSG"
> return $OCF_ERR_GENERIC
> }

Alternative accepted :)

Patch applied.

Cheers,

Dejan

> Thanks,
> Junko
>
>
> >>On Mon, 09 Nov 2009 18:13:29 +0900, Junko IKEDA
> >><ikedaj [at] intellilink> wrote:
> >>
> >>>Hi,
> >>>
> >>>I wonder why IPaddr RA needs to run "route del" before it deletes the
> >>>target interface.
> >>>Does the old version of IPaddr contain "route add"?
> >>>
> >>>If "route del" fails, RA will be able to return $OCF_SUCCESS,
> >>>but I feel a little strange when I see the error message from route
> >>>command like this.
> >>>
> >>>lrmd[2576]: 2009/11/09_17:24:08 info: RA output:
> >>>(prmIpPostgreSQLDB:stop:stderr) SIOCDELRT: No such process
> >>>
> >>>Please see the attached file. (IPaddr-1.patch)
> >>>
> >>>It might be possible to delete that line if LVS configuration
> >>>doesn't also
> >>>need it.
> >>>See IPaddr-2.patch. Is it overkill?
> >>>
> >>>Thanks,
> >>>Junko
> >
> >
> >>_______________________________________________________
> >>Linux-HA-Dev: Linux-HA-Dev [at] lists
> >>http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> >>Home Page: http://linux-ha.org/
> >
> >_______________________________________________________
> >Linux-HA-Dev: Linux-HA-Dev [at] lists
> >http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> >Home Page: http://linux-ha.org/


> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.