Commit Graph
19 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com a9b9f0585c Merged. 2005-12-13 10:57:18 +00:00
emellor@leeni.uk.xensource.com 17d0f5bf16 Read the domid and vifid from the store, rather than horribly slicing up the
store path.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-12 17:13:38 +00:00
emellor@leeni.uk.xensource.com 56233085ef Remove unused netmask,network etc. These were used when we called ifconfig to
set up the networking, but now that we use ip directly, we don't need them, and
they were in any case broken when the ip address was specified without a suffix.

This work is by James Dykman <dykman@us.ibm.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-12 11:15:29 +00:00
emellor@leeni.uk.xensource.com 3732520993 Use new do_without_error function to squelch the error when closing down the
interface.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-09 10:51:20 +00:00
emellor@leeni.uk.xensource.com 60fdf33b73 Set hostname in DHCP config from the guest name, and if more than one interface
is specified, from guest-2, guest-3 etc.  Have the DHCP server send the
hostname to the guest.

Added a lock around DHCP config file frobbing, to avoid racing creation vs
deletion.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-03 12:21:27 +00:00
cl349@firebug.cl.cam.ac.uk cb6bdaa39f Fix vif-net script for setups where eth0 has no IP address.
Use the IP address associated with the backend network interface
for connections from dom0 to the guest connected to this network
interface.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-12-02 22:15:58 +01:00
emellor@leeni.uk.xensource.com 5941ac94f2 Added DHCP server support, configured by a dhcp=yes parameter. This will write
the appropriate entries into dom0's DHCP server configuration file, allowing
that server to provide info for the guest when it starts.

If an IP address is not configured for vif-nat, invent one using the domain
ID and vif ID.

Fix the vif-nat script.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-29 14:55:48 +00:00
emellor@leeni.uk.xensource.com dad18c78cb Change uses of \s within sed regexps -- some versions of sed do not support this
escape.

Allow the vif-nat and vif-route scripts to have netdev specified, rather than
hard-coding eth0.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-28 11:05:07 +00:00
emellor@leeni.uk.xensource.com 4494161ec1 Only write a success node when coming online, not going offline.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 17:09:49 +00:00
emellor@leeni.uk.xensource.com 8d43373af6 Have the vif scripts expect the offline event, not the remove event. With
the remove event, the script environment variable has disappeared, so we must
hook on the offline event instead.  This fix was put into xen-backend.rules,
but not the vif scripts, so they were out of sync, and the interfaces were not
being properly closed down.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-15 15:56:47 +01:00
emellor@leeni.uk.xensource.com c0efb8dc85 Rename the commands inside the hotplug scripts to match those used by hotplug
and udev.  Pass all commands through from xen-backend.agent or
xen-backend.rules rather than second-guessing the individual scripts.  This
should make it easier to tear down devices cleanly, especially the dangling
vifs we are seeing at the moment.

Cope with a missing type node inside the block script, as we don't want to
resurrect a removed node by writing a hotplug error message.

Log failure of iptables command.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-11 18:01:44 +01:00
emellor@leeni.uk.xensource.com aea7cae133 Fix function call syntax in vif-route and vif-nat.
Function calls in shell script should not contain parenthesis.

Signed-off-by: Murillo Fernandes Bernardes <mfb@br.ibm.com>
2005-11-11 17:04:17 +01:00
emellor@leeni.uk.xensource.com cb3d870a1a From Murillo Fernandes Bernardes <mfb@br.ibm.com>:
The problem is: There is no mechanism to detect block device setup failure

Network devices have the same problem, and are fixed with this too.

I handling this problem in the way suggested by aliguori:
- hotplug scripts write a "hotplug-status" node on store
- Xend DevController.createDevice() check verify this node and return success
or throw an exception on failure.
- If no changes in "hotplug-status" node after DEVICE_CREATE_TIMEOUT seconds
Xend throw an exception showing the problem with hotplug scripts.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-31 17:10:57 +01:00
emellor@leeni.uk.xensource.com e5edf96441 Break common network code in xen-network-common.sh, and common vif hotplugging
code into vif-common.sh.

Fix the antispoofing in network-bridge to allow forwarding from physical
device to bridge, and vif0.0 to eth0.

Change the interface between netback driver and vif hotplugging scripts.  The
mac address and bridge details are read from the store directly by the script,
so that the kernel driver does not need to get involved.

Remove an awful lot of cruft from vif-bridge.  Move the iptables handling into
vif-common.sh, and fix it so that the new vif can get past the antispoofing
entries.  Merge vif-nat and vif-route into this structure too.

Use ip instead of ifconfig to get necessary details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 12:06:17 +01:00
kaf24@firebug.cl.cam.ac.uk c27ad917f2 The NAT scripts currently work, but the changes below decrease user
error and allow the netmask to be passed in.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
2005-10-12 09:28:12 +01:00
kaf24@firebug.cl.cam.ac.uk 6f455ecab6 The hotplug agent sets the path now, but that's not as practical to do
with udev rules.  So instead, make sure that the path is set in the vif
scripts themselves.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 13:11:41 +01:00
cl349@firebug.cl.cam.ac.uk b93e7f7e8b bitkeeper revision 1.1426.1.1 (4289cc8cPUM98bLJs4TV93NHY9LOKg)
Many files:
  Make interface to network/block scripts consistent:
  - output on stdout is returned to the script caller
  - output on stderr is logged at the error level, messages with a '-' prefix
    are logged at the debug level and messages with a '*' prefix are logged
    at the info level.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-05-17 10:50:52 +00:00
kaf24@scramble.cl.cam.ac.uk 90dd5b6a18 bitkeeper revision 1.1159.223.77 (4207bd65yRdFmE9Py8fLUBk3826_Ig)
Minor tidy of vif-nat script.
Signed-off-by: keir.fraser@cl.cam.ac.uk
2005-02-07 19:11:33 +00:00
iap10@labyrinth.cl.cam.ac.uk 744d0bbffb bitkeeper revision 1.1159.223.53 (41fc0c19tGe1rM62SUQk8WYZjH-D1Q)
Add iptables modules to the default xen0 kernel, and add example configuration files for a NAT setup.
2005-01-29 22:20:09 +00:00