Commit 277ef66d authored by Mike Hibler's avatar Mike Hibler
Browse files

Try to keep udev from going nuts when we add those 1024 ifb devices in Xen.

Magical udev and upstart overrides.

Also, more tweaks for Xen 4.4.
parent 03dad4fa
......@@ -310,7 +310,23 @@ openvz-install: dir-install
# No destdir in this symlink!
-ln -sf $(CLIENT_BINDIR)/vzumount-elab.sh /etc/vz/conf/vps.umount
xen-install: dir-install
xen-udev-install:
@if [ -d "/etc/udev/rules.d" ]; then \
for f in $(SRCDIR)/xen/udev/*.rules; do \
echo $(INSTALL) -m 644 $$f /etc/udev/rules.d/; \
$(INSTALL) -m 644 $$f /etc/udev/rules.d/; \
done; \
fi
xen-upstart-install:
@if [ -d "/etc/init" ]; then \
for f in $(SRCDIR)/xen/init/*; do \
echo $(INSTALL) -m 644 $$f /etc/init/; \
$(INSTALL) -m 644 $$f /etc/init/; \
done; \
fi
xen-install: dir-install xen-udev-install xen-upstart-install
$(INSTALL) -m 755 $(SRCDIR)/../common/vnodesetup $(BINDIR)/
$(INSTALL) -m 755 $(SRCDIR)/../common/mkvnode.pl $(BINDIR)/
$(INSTALL) -m 755 $(SRCDIR)/../common/bootvnodes $(BINDIR)/
......
# hvc0 - getty on Xen virtual console
#
# This service maintains a getty on hvc0 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -L hvc0 115200 vt102
#
# Emulab Xen: do not try to configure ifb devices
#
start on net-device-added INTERFACE!=ifb*
start on ((startup or runlevel [06]) and started plymouth)
......@@ -20,7 +20,7 @@ mapping eth*
# via the mapping above. Here we just make sure that if shutdown, we
# remove the indicator file so that we will re-DHCP next time.
#
auto eth0 eth1 eth2 eth3 eth4 eth5 eth6 eth7 eth8 eth9
auto eth0
iface cnet inet manual
up echo "Emulab control net is $IFACE"
up /usr/local/etc/emulab/xenbridge-setup $IFACE
......
......@@ -4100,7 +4100,7 @@ sub ExtractKernelFromFreeBSDImage($$$)
mysystem2("nm $kernelfile | grep -q xen_guest");
if ($?) {
# XXX PVHVM kernel
mysystem2("nm $kernelfile | grep -q xen_features");
mysystem2("nm $kernelfile | grep -q xen_hvm_init");
}
goto skip
if ($?);
......@@ -4267,5 +4267,3 @@ sub CreateVnodeUnlock()
}
1;
# do not do this for ifb devices
ACTION=="add", SUBSYSTEM=="net", KERNEL!="ifb*", RUN+="bridge-network-interface"
# do not do this for ifb devices
ACTION=="add", SUBSYSTEM=="net", KERNEL!="ifb*", RUN+="vlan-network-interface"
......@@ -97,6 +97,22 @@ static_widearea_config()
export LANG=C
iface="$1"
cnetfile="/var/run/cnet"
cnetif=''
# We only need the lock if the file doesn't exist.
# XXX keep this lightweight as it can be called many times from
# ifquery in the udev path.
if [ -f $cnetfile ]; then
cnetif=`cat $cnetfile`
if [ "$cnetif" = $iface ]; then
echo cnet
else
echo $iface
fi
exit 0
fi
lockdir=/var/lock/findcnet
. /etc/emulab/paths.sh
......@@ -107,9 +123,6 @@ done
echo "`date`: $iface: starting" >>$LOGDIR/dhclient.log
cnetfile="/var/run/cnet"
cnetif=''
#
# We use /var/run to store the current idea of the cnet interface
# because we want it to go away on reboot.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment