[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] vif-bridge is driving me nuts



On Thu, 2005-01-06 at 14:51 +0000, Mike Wray wrote:
> 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.

Well, I did try modifying create.py to accept an ip/ipaddr field (as
stated)... it didn't seem to take it too well.  I know very little
bash/python so what I could do is limited, but I did end up being able
to fix this for myself.  I wrote a small perl script that returns the
IP's assigned to a domain (via ipaddr config variable).  In vif-bridge I
then just added "ip=`/path/to/script ${domain}`" and that fills in the
ip variable and everything works fine.  Once the IP's are actually
passed to vif-bridge it will work great.

One thing I noticed... the iptables code prevents outside machines from
accessing the IP assigned to the domain if it's not explicitly allowed,
but the host itself and other domains on the same host see the IP as
going to to the invalid domain.  I don't know if this is an
iptables/kernel limit or if it can be fixed... still working on that
part and if I find rules that work better I will pass them along.



-------------------------------------------------------
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.