Hi, On Wed, Jul 07, 2010 at 06:50:24PM +0200, Ilo Lorusso wrote: > Hi, > > the manual page of IPsrcaddr doest not talk of adding a cidr_netmask > and when adding one I get and error . > > I can see from the logs that the script IPsrcaddr has an error > executing the command > > ERROR: command 'ip route replace dev src 57.24.98.55' failed > > when I try execute that on my system I get the command line error > 'Cannot find device "src" ' > > when I add eth0 on the command line as indicated below it seems to work > 'ip route replace dev eth0 src 57.24.98.55' > > How can I get this to work in the script IPsrcaddr as its ment to get > the interface value from the varible called INTERFACE=`$FINDIF -C > |grep -o "^[^[:space:]]*"`
OK, can you try the attached patch. It adds the cidr_netmask parameter. Thanks, Dejan > > > On Fri, Jul 2, 2010 at 1:47 PM, Nikita Michalko > <[email protected]> wrote: > > Hi,Ilo! > > > > I'd say - IIRC - you should configure netmask in your cib > > (instance_attributes) for all IP adresses. > > Sth. like : > > <nvpair id="IPaddr_192_168_1_2_attr_1" name="cidr_netmask" value="24"/> > > > > > > HTH > > > > Nikita Michalko > > > > > > Am Mittwoch, 30. Juni 2010 23:20 schrieb Ilo Lorusso: > >> Hi everyone.. > >> > >> > >> I have a server where im using the following resources running which > >> startup and are running fine. > >> > >> ClusterIP (ocf::heartbeat:IPaddr2): Started > >> saamailin0p01.ipnetwork.co.za > >> postfix (ocf::heartbeat:postfix): Started > >> saamailin0p01.ipnetwork.co.za > >> > >> for the clusterIP address I have assigned and ip address of > >> 57.24.98.55 which i said is working fine.Now what I want to add to > >> this mix is IPsrcaddr, so and traffix that orginates from the server > >> will leave with the ip address 57.24.98.55. > >> > >> I cant seem to get i working I get a whole bunch of errors in the > >> halog .. below is a snippet and as much infomation I could provide as > >> possible .. could someone try shed some light as to why the > >> IPsrcaddr resource wont start up... Thanks... Regards Ilo > >> > >> /\/\/\ > >> primitive ClusterIP ocf:heartbeat:IPaddr2 \ > >> params ip="57.24.98.55" cidr_netmask="27" \ > >> op monitor interval="7s" > >> primitive IPsrcaddr ocf:heartbeat:IPsrcaddr \ > >> params ipaddress="57.24.98.55" > >> primitive postfix ocf:heartbeat:postfix \ > >> op monitor interval="60s" > >> location cli-prefer-ClusterIP ClusterIP \ > >> rule $id="cli-prefer-rule-ClusterIP" inf: #uname eq > >> saamailin0p01.ipnetwork.co.za > >> colocation postfix-with-ClusterIP inf: postfix ClusterIP > >> order start-IPsrcaddr-after-postfix inf: postfix IPsrcaddr > >> property $id="cib-bootstrap-options" \ > >> dc-version="1.0.7-d3fa20fc76c7947d6de66db7e52526dc6bd7d782" \ > >> cluster-infrastructure="Heartbeat" \ > >> stonith-enabled="false" \ > >> no-quorum-policy="ignore" > >> rsc_defaults $id="rsc-options" \ > >> resource-stickiness="100" > >> /\/\/\/\ > >> > >> get these errors in crm_status > >> > >> /\/\/\/\\/\/\ > >> Failed actions: > >> IPsrcaddr_start_0 (node=saamailin0s01.ipnetwork.co.za, call=11, > >> rc=1, status=complete): unknown error > >> IPsrcaddr_start_0 (node=saamailin0p01.ipnetwork.co.za, call=8, > >> rc=1, status=complete): unknown error > >> > >> \/\/\/\/\/\/\/ > >> Below are errors I get from my ha-log.. > >> /\/\/\/\/\/\/\/ > >> Jun 30 23:08:34 SaaMailIN0p01.ipnetwork.co.za lrmd: [2187]: info: RA > >> output: (IPsrcaddr:probe:stderr) ERROR: Cannot use default route w/o > >> netmask [57.24.98.55] > >> Jun 30 23:08:38 SaaMailIN0p01.ipnetwork.co.za lrmd: [2187]: info: RA > >> output: (IPsrcaddr:start:stderr) ERROR: Cannot use default route w/o > >> netmask [57.24.98.55] > >> IPsrcaddr[2516]: 2010/06/30_23:08:38 ERROR: command 'ip route > >> replace dev src 57.24.98.55' failed > >> Jun 30 23:08:39 SaaMailIN0p01.ipnetwork.co.za lrmd: [2187]: info: RA > >> output: (IPsrcaddr:stop:stderr) ERROR: Cannot use default route w/o > >> netmask [57.24.98.55] > >> > >> > >> /\/\/\/\/ > >> > >> Below is a snippet of : ip route show > >> \//\/\/\/ > >> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen > >> 1000 link/ether 00:0c:29:78:77:1e brd ff:ff:ff:ff:ff:ff > >> inet 57.24.98.50/27 brd 57.24.98.63 scope global eth0 > >> inet 57.24.98.55/27 brd 57.24.98.63 scope global secondary eth0 > >> inet6 fe80::20c:29ff:fe78:771e/64 scope link > >> valid_lft forever preferred_lft forever > >> > >> /\//\\/\/\/ > >> _______________________________________________ > >> 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 > > > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems
diff -r 4f8457471315 heartbeat/IPsrcaddr --- a/heartbeat/IPsrcaddr Wed Jul 07 10:35:09 2010 +0200 +++ b/heartbeat/IPsrcaddr Thu Jul 08 11:33:49 2010 +0200 @@ -88,6 +88,15 @@ <shortdesc lang="en">IP address</shortdesc> <content type="string" default="" /> </parameter> + +<parameter name="cidr_netmask"> +<longdesc lang="en"> +The netmask for the interface in CIDR format. (ie, 24), or in +dotted quad notation 255.255.255.0). +</longdesc> +<shortdesc lang="en">Netmask</shortdesc> +<content type="string" default=""/> +</parameter> </parameters> <actions>
_______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
