Commit Graph
21 Commits
Author SHA1 Message Date
Keir Fraser d1abeffc81 Fix network-bridge ifup problem when bridge has no IP address.
When we want to setup a bridge without a ip address, function
do_ifup will not activate the bridge.

We should make the bridge active, then vif-bridge can work on the
bridge.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2009-06-23 11:22:08 +01:00
Keir Fraser 548f4b1ecd xendomains script: Small fix
From: Fabian Zimmermann <xen-users@z-technologies.de>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-06-18 10:26:28 +01:00
Keir Fraser f09d7f0b59 Serialize iptables calls in hotplug scripts
iptables cannot correctly handle situations when more than one command
is trying to set netfilter rules. In such situations, iptables may fail
with EAGAIN, which results in iptables: Unknown error
18446744073709551615.

Such situation can easily happen when multiple network devices are
configured for a domain as vif hotplug scripts are called in parallel
for all of the network devices.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2009-05-28 11:07:19 +01:00
Keir Fraser b3bde375d3 udev-script: udev rule for pci_iomul device.
This patch adds udev rule for pci_iomul device to
create /dev/xen/pci_iomul.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-05-28 10:00:55 +01:00
Keir Fraser 1d89b44561 stubdom: 'file' based disk sharing
Allow 'file' based disks, that are blkback based disks, to be shared
between the guest domain and the stubdom. It does so exploiting the
same exception introduced in the previous patch "stubdoms phy disks
sharing". Now we can remove the hack in stubdom-dm that forces "file"
disks to be opened using blktap instead of blkback.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-05-26 09:50:35 +01:00
Keir Fraser 94c3a1b680 tools: clean up handling of xen config and scripts directories.
For now hardcode /etc w/o a prefix as there are hardcoded
config paths in the code which would break otherwise.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-05-19 01:48:18 +01:00
Keir Fraser afc456654c stubdom: fix issue with phy disks
Add an exception for stubdoms in the same_vm hotplug script function.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-05-19 01:18:35 +01:00
Keir Fraser 744ba6479a network-bridge: Fix for bonding
If ${netdev} is bonding, brctl addif ${bridge} ${pdev} fails:
  can't add ${pdev} to bridge ${bridge}: Invalid argument
Because ${pdev} has no slaves at this point.=20
# Notice that ifdown ${netdev} clears slaves of ${netdev}.

This patch restores slaves before add_to_bridge2 ${bridge} ${pdev}.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-04-22 11:26:37 +01:00
Keir Fraser 891410cbc4 tools: dom0 iptables rule ordering change
This patch makes two small changes to dom0 iptables rules that permit
(and revoke) domU network access.

First:
Currently, a rule intended to allow domU network access is appended to
the end of the FORWARD chain, where it can be preempted by other =20
rules.  This patch causes the rule to be inserted at the top, where
it's more likely to have the intended effect.

Second:
In some cases (e.g. Fedora 9's default iptables configuration), the
first rule alone is insufficient to permit two-way packet flow.  This
patch adds a second rule to the FORWARD chain that permits replies to
domU network requests to reach the domU vif.

Signed-off-by: Chris Bookholt <hap10@tycho.ncsc.mil>
2009-04-14 11:20:02 +01:00
Keir Fraser 5c49f4e2b2 network-nat: add domain info for nat-dhcpd
Signed-off-by: Wei Kong <weikong.cn@gmail.com>
2009-04-08 13:18:22 +01:00
Keir Fraser 0c29f97df0 network-bridge: Fix do_ifup in the case of ${bridge} != ${netdev}
On RHEL5.2, ifup ${bridge} fails if ${bridge} != ${netdev},
because RHEL5.2's ifup ${bridge} runs the following sequence:

1. Search CONFIG that has the same mac address of ${bridge}.=20
   ifcfg-${netdev} is found.
2. Run "ip link set dev ${netdev} up".
   # ${bridge} is expected.
3. Output "Failed to bring up ${netdev}."
   Because ${netdev} does not exist.

Thus, do_ifup() should not use ifup if ${bridge} != ${netdev}.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-04-02 11:48:10 +01:00
Keir Fraser d81fe9d33a xend: Accept udev events about SCSI and update physical SCSI information
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-31 11:28:49 +01:00
Keir Fraser 4d4d14e8e8 Add udev rules to deliver hw events to xend
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:38:06 +00:00
Keir Fraser cde518aa71 blktap: Move error signaling to blktapctrl
Until now the udev script for blktap devices needs to decide if to
signal success or failure to xend. As this script runs completely
independent of blktapctrl and tapdisk/ioemu which do the real work,
the udev script can't even theoretically know if tapdisk is happy.

This patch removes the udev script and replaces its checks by new
ones in libblktap.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2009-03-12 18:48:09 +00:00
Keir Fraser 0aef8a0311 xend: Fix removing /vm/UUID/device paths when device cannot be disconnected
This is a corrected version of a patch commited as c/s 19250 and
reverted by c/s 19314. Thanks to "trap sigerr ERR" in
xen-hotplug-common.sh the xen-hotplug-cleanup would exit when reading
/local/domain/ID/vm fails thus skipping all the xenstore-rm lines in
the rest of the script.

Change deviceDestroy behavior to remove /vm/UUID/device/...
path only when force was used (as it already does so for both frontend
and backend) and do the removing from xen-hotplug-cleanup script when
we are sure the device is really not attached to the guest any more.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2009-03-12 15:08:08 +00:00
Keir Fraser ff54f62e43 Revert c/s 19250, as it seems to be causing problems.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-12 08:32:30 +00:00
Keir Fraser b6f1cfa1c3 init script: Enable to run xend stop when dom0 shutdown
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
2009-03-05 15:06:06 +00:00
Keir Fraser 8e3feb5145 xend: Fix removing /vm/UUID/device paths when device cannot be disconnected
Change deviceDestroy behavior to remove /vm/UUID/device/...
path only when force was used (as it already does so for both frontend
and backend) and do the removing from xen-hotplug-cleanup script when we
are sure the device is really not attached to the guest any more.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2009-03-02 10:34:37 +00:00
Keir Fraser f3c727b324 Fix typos in xendomains script.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-02-17 11:04:08 +00:00
Keir Fraser 9acc94349e xendomains: clean up output formatting
Show errors in the way they are coming from xm command only (no usage
is printed now). Watchdog_wm() has been changed for not showing dots
in the process of shutting down domains and if an error occurs it
prints target domain, operation (save/restore/migrate etc.) and reason
of failure in more user-friendly way.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-02-13 09:32:02 +00:00
Keir Fraser 57bcfa11b1 tools/hotplug: Separate OS-specific scripts.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-11-04 12:13:42 +00:00