[Planetlab-devel] gec8 demo help: Auto-adding a second
interface to a slice upon
Daniel Hokka Zakrisson
dhokka at cs.princeton.edu
Sun Jul 18 23:19:02 EDT 2010
----- Rob Sherwood <rob.sherwood at stanford.edu> wrote:
> Just to sanity check, I've attached the script and the patch that I'm
> using. It seems to work for me, but if someone could take 10 seconds
> to look at it, it could potentially save me hours of debugging
> confusion :-)
>
> Thanks again,
>
>
> - Rob
> .
>
>
>
> On Sun, Jul 18, 2010 at 12:50 PM, "S.Çağlar Onur"
> <caglar at cs.princeton.edu> wrote:
> > Hi Rob,
> >
> > On Jul 18, 2010, at 3:30 PM, Rob Sherwood wrote:
> >
> >> Hello,
> >>
> >> So, we're using PL nodes with two interfaces ( a control interface and
> >> an interface on an openflow network). We dredged out of your mailing
> >> list this series of magic commands to expose the second interface to a
> >> slice:
> >>
> >> [as root on the node, run:]
> >> # ifconfig eth1 $ip netmask 255.255.255.0 up
> >> # mkdir /etc/vservers/<slice name>/interfaces/2
> >> # echo $ip > /etc/vservers/<slice name>/interfaces/2/ip
> >> # touch /etc/vservers/<slice name>/interfaces/2/nodev
> >> # vserver <slice name> restart
> >>
> >> Now, the trick is that I would like to do this at slice creation, so
> >> that it happens automatically for all slices. I'm hoping that someone
> >> can point me to the right "slice creation script" where I can just
> >> tack these commands on to it (or even provide a patch if you're
> >> feeling particular generous, a patch).
> >
> > /usr/sbin/vuseradd is the correct one. It's a bash script so you can easily add required post-install steps or modify slice creation parameters to add other interfaces [1].
Hmm. If this works, I'd say we have a bug in util-vserver-pl.
The supported way to do this is to add the interface on PLC,
and then set the ip_addresses sliver attribute for the
slivers on each node. Not super-pretty by any means, but
easily scriptable on the PLC side.
Daniel
> >> Given this is for the gec8 demo (two days!), any help would be greatly
> >> appreciated.
> >>
> >> Thanks in advance,
> >>
> >> - Rob
> >> .
> >>
> >> _______________________________________________
> >> Devel mailing list
> >> Devel at lists.planet-lab.org
> >> https://lists.planet-lab.org/mailman/listinfo/devel
> >
> >
> > [1] http://git.planet-lab.org/?p=util-vserver-pl.git;a=blob;f=scripts/vuseradd;h=f77d58b3bb7f32f2f0165762493956c8367e17d4;hb=refs/heads/0.3#l80
> >
> > Best regards,
> > --
> > S.Çağlar Onur <caglar at cs.princeton.edu>
> >
> >
> > _______________________________________________
> > Devel mailing list
> > Devel at lists.planet-lab.org
> > https://lists.planet-lab.org/mailman/listinfo/devel
> >
More information about the Devel
mailing list