[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: new to pacemaker and heartbeat on debian...getting error..



Le Tuesday 25 October 2011 00:16:36 Joey L, vous avez écrit :
> > Here we are :
> >> Oct 24 16:58:54 deb1 lrmd: [4804]: info: RA output:
> >> (failover-ip:start:stderr) ERROR: Cannot use default route w/o netmask
> >> [192.168.2.113]
> >> Oct 24 16:58:54 deb1 IPaddr[5292]: ERROR: /usr/lib/heartbeat/findif
> >> failed [rc=1].
> >> Oct 24 16:58:54 deb1 lrmd: [4804]: WARN: Managed failover-ip:start
> >> process 5292 exited with return code 1.
> > 
> > [...]
> > 
> >> I have a very small network --- this ip is not being used at all.
> >> all i did was clone a vbox vm machine to another machine and installed.
> >> after installing - i realized the nic hardwares are the same do i did
> >> a refersh and restarted the machines.
> >> 
> >> Do i have to stop network manager ? or do i have to do anything
> >> special for pacemaker and corosync ???
> > 
> > I hope you don't use network manager for a cluster !
> > 
> > You really should use static IP.
> 
> I have my interfaces set for a static ip addresses in network manager
> -- should i stop it from running ?

No, for the moment, let it like that, if it's static and started before 
corosync, it should work.

> how do i bring up the interfaces automatically when i reboot the machine ?

Just one file in Debian : /etc/network/interfaces (see man interfaces).

> > Here we can see in the logs that the resource agent for the IP resource
> > can not finc the network interface on which to add the faliover IP.
> > 
> > Show us the output of "ifconfig".
> 
> I do see an error in the log about a netmask not being set - did not
> understand that because i have it set in network manager - no place to
> set in corosync config.

Ther is 2 resource agent to manage IP : Ipaddr and Ipaddr2.
I use Ipaddr2 that has more options, but IPAddr should work.
Perhaps that IPaddr require to specify the netmask in the primitive 
configuration ?

drbd-mc will have tell you...


> > Your two clusteres nodes are vbox VM ? How is the network configured ?
> > Bridge or NAT ?
> > I think it must be a bridge to work, I'm not sure.
> 
> I do have it set as bridges and different hardware addresses.
> They can ping each other and i can transfer files via ssh.

Ok, great.

> my ifconfig :
> 
> root@deb1:/home/mjh# ifconfig
> eth0      Link encap:Ethernet  HWaddr 08:00:27:fb:85:98
>           inet addr:192.168.2.110  Bcast:192.168.2.255  Mask:255.255.255.0
>           inet6 addr: fe80::a00:27ff:fefb:8598/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:36765 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:59129 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:5800366 (5.5 MiB)  TX bytes:7756410 (7.3 MiB)
> 
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:1254 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:1254 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:122112 (119.2 KiB)  TX bytes:122112 (119.2 KiB)
> 
> 
> and :
> 
> 
> root@deb2:/home/mjh# ifconfig
> eth1      Link encap:Ethernet  HWaddr 08:00:27:50:ac:f6
>           inet addr:192.168.2.111  Bcast:192.168.2.255  Mask:255.255.255.0
>           inet6 addr: fe80::a00:27ff:fe50:acf6/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:54669 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:30001 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:7328413 (6.9 MiB)  TX bytes:4064625 (3.8 MiB)
> 
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:919 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:919 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:89910 (87.8 KiB)  TX bytes:89910 (87.8 KiB)
> 
> 
> thanks again.

OK, same network, good netmask.

See the configuration options for ocf:heartbeat:IPaddr :
http://linux-ha.org/doc/man-pages/re-ra-IPaddr.html

Especialy :
cidr_netmask

    The netmask for the interface in CIDR format. (ie, 24), or in dotted quad 
notation 255.255.255.0). If unspecified, the script will also try to determine 
this from the routing table. (optional, string, no default)

If you don't have a defaut gateway on your nodes, it will not find the netmask 
and then the interface to put the IP on.

So, either define cidr_netmask parameter in your resource definition, or the 
nic parameter :

nic

    The base network interface on which the IP address will be brought online. 
If left empty, the script will try and determine this from the routing table. 
Do NOT specify an alias interface in the form eth0:1 or anything here; rather, 
specify the base interface only. Prerequisite: There must be at least one 
static IP address, which is not managed by the cluster, assigned to the 
network interface. If you can not assign any static IP address on the 
interface, modify this kernel parameter: sysctl -w 
net.ipv4.conf.all.promote_secondaries=1 (or per device) (optional, string, 
default eth0)

You should have something like (use "crm configure", then "edit failover-ip") 
:
primitive failover-ip ocf:heartbeat:IPaddr \
        params ip="192.168.2.113" cidr_netmask="255.255.255.0" \
        op monitor interval="10s"

Or

primitive failover-ip ocf:heartbeat:IPaddr \
        params ip="192.168.2.113" nic="eth0" \
        op monitor interval="10s"

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: