Thank you all very much,  after run "sysctl -w 
net.ipv4.conf.all.promote_secondaries=1",  it works well when enabled 
monitoring.
At 2011-07-01,"Lars Ellenberg" <[email protected]> wrote:
>On Fri, Jul 01, 2011 at 12:26:05PM +0200, Dejan Muhamedagic wrote:
>> Hi,
>> 
>> On Fri, Jul 01, 2011 at 05:58:51PM +1000, Andrew Beekhof wrote:
>> > On Thu, Jun 30, 2011 at 3:47 PM, 徐斌 <[email protected]> wrote:
>> > > Hi Gent,
>> > >
>> > > I want to let the floating IP running again after restart the network.
>> > > But I met the issue when I enable the monitoring for the floating ip 
>> > > (using ocf:heartbeat:IPaddr2).
>> > >
>> > > [root@master ~]# crm configure show ip2
>> > > primitive ip2 ocf:heartbeat:IPaddr2 \
>> > >    params ip="172.20.33.88" nic="eth1" iflabel="0" 
>> > > cidr_netmask="255.255.255.0" \
>> > >    op monitor interval="10s"
>> > >
>> > > The IP address configured on the eth0 was lost, and it's so bad that I 
>> > > cannot up the nic before I stop the heartbeat.
>> > > eth1      Link encap:Ethernet  HWaddr 08:00:27:11:87:63
>> > >          inet6 addr: fe80::a00:27ff:fe11:8763/64 Scope:Link
>> > >          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>> > >          RX packets:127723 errors:0 dropped:0 overruns:0 frame:0
>> > >          TX packets:7288 errors:0 dropped:0 overruns:0 carrier:0
>> > >          collisions:0 txqueuelen:1000
>> > >          RX bytes:11752527 (11.2 MiB)  TX bytes:1331914 (1.2 MiB)
>> > >
>> > > eth1:0    Link encap:Ethernet  HWaddr 08:00:27:11:87:63
>> > >          inet addr:172.20.33.88  Bcast:172.20.33.255  Mask:255.255.255.0
>> > >          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>> > >
>> > > [root@master ~]# ifup eth1
>> > > [root@master ~]# ifconfig eth1
>> > > eth1      Link encap:Ethernet  HWaddr 08:00:27:11:87:63
>> > >          inet6 addr: fe80::a00:27ff:fe11:8763/64 Scope:Link
>> > >          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>> > >          RX packets:127956 errors:0 dropped:0 overruns:0 frame:0
>> > >          TX packets:7362 errors:0 dropped:0 overruns:0 carrier:0
>> > >          collisions:0 txqueuelen:1000
>> > >          RX bytes:11773863 (11.2 MiB)  TX bytes:1341574 (1.2 MiB)
>> > >
>> > > I think there maybe a time racing for the '/etc/init.d/network' and 
>> > > 'pacemaker', if 'pacemaker' start the eth1:0 first, then it will not set 
>> > > the IP address for eth1.
>> > 
>> > Right, the resource agent assumes the device is always up and only
>> > adds/removes aliases.
>> 
>> There's a way to use IPaddr2 to manage addresses on an interface
>> which otherwise doesn't contain a "basic" address. I cannot
>> recall now how, please look it up in the ML archives.
>
>It is even in the IPaddr2 meta data longdesc now ;-)
>
>https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/IPaddr2#L113
>
>
>
>-- 
>: Lars Ellenberg
>: LINBIT | Your Way to High Availability
>: DRBD/HA support and consulting http://www.linbit.com
>
>DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
>_______________________________________________
>Linux-HA mailing list
>[email protected]
>http://lists.linux-ha.org/mailman/listinfo/linux-ha
>See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to