OpenVZ Forum


Home » General » Support » Changed gentoo-add_ip.sh to work with baselayout-vserver-1.11.14-r3
Re: Changed gentoo-add_ip.sh to work with baselayout-vserver-1.11.14-r3 [message #1985 is a reply to message #1984] Sat, 11 March 2006 10:27 Go to previous messageGo to previous message
Jason Stubbs is currently offline  Jason Stubbs
Messages: 18
Registered: March 2006
Location: Japan
Junior Member
UPDATE: It seems the patch didn't get lost. It's been sitting in subversion and awaiting a release. I've asked that baselayout-vserver get a bump with the patch included until baselayout itself is ready for another release. The bug can be tracked at http://bugs.gentoo.org/show_bug.cgi?id=125786


The following snippet is from the baselayout's iproute2 module:

iproute2_post_start() {
        local iface=${1} ifvar=$( interface_variable ${1} ) routes e r

        # Make sure interface is marked UP
        iproute2_up ${iface}

        eval routes=( \"\$\{routes_${ifvar}\[@\]\}\" )

        # Test for old style ipaddr variable
        if [[ -z ${routes} ]]; then
                eval routes=( \"\$\{iproute_${ifvar}\[@\]\}\" )
        fi

        [[ -z ${routes} ]] && return 0

        # Set routes with ip route -- this might also include default route
        einfo "Adding routes"
        eindent
        for x in "${routes[@]}"; do
                # Support net-tools routing too
                x=${x//gw/via}
                x=${x//-A inet6}

                einfo "${x}"
                e=$( ip route append dev ${iface} ${x} 2>&1 )
                case "${e}" in
                        'RTNETLINK answers: File exists'|'')
                                eend 0
                                ;;
                        *) printf '%s\n' "${e}" >&2
                                eend 1
                                ;;
                esac
        done
        eoutdent

        return 0
}


The routes variables takes on the value of whatever routes_venet0 is so with a value of ( "default via 191.255.255.1 dev venet0" ) the command would end up being `ip route append dev venet0 default via 191.255.255.1 dev venet0`. The same thing will happen with either the iproute2 module or ifconfig module with the newer baselayout version.

In my opinion, I would say it the best course of action would be to leave vzctl as it is for the moment. I opened a bug with Gentoo today (as I should have done in the first place) as my 'verbal' report seems to have got lost. It shouldn't take too long for a newer version to come out. Either hollow or uberlord on irc.freenode.net could give you a better idea on the timeline.

[Updated on: Sat, 11 March 2006 12:31]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multicast support
Next Topic: 64Bit CPU Required for high RAM OpenVZ Servers?
Goto Forum:
  


Current Time: Sat Jul 13 02:33:29 GMT 2024

Total time taken to generate the page: 0.02352 seconds