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

[Xen-devel] [OSSTEST PATCH] ts-host-install: Do not force MAC address of Xen vifs



For some broken hosts we explicitly force the mac address in
software.  (This is controlled by the ForceMacAddress host property.)

We achieve this by writing a udev rule (which ends up both in the
installer and in the initramfs) which calls `ip link set ... address'.

However: in some cases we share the initramfs with guests.  In
particular, the `xen-tools' package likes to use the host initramfs.

In stretch at least, this rule, empirically, applies in the guest too.
The result is that with ForceMacAddress, the guest ends up with the
same mac address as the host, breaking everything.

Fix this by explicitly excluding Xen network interfaces.  These all
get a proper mac address from xenstore (ultimately, from osstest
itself via the guest config, or in other configurations from libxl).

I don't know why this apparently worked on jessie.  Startup order
changes are a possibility.

CC: Julien Grall <julien.grall@xxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 ts-host-install | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ts-host-install b/ts-host-install
index ea087a25..4213c3a2 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -212,7 +212,7 @@ sub setup_netboot_firstboot($) {
         file_simple_write_contents
             ($persistent_net_rules,
              $ho->{Flags}{'force-mac-address'} ? <<END : <<END);
-SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="$wantphysif", RUN += 
"$ipcmd link set $wantphysif address $ho->{Ether}"
+SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", SUBSYSTEMS!="xen", 
KERNEL=="$wantphysif", RUN += "$ipcmd link set $wantphysif address $ho->{Ether}"
 END
 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="$ho->{Ether}", 
ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="$wantphysif"
 END
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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