From: Mike Wray <mike.wray@hpl.hp.com>
To: Matt Ayres <matta@tektonic.net>
Cc: xen-devel@lists.sourceforge.net
Subject: Re: vif-bridge is driving me nuts
Date: Thu, 06 Jan 2005 14:51:27 +0000 [thread overview]
Message-ID: <41DD506F.5040404@hpl.hp.com> (raw)
In-Reply-To: <1104948127.13440.57.camel@wopr.tektonic.net>
Matt Ayres wrote:
> On Wed, 2005-01-05 at 00:08 -0500, Matt Ayres wrote:
>
>>In response to my own post, I noticed the parameters for 'vif' in the
>>config file match up to those for vif-bridge... except for the 'ip'
>>parameter. Would something like this in the domain configuration file
>>make sense?
>>
>>vif = [ 'ip="192.168.1.80/32"' ]
>>
>>or to better follow the example, even this:
>>
>>vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0, ip="192.168.1.80/32"' ]
>>
>>Of course, no scripts see ip as a valid argument so it doesn't work
>>now... it returns something like "Error: Invalid vif specifier:
>>ip=192.168.1.80/32". Interestingly enough i've tried modifying
>>create.py (in the build tree so it builds create.pyc) to include 'ip' as
>>valid, same error. Then I completely commented the 2 lines of code that
>>check and return the error and it STILL does it so i'm obviously missing
>>something, I guess I just need either a pointer from someone or to bury
>>myself in the code for a little bit more.
>>
The code in xm/create.py to do with ip addrs for vifs dates from the old
vfr stuff and appears to have bit-rotted. FWIW, there is an 'ipaddr'
parameter that sets IP address(es) for vifs, but it is not currently
used. The vif handling in xm/create will error on trying to use
an unsupported vif parameter. The supported ones are mac, bridge, script,
backend (see 'xm help create').
Xend supports the 'ip' field in a vif spec, but this is not currently
passed-in by xm/create.
I'm about to take a look at the handling of device specs, so I could
take a look at this. It seems to make most sense to add an 'ip' parameter
to the vif spec in xm/create the way you tried to use it above.
> In yet another response to my own post, it looks like it's looking to
> pass the variable 'ipaddr' to the vif-script (aka. vif-bridge) script as
> the last argument. Does this sound correct? Of course it doesn't work,
> but the code looks like this should be what should happen. From
> Vifctl.py:
>
> def vifctl(op, vif=None, script=None, domain=None, mac=None,
> bridge=None, ipaddr=[]):
> """Call a vif control script.
> Xend calls this when bringing vifs up or down.
>
> @param op: vif operation (up, down)
> @param vif: vif name
> @param script: name of control script
> @param domain: name of domain the vif is on
> @param mac: vif MAC address
> @param bridge: bridge to add the vif to
> @param ipaddr: list of ipaddrs the vif may use
>
> ...
>
> if ipaddr:
> ips = ' '.join(ipaddr)
> args.append("ip='%s'" % ips)
>
>
> vifctl is called from server/netif.py and it also retrieves the ipaddr
> information from there.
>
> Unfortunately, it doesn't work... even though ipaddr is defined in the
> domain config file it's still not passing the argument to vif-bridge.
>
> I have to admit I know absolutely no Python and very little OO design so
> perhaps i'm missing something... it looks like it should just work
> though. Can whoever wrote this part of Xen perhaps provide some
> insight?
>
>
> Here is an example configuration file I am trying to use:
> # -*- mode: python; -*-
> kernel = "/xen/servers/vs1/kernel"
> memory = 64
> name = "vs1"
> disk = [ 'file:/xen/servers/vs1/rootfs,sda1,w',
> 'file:/xen/servers/vs1/swapfs,sda2,w' ]
> netmask="255.255.255.0"
> gateway="192.168.1.1"
> hostname="www.vs1.net"
> ipaddr="192.168.1.80"
> ip="192.168.1.80"
> console=500
> root = "/dev/sda1 ro"
> extra = "4"
> restart = 'onreboot'
>
> antispoof is set to yes in xend-config.sxp.
>
> I'll post more if I get this working before I hear back from someone
> else, but at the moment I think i've exhausted my resources.
>
Mike
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
next prev parent reply other threads:[~2005-01-06 14:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-05 3:52 vif-bridge is driving me nuts Matt Ayres
2005-01-05 5:08 ` Matt Ayres
2005-01-05 18:02 ` Matt Ayres
2005-01-06 14:51 ` Mike Wray [this message]
2005-01-06 18:25 ` Matt Ayres
2005-01-05 11:43 ` Mike Wray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41DD506F.5040404@hpl.hp.com \
--to=mike.wray@hpl.hp.com \
--cc=matta@tektonic.net \
--cc=xen-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.