Commit b97e30a2 authored by Mike Hibler's avatar Mike Hibler

Synch up with 10.2 clientside.

parent e5dac7ec
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -22,7 +22,7 @@
#
#
# XXX ONLY RUN THIS INSTALL ON A FREEBSD 6 TESTBED NODE!
# XXX ONLY RUN THIS INSTALL ON A FREEBSD 11.x TESTBED NODE!
#
# Trivial. These things just need to be installed into the right place
# on a testbed node before cutting an image.
......@@ -50,7 +50,8 @@ JAILDIR = $(SYSETCDIR)/jail
ETCDIR = $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR = $(DESTDIR)$(CLIENT_BINDIR)
VARDIR = $(DESTDIR)$(CLIENT_VARDIR)
RCDIR = $(DESTDIR)/usr/local/etc/rc.d
LETCDIR = $(DESTDIR)/usr/local/etc
RCDIR = $(LETCDIR)/rc.d
ISMFS = $(ETCDIR)/ismfs
INSTALL = /usr/bin/install -c
......@@ -72,11 +73,19 @@ subboss-install: bincheck basefbsd-subboss-install etc-install \
simple-install: script-install bin-install
#
# XXX make sure the isc-dhcpd port is installed,
# XXX as of June 2015, the FreeBSD port no longer maintains the
# /usr/bin/perl symlink which we rely on, so it may be wrong or missing.
#
bincheck:
@if [ ! -x /usr/local/sbin/dhclient ]; then \
echo "Need to install net/isc-dhcp3-client port"; \
false; \
fi
@if [ ! -x /usr/bin/perl ]; then \
ln -sf /usr/local/bin/perl5 /usr/bin/perl; \
fi
dir-install:
$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/boot
......@@ -85,6 +94,7 @@ dir-install:
$(INSTALL) -m 755 -o root -g wheel -d $(SYSETCDIR)/rc.conf.d
$(INSTALL) -m 755 -o root -g wheel -d $(ETCDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(BINDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(LETCDIR)/sudoers.d
$(INSTALL) -m 755 -o root -g wheel -d $(RCDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/db
......@@ -95,22 +105,24 @@ dir-install:
$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/lock
-rm -rf $(DESTDIR)/etc/testbed
ln -s emulab $(DESTDIR)/etc/testbed
-rm -rf $(DESTDIR)/usr/local/etc/testbed
ln -s emulab $(DESTDIR)/usr/local/etc/testbed
-rm -rf $(LETCDIR)/testbed
ln -s emulab $(LETCDIR)/testbed
basefbsd-install: dir-install
(cd ../freebsd5; $(MAKE) all install)
rm -rf $(SYSETCDIR)/rc.conf.d
rm -f $(DESTDIR)/usr/local/etc/dhclient*
ln -s /etc/dhclient-enter-hooks $(DESTDIR)/usr/local/etc/
ln -s /etc/dhclient-exit-hooks $(DESTDIR)/usr/local/etc/
rm -f $(LETCDIR)/dhclient*
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
$(INSTALL) -m 644 $(SRCDIR)/sudoers.emulab $(LETCDIR)/sudoers.d/emulab
basefbsd-subboss-install: dir-install
(cd ../freebsd5; $(MAKE) all subboss-install)
rm -rf $(SYSETCDIR)/rc.conf.d
rm -f $(DESTDIR)/usr/local/etc/dhclient*
ln -s /etc/dhclient-enter-hooks $(DESTDIR)/usr/local/etc/
ln -s /etc/dhclient-exit-hooks $(DESTDIR)/usr/local/etc/
rm -f $(LETCDIR)/dhclient*
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
$(INSTALL) -m 644 $(SRCDIR)/sudoers.emulab $(LETCDIR)/sudoers.d/emulab
tweak-syslog:
@if [ -f $(SYSETCDIR)/newsyslog.conf ]; then \
......@@ -149,9 +161,9 @@ script-install: dir-install
frisbee-mfs-install: destdircheck
(cd ../freebsd5; $(MAKE) all frisbee-mfs-install)
rm -f $(SYSETCDIR)/testbed/dhclient
rm -f $(DESTDIR)/usr/local/etc/dhclient*
ln -s /etc/dhclient-enter-hooks $(DESTDIR)/usr/local/etc/
ln -s /etc/dhclient-exit-hooks $(DESTDIR)/usr/local/etc/
rm -f $(LETCDIR)/dhclient*
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
@if [ -r $(SRCDIR)/master.passwd ]; then \
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(SYSETCDIR); \
pwd_mkdb -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
......@@ -163,9 +175,9 @@ frisbee-mfs-install: destdircheck
mfs-install:
(cd ../freebsd5; $(MAKE) all mfs-install)
rm -f $(SYSETCDIR)/testbed/dhclient
rm -f $(DESTDIR)/usr/local/etc/dhclient*
ln -s /etc/dhclient-enter-hooks $(DESTDIR)/usr/local/etc/
ln -s /etc/dhclient-exit-hooks $(DESTDIR)/usr/local/etc/
rm -f $(LETCDIR)/dhclient*
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
@if [ -r $(SRCDIR)/master.passwd ]; then \
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(SYSETCDIR); \
pwd_mkdb -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
......
#!/bin/sh
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -73,6 +73,13 @@ if [ -n "$interface" ]; then
echo $interface > $BOOTDIR/controlif
fi
# All new for 2015, handle larger MTU on control net!
if [ -n "$new_interface_mtu" ]; then
echo $new_interface_mtu > $BOOTDIR/controlmtu
else
echo 1500 > $BOOTDIR/controlmtu
fi
#
# For Xen-based vnodes we record the vnode name where the scripts expect it.
# XXX this works because only Xen-based vnodes DHCP.
......@@ -129,8 +136,12 @@ if [ -n "$new_routers" ]; then
gw=`route -n get -inet default | grep gateway`
gw=${gw##*: }
if [ -z "$gw" -o "$gw" != "$new_routers" ]; then
echo "reset default route from \"$gw\" to \"$new_routers\""
route delete default
if [ -n "$gw" ]; then
echo "reset default route from \"$gw\" to \"$new_routers\""
route delete default
else
echo "setting default route to \"$new_routers\""
fi
route add default $new_routers
fi >>$LOGDIR/dhclient-exit.log 2>&1
fi
......
# $FreeBSD: head/etc/group 256365 2013-10-12 06:06:53Z rpaulo $
# $FreeBSD: head/etc/group 294896 2016-01-27 06:28:56Z araujo $
#
wheel:*:0:root
daemon:*:1:
......@@ -17,6 +17,7 @@ sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:
video:*:44:
bind:*:53:
unbound:*:59:
proxy:*:62:
......@@ -28,6 +29,7 @@ dialer:*:68:
network:*:69:
audit:*:77:
www:*:80:
_ypldap:*:160:
hast:*:845:
nogroup:*:65533:
nobody:*:65534:
......
console="comconsole"
# No stupid menu
beastie_disable="YES"
......@@ -7,26 +5,58 @@ beastie_disable="YES"
#if_ath_load="YES"
#hw.bge.allow_asf=1
#
# If you are using an extra, regular (i.e., visible to the OS) Ethernet port
# for your management interface, then you should disable it so that FreeBSD
# won't mess with it. We have seen some implementations (e.g., Dell iDRAC on
# R320) where FreeBSD's messing with the port will completely lockup the
# interface such that no IPMI commands can be sent. This leaves you with no
# option but to hard power cycle the node.
#
#hint.bge.1.disabled="1"
# If you have lots of memory, set this to zero (9.0 and above)
# We do this at Utah for d820 nodes with 128GB.
hw.memtest.tests=0
# force use of newer LSI megaraid driver (for UWisc)
hw.mfi.mrsas_enable=1
#
# ixgbe driver will throttle back number of rx queues if not enough
# nmbclusters; i.e., less than min(cores,8) * ports_on_card * ring_bufs,
# which for the Utah d820s is 8 * 2 * 2048 == 32768. So we set nmbclusters
# to that value here (and set the other nmb* values as the kernel would
# based on that value). Note that it is not too much larger than the default
# the kernel would calculate 25600 (which is based on "maxusers").
# Some drivers, most notably the Intel 10Gb "ixgbe" driver and newer 1Gb
# drivers, are very liberal with their mbuf allocation for RX buffers.
# The ixgbe driver in particular wants to allocate up to 2048 buffers
# per interface per CPU core (up to 8). On the Utah d820 nodes that is
# 2048 * 4 * 8 == 65536 mbufs.
#
# These values will get re-adjusted in the Emulab startup scripts to a
# more appropriate value based on the size of RAM and total number of
# This can cause dhclient to fail when it fires up all interfaces at once
# and the kernel runs out of mbufs.
#
# At Utah we avoid this by not dhcp'ing on the "ix" interfaces (see
# /etc/rc.d/netif-emulab) because they are never the control net. But if
# you have a 10Gb control net, or some other interface that allocates
# excessive mbufs, you may need to try the following settings or something
# even larger. Note that the relationship between the four values is the
# same as what FreeBSD uses for the defaults; i.e., each value is half the
# preceding value.
#
# Someday, these values will get re-adjusted in the Emulab startup scripts
# to a more appropriate value based on the size of RAM and total number of
# interfaces.
#
kern.ipc.nmbclusters=32768
kern.ipc.nmbjumbop=16384
kern.ipc.nmbjumbo9=8192
kern.ipc.nmbjumbo16=4096
# As of January 2016, we now have new nodes that have a total of 6
# problematic interfaces each along with 16 cores, so we had to bump this
# even higher!
#
kern.ipc.nmbclusters=262144
kern.ipc.nmbjumbop=131072
kern.ipc.nmbjumbo16=65536
kern.ipc.nmbjumbo9=32768
# force module path, our pxeboot can mess it up
module_path="/boot/kernel;/boot/modules"
# The remaining lines were added by Emulab slicefix.
# DO NOT ADD ANYTHING AFTER THIS POINT AS IT WILL GET REMOVED.
# setting console to sio1
console="comconsole"
# $FreeBSD: head/etc/master.passwd 278616 2015-02-12 05:35:00Z cperciva $
# $FreeBSD: head/etc/master.passwd 294896 2016-01-27 06:28:56Z araujo $
#
root:$1$0DKicYf8$PsfF3uhmTrtuaJKH/rxtQ/:0:0::0:0:Charlie &:/root:/bin/csh
toor:$1$0DKicYf8$PsfF3uhmTrtuaJKH/rxtQ/:0:0::0:0:Chaplin &:/root:/bin/csh
......@@ -22,6 +22,7 @@ uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp
pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin
auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin
www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
_ypldap:*:160:160::0:0:YP Ldap unprivileged user:/var/empty:/usr/sbin/nologin
hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin
nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin
messagebus:*:556:556::0:0:D-BUS Daemon User:/nonexistent:/usr/sbin/nologin
......
#!/bin/sh
#
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -28,10 +29,10 @@
#
# PROVIDE: netif-emulab
# REQUIRE: atm1 ipfilter mountcritlocal serial sppp sysctl
# REQUIRE: adjkerntz hostname ipfs ipnat kldxref random
# REQUIRE: atm1 FILESYSTEMS iovctl serial sppp sysctl
# REQUIRE: ipfilter ipfs
# BEFORE: netif
# KEYWORD: nojail
# KEYWORD: nojailvnet
. /etc/rc.subr
. /etc/network.subr
......@@ -218,6 +219,13 @@ cnet_start()
WA_BOOTMETHOD="dhcp"
fi
#
# Let's always bring up lo0 first.
# Needed for the static configuration case (else clause).
# Also needed for newer dhclients which need some interface to bind to.
#
ifconfig lo0 inet 127.0.0.1 up
if [ "$WA_BOOTMETHOD" = "dhcp" ]; then
#
# use good ol' Emulab dhcp!
......@@ -254,10 +262,6 @@ cnet_start()
ifconfig "$cnetif" inet "$WA_IP_ADDR" netmask "$WA_IP_NETMASK" up
route add default "$WA_IP_GATEWAY"
# bring up lo0 too, since we neuter netif
ifconfig lo0 inet 127.0.0.1 up
route add 127.0.0.1 -interface lo0
# setup resolv.conf
echo "search $WA_DOMAIN" > /etc/resolv.conf
echo "nameserver $WA_IP_DNS1" >> /etc/resolv.conf
......
......@@ -46,16 +46,7 @@ background_fsck="NO"
network_interfaces="lo0"
#
# Argh! dhclient in FreeBSD 5 has a new auto-background "feature",
# it dives into the background after 10 seconds regardless of whether
# it has received a response. This is fubar for us. Unfortunately,
# we cannot just crank this number through the roof because it is based
# on a polling interval which actually has a rational purpose. The timeout
# is actually (2 * polling_interval) where polling_interval is how often
# dhclient rechecks an interface without link. We need to keep this value
# reasonable in the event that we boot up and don't immediately have link
# on the control net. So lets try 15 seconds (30 second auto-background
# timeout) and see how things go.
# Use the ISC dhclient which support invocation with multiple interfaces.
#
dhclient_program="/usr/local/sbin/dhclient"
dhclient_flags="-i 15"
dhclient_flags="-d"
# Put this file in /usr/local/etc/sudoers.d
Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR TMPDIR PACKAGEROOT PACKAGESITE PKGDIR FTP_PASSIVE_MODE"
Defaults env_keep += "PORTSDIR PORTS_INDEX PORTS_DBDIR PACKAGES PKGTOOLS_CONF"
Defaults env_keep += "EDITOR VISUAL"
%wheel ALL=(ALL) NOPASSWD: ALL
# $FreeBSD: head/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $
# $FreeBSD: head/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $
#
# This file is read when going to multi-user and its contents piped thru
# ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details.
......
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