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

Re: [Linux-cluster] Higher Grained Definition ofIP AddressAssignments



On Thu, 17 Jun 2010 14:59:59 -0500, Dustin Henry Offutt
<dhoffutt gmail com> wrote:
> Believe this issue has been resolved by altering
/usr/share/cluster/ip.sh.
> 
> The resulting script has added new XML for a new "device" parameter.
> 
> New variable 'device' is passed to the ip_op function and then to
functions
> ipv4 and ipv6. The ipv4 and ipv6 function iterate through all network
> devices and, upon finding a device with a configuration similar to the
IP
> needing to be assigned, would assign the IP there, which caused all the
IPs
> to bunch up on one device. The added logic here will go through the
> iteration, and if there is a "device" variable requested it is matched
> against the device name in the function.
> 
> Is there some way to get this put into the Cluster Suite officially so
that
> it may be supported?
> 
> Thank you...
> 
> (diff -cB)

You should also modify cluster.rng and add 'device' as an optional
attribute to the 'ip' element (around line 1010) or else the config won't
validate

why not use OSCF_RESKEY_device inside ipv4/6 directly, instead of passing
it to ip_op?
  ip_op <family> <operation> <address> <device> [quiet]
... if device is empty, but there is quiet present it will be accepted as
device

> 
> *** ip.sh.original    2010-06-17 10:43:00.000000000 -0500
> --- ip.sh    2010-06-17 14:42:26.000000000 -0500
> ***************
> *** 86,91 ****
> --- 86,104 ----
>               <content type="string"/>
>           </parameter>
> 
> +         <parameter name="device">
> +             <longdesc lang="en">
> +                 Specify network device to bring this
> +                 IP up on. Optional. Example: "eth0"
> +             </longdesc>
> +
> +             <shortdesc lang="en">
> +                 Network device
> +             </shortdesc>
> +
> +             <content type="string" default="auto"/>
> +         </parameter>
> +
>           <parameter name="monitor_link">
>               <longdesc lang="en">
>                   Enabling this causes the status check to fail if
> ***************
> *** 571,576 ****
> --- 583,589 ----
>       declare addr_exp=$(ipv6_expand $addr)
> 
>       while read dev ifaddr_exp maskbits; do
> +             if ([ -z $3 ] || [ "$3" = "auto" ]) || [ "$dev" = "$3" ];
> then
>               if [ -z "$dev" ]; then
>                   continue
>           fi
> ***************
> *** 636,641 ****
> --- 649,655 ----
>           fi
> 
>           return 0
> +             fi
>       done < <(ipv6_list_interfaces)
> 
>       return 1
> ***************
> *** 651,656 ****
> --- 664,670 ----
>       declare addr=$2
> 
>       while read dev ifaddr maskbits; do
> +             if ([ -z $3 ] || [ "$3" = "auto" ]) || [ "$dev" = "$3" ];
> then
>               if [ -z "$dev" ]; then
>                   continue
>           fi
> ***************
> *** 715,720 ****
> --- 729,735 ----
>           fi
> 
>           return 0
> +             fi
>       done  < <(ipv4_list_interfaces)
> 
>       return 1
> ***************
> *** 813,819 ****
> 
>   #
>   # Usage:
> ! # ip_op <family> <operation> <address> [quiet]
>   #
>   ip_op()
>   {
> --- 827,833 ----
> 
>   #
>   # Usage:
> ! # ip_op <family> <operation> <address> <device> [quiet]
>   #
>   ip_op()
>   {
> ***************
> *** 866,872 ****
> 
>       case $1 in
>       inet)
> !         ipv4 $2 $3
>           return $?
>           ;;
>       inet6)
> --- 880,886 ----
> 
>       case $1 in
>       inet)
> !         ipv4 $2 $3 $4
>           return $?
>           ;;
>       inet6)
> ***************
> *** 923,929 ****
>           ocf_log debug "${OCF_RESKEY_address} already configured"
>           exit 0
>       fi
> !     ip_op ${OCF_RESKEY_family} add ${OCF_RESKEY_address}
>       if [ $? -ne 0 ]; then
>           exit $OCF_ERR_GENERIC
>       fi
> --- 937,943 ----
>           ocf_log debug "${OCF_RESKEY_address} already configured"
>           exit 0
>       fi
> !     ip_op ${OCF_RESKEY_family} add ${OCF_RESKEY_address}
> ${OCF_RESKEY_device}
>       if [ $? -ne 0 ]; then
>           exit $OCF_ERR_GENERIC
>       fi
> 
> 
> On Thu, Jun 17, 2010 at 9:00 AM, Dustin Henry Offutt
> <dhoffutt gmail com>wrote:
> 
>> Using the node's IPs would not work. The software being made HA must
keep
>> its IPs the same no matter what node its running on. Could script an IP
>> change, but then we're putting IP logic and monitoring in two places:
The
>> cluster software and in our custom scripting. That's not a clean
solution
>> and is rather going backwards.
>>
>> We may as well just do our own HA if we were starting down that road.
>> When
>> we sell our product the customer must also purchase Redhat Support for
>> their
>> OS and cluster software. I would think Redhat should pony up to get
this
>> done as the product we are selling is selling well and inducing Redhat
>> Support sales.
>>
>> An official feature request has been submitted to Redhat.
>>
>> Also, I'm working on the /usr/share/cluster/ip.sh script myself to add
>> the
>> feature. Hopefully it works out.
>>
>>
>>
>> On Thu, Jun 17, 2010 at 2:09 AM, Kit Gerrits <kitgerrits gmail com>
>> wrote:
>>
>>>  In that case, might it be easier to simply use the host IP adresses
and
>>> not the cluster IP's?
>>> (the application will need to handle up/down events itself)
>>>
>>>
>>> Regards,
>>>
>>> Kit
>>>
>>>  ------------------------------
>>> *From:* linux-cluster-bounces redhat com [mailto:
>>> linux-cluster-bounces redhat com] *On Behalf Of *Dustin Henry Offutt
>>> *Sent:* dinsdag 15 juni 2010 14:40
>>> *To:* linux clustering
>>> *Subject:* Re: [Linux-cluster] Higher Grained Definition ofIP
>>> AddressAssignments
>>>
>>> I've spent the past year architecting an HA cluster with RHCS and it's
>>> working wonderfully. I have not seen anything superior.
>>>
>>> Due to a new customer-driven feature of our software, we need to add
the
>>> ability for a cluster service/resource group to have up to eight
>>> distinct
>>> IPs on one particular network due to the software being made highly
>>> available via RHCS performing its own load balancing. Placing the load
>>> balancing elsewhere is not an option due to the nature of the product.
>>>
>>> Regarding "OCF_RESKEY_," will google more on this and appreciate the
>>> tip.
>>> Must work this out some way.
>>>
>>> ~ Dusty
>>>
>>> C. Handel wrote:
>>>
>>> [define interface of cluster controlled ip resource]
>>>
>>>
>>>
>>> /usr/share/cluster/ip.sh appears to perform the link-monitoring in the
>>>
>>>
>>> This is a resource agent script. What attributes a resource agent
>>> accepts can be found by calling it with the option meta-data
>>>
>>> /usr/share/cluster/ip.sh meta-data
>>>
>>> There is no attribute interface. The agent will add the additional
>>> address to the first interface that is in the same subnet.
>>>
>>> You could edit the script and add a parameter interface yourself. Add
>>> a new parameter into the XML at the beginning and access it in the
>>> script with OCF_RESKEY_...
>>>
>>> I don't understand what you are trying to do. If you are only handling
>>> network interfaces as services, then rhcs is most likely the wrong
>>> tool. If you would explain your goal we could probably suggest other
>>> solutions.
>>>
>>> Greetings
>>>    Christoph
>>>
>>> --
>>> Linux-cluster mailing
>>>
listLinux-cluster redhat comhttps://www.redhat.com/mailman/listinfo/linux-cluster
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - www.avg.com
>>> Version: 9.0.829 / Virus Database: 271.1.1/2939 - Release Date:
06/15/10
>>> 08:35:00
>>>
>>>
>>> --
>>> Linux-cluster mailing list
>>> Linux-cluster redhat com
>>> https://www.redhat.com/mailman/listinfo/linux-cluster
>>>
>>
>>


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