Re: [Vserver] raising individual interface devices

From: Chuck <chuck_at_sbbsnet.net>
Date: Sat 17 Feb 2007 - 19:10:35 GMT
Message-Id: <200702171410.36292.chuck@sbbsnet.net>

On Saturday 17 February 2007 13:39, Daniel Hokka Zakrisson wrote:
> Herbert Poetzl wrote:
> > On Sat, Feb 17, 2007 at 05:53:58PM +0100, Baltasar Cevc wrote:
> >>
> >> >Hi Chuck
> >> >
> >> >Quoting Chuck <chuck@sbbsnet.net>:
> >>>> is there a way to raise an individual interface device in a vserver
> >>>> without restarting the entire server?
> >>>>
> >>>> i am installing several vservers that will require various ip
> >>>> addresses for specific SSL certs added one at a time but should not
> >>>> down the entire service
> >>>> just to do so.. eg:
> >>>>
> >>>> eg:
> >>>>
> >>>> /etc/vservers/guestname/interfaces/0
> >>>> /etc/vservers/guestname/interfaces/1
> >>>>
> >>>> then i want to add
> >>>>
> >>>> /etc/vservers/guestname/interfaces/2
> >>>>
> >>>> and bring it alive without disturbing 0 or 1 or the operation of any
> >>>> services under them.
> >
> >>> Add the interface configuration, add the IP to the interface on the
> >>> host (ip addr add xxxx dev yyy, as far as and enter the vserver
> >>> (using vserver enter); the newly opened "session" in the context
> >>> knows the new IP, too. So you may restart your Webserver then and use
> >>> the new IP.
> >>
> >> Sorry, I've accidently hit send - here's the complete text I wanted
> >> to write ;-)
> >>
> >> Add the interface configuration, add the IP to the interface on the
> >> host (ip addr add xxxx dev yyy) - so the host knows the IP (which is
> >> normally done by vserver start). Then enter the vserver (using vserver
> >> enter); the newly opened "session" (your bash process or similar) in
> >> the context knows the new IP, too. So you may add it to your Webserver
> >> config and restart it (now having the newly assigned IP, too).
> >
> > well, while this may work with some configurations
> > (especially older tools :) this works by chance and
> > not by design, and it will for sure stop working with
> > non legacy enabled kenels, which make proper use of
> > network contexts ...
>
> Some configurations meaning util-vserver 0.30.209 and older, or using
> dynamic contexts.
>
> > the proper procedure is quite similar though:
> >
> > - add the ip to the host (ip addr add ...)
> > - add the ip to the guest's network context
> > # naddress --add --nid <nid> --ip <ip>/<mask>
> > - enter the guest (best via ssh)
> > - restart the services if required
> > (most services will automatically start using
> > the new addresses)
>
> Just to clarify: if your guest had just one IP address before, and you're
> not using 2.3, you'll have to restart all of your services for them to get
> the new IP.

thanks... the only service that would worry about binding to that new ip would
be apache which can be reloaded with minimal downtime. the rest of the
services are bound to the vserver primary ip.

>
> > - update the config to reflect the changes for
> > the next guest restart (if desired)
> >
> > HTC,
> > Herbert
> >
> >> Hope that helps,
> >> Baltasar
>
> --
> Daniel Hokka Zakrisson
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
>

-- 
Chuck
"...and the hordes of M$*ft users descended upon me in their anger,
and asked 'Why do you not get the viruses or the BlueScreensOfDeath
or insecure system troubles and slowness or pay through the nose 
for an OS as *we* do?!!', and I answered...'I use Linux'. "
The Book of John, chapter 1, page 1, and end of book
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Sat Feb 17 19:34:23 2007
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 17 Feb 2007 - 19:34:28 GMT by hypermail 2.1.8