Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 404503

Summary: sys-cluster/vzctl - add_ip.sh should add IPv6 default route
Product: Gentoo Linux Reporter: Dennis Schridde <dschridde+gentoobugs>
Component: [OLD] Core systemAssignee: Gentoo VPS Team (OBSOLETE) <vserver-devs+disabled>
Status: RESOLVED OBSOLETE    
Severity: normal CC: alexander, andreis.vinogradovs, proxy-maint, pva, vserver-devs+disabled
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 442594    
Bug Blocks:    

Description Dennis Schridde 2012-02-19 11:20:06 UTC
Currently /etc/vz/dists/scripts/gentoo-add_ip.sh only adds an IPv4 default route to ${CT}/etc/conf.d/net:
        put_param ${IFCFG} "routes_${VENET_DEV}" "default"
It should however also add an IPv6 default route.

net.example as of sys-apps/openrc-0.9.8.4 describes this as adding a 2nd line with ::/0 to routes_$IFACE. This, however, is currently impossible with put_param, since it uses the sed s command:
  /bin/sed: -e expression #1, char 42: unterminated `s' command
  ERROR: Can't change file /etc/conf.d/net
Other workarounds, like separating the entries with ; are not parsed by OpenRC and are just passed directly to iproute2, which does not understand them either.

Severity is "normal" (imo), because there currently is no IPv6 connectivity in the containers.

Reproducible: Always
Comment 1 Dennis Schridde 2012-02-19 11:22:26 UTC
P.S: iproute2 also offers no way to add two routes with one command. So the only way appears to be to make put_param able to insert multiple lines into the file.
Comment 2 Alexander Tsoy 2012-11-30 20:48:01 UTC
I've added bug 442594 as a blocker because iproute2 package is not in @system. Network config created by the gentoo-add_ip.sh script should work even if iproute2 is not installed.
Comment 3 Andreis Vinogradovs ( slepnoga ) 2013-06-08 10:23:13 UTC
IMHO, this is obsolete .
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2013-06-10 16:14:17 UTC
As far as I see sed now uses | instead of : in put_param, so ipv6 should work. Dennis, please, test and report if it still fails for you.

/bin/sed -e "s|^\<$name\>.*|$name $value|"