Harald Hoyer [Fri, 19 Jun 2009 06:46:23 +0000 (08:46 +0200)]
moved test-init to TEST-10-RAID
Victor Lowther [Sat, 13 Jun 2009 18:21:19 +0000 (13:21 -0500)]
Make /dev/shm in the initramfs.
Pretty much everyone uses it, and things break of userspace
does not make it because of a case of mistaken identities.
/sbin/start_udev on FC11, I am looking at you.
Seewer Philippe [Thu, 18 Jun 2009 13:35:00 +0000 (15:35 +0200)]
removed exit on fail "sh -e" for dhclient-script
The Bug causing dhclient to recall BIND has been identified:
dhclient-script runs with #!/bin/sh -e, causing setup_interface
to fail if no hostname is provided by dhcp as it is the last statement
in that function.
Harald Hoyer [Thu, 18 Jun 2009 12:16:25 +0000 (14:16 +0200)]
remove redundant vol_id run from out udev rules
moved mdadm rules before luks rules
add nbd vol_id rules
Harald Hoyer [Thu, 18 Jun 2009 12:35:09 +0000 (14:35 +0200)]
add DEBUGFAIL to TEST-10-RAID
Harald Hoyer [Thu, 18 Jun 2009 12:29:59 +0000 (14:29 +0200)]
add iSCSI testsuite
Harald Hoyer [Thu, 18 Jun 2009 12:28:39 +0000 (14:28 +0200)]
use 128M for the test virtual machines instead of 512M
Harald Hoyer [Thu, 18 Jun 2009 12:27:55 +0000 (14:27 +0200)]
kill the server after the test_run
Harald Hoyer [Thu, 18 Jun 2009 12:17:12 +0000 (14:17 +0200)]
install "basename" for path_id
Harald Hoyer [Thu, 18 Jun 2009 11:57:14 +0000 (13:57 +0200)]
also resume from "swsuspend" partitions
Harald Hoyer [Thu, 18 Jun 2009 08:37:41 +0000 (10:37 +0200)]
Merge branch 'master' of ssh://dracut.git.sourceforge.net/gitroot/dracut
Seewer Philippe [Thu, 18 Jun 2009 08:36:32 +0000 (10:36 +0200)]
fix check for dhclient-script, if interface is already up
Harald Hoyer [Thu, 18 Jun 2009 08:03:51 +0000 (10:03 +0200)]
resume from any suspend partition
If not "noresume" is specified and no explicit "resume=" given, try to resume
from any partition with type "suspend"
Warren Togami [Wed, 17 Jun 2009 19:59:50 +0000 (15:59 -0400)]
rdblacklist is for kernel drivers, not dracut modules.
Harald Hoyer [Wed, 17 Jun 2009 18:55:59 +0000 (20:55 +0200)]
revert testsuite failures to handle old style dhcp root-path format
Harald Hoyer [Wed, 17 Jun 2009 18:25:23 +0000 (20:25 +0200)]
support old style root=dhcp root-path=server-ip:/path
Harald Hoyer [Wed, 17 Jun 2009 13:41:44 +0000 (15:41 +0200)]
add manpage
Harald Hoyer [Wed, 17 Jun 2009 13:38:43 +0000 (15:38 +0200)]
install man page
Harald Hoyer [Wed, 17 Jun 2009 09:54:41 +0000 (11:54 +0200)]
add more documentation
Harald Hoyer [Wed, 17 Jun 2009 13:30:42 +0000 (15:30 +0200)]
add PATH
Philippe Seewer [Wed, 17 Jun 2009 11:25:25 +0000 (13:25 +0200)]
dhclient.conf points to the wrong location. Caused by not paying
attention while rebasing.
Philippe Seewer [Tue, 16 Jun 2009 18:50:31 +0000 (20:50 +0200)]
multinic support: Add bootdev cmdline argument
This introduces a new cmdline argument bootdev, to support the case
where multiple nics need to be up before the netroot handler is called.
Cases involved might be bonding, iscsi multipathing, bonding, ...
This argument is required to decide which interface is the primary to
use for dhcp root-path, default gw, etc.
When multiple ip= items are present on the cmdline, the ip= parser
now enforces the presence of <dev> further demands that the new argument
bootdev contains the name of the primary interface. Configurtion if of
course still delegated to netroot but in is enhance to ensure that netroot
"waits" for all required interfaces to be up.
Example: root=dhcp ip=eth0:dhcp ip=client-ip:::netmask::eth1:off bootdev=eth0
First, the ip= cmdline parser ensures that all ip items contain a <dev> then
checks the ip items and checks as well that an ip= item for the given bootdev
was found.
When the first netroot starts, probably for eth1, it checks wheter interface
configuration for all interfaces is available. If not it exits. The second
start of netroot (eth0, which was a bit delayed because of dhcp) sees that
all interfaces are present, configures them and continues.
Philippe Seewer [Tue, 16 Jun 2009 18:21:41 +0000 (20:21 +0200)]
multnic support: move actual interface configuration to netroot
Instead of configuring devices when they are ready, ifup and
dhclient-script write script files which are then sourced by
netroot.
This solves the problem of having multiple interfaces and not knowing
which one to use for dhcp or default route. This way, netroot (which
is serialized anyway) configures the interface before calling the root
handler and deconfigures it if the handler failed.
Example: root=nfs:server:path and ip=dhcp with eth0 and eth1 receiving
a dhcp reply, but eth0 is the correct one to use.
Assuming eth1 is the first to receive the dhcp-reply, netroot starts
and configures eth1. nfsroot is run but fails, so eth1 is deconfigured. If
eth0 has received a dhcp-reply (or not, then we wait) the other locked
netroot process starts and tries with eth0 and succeeds.
Philippe Seewer [Tue, 16 Jun 2009 17:35:03 +0000 (19:35 +0200)]
netroot: Add pxelinux BOOTIF support
Having BOOTIF as an argument is a clear pointer which interface should be
used for netroot. This changes network rule generation accordingly.
Philippe Seewer [Tue, 16 Jun 2009 17:26:35 +0000 (19:26 +0200)]
netroot: Only start interface configuration if really needed
Currently network configuration is launched by udev as soon as it
discovers a driver. This isn't such a good idea since we don't know
if network configuration is actually required. Change this by writing
the udev rules on the fly if required.
Philippe Seewer [Tue, 16 Jun 2009 17:14:51 +0000 (19:14 +0200)]
netroot: Add ip= cmdline checker
As with other netroot boot arguments ip= lines should be parsed and
checked. Having this has the advantage that other cmdline scripts
can tell the ip= parser if dhcp or ip=:srv:... is needed, like
parse-root.sh (renamed dhcp-fallback) or parse-nfsroot do.
The nfs test-suite has one check which uses static ip lines, but
the autoconf param is wrong. Fixed this as well.
Philippe Seewer [Tue, 16 Jun 2009 16:25:16 +0000 (18:25 +0200)]
netroot: Introduce detailed cmdline parsers
This introduces detailed cmdline parsing, warning or aborting if the
cmdline does not contain arguments according to the spec.
Makeing sure the parsers don't just call getarg for netroot et al,
allows their reuse inside netroot to analyse dhcp root-path as well.
Hence we can get rid of the current netroot hooks. The hook itself stays
in order to add further modules which should run before netroot handlers
are called.
This has one drawback: nfsroot needs some more logic to handle nfs
specific data inside dhcp root-path.
The parsers have been writting according to current discussions about
cmdline arguments. This lead to the "discovery" that some test-cases
violate the spec. These tests have not been removed, but change to
"must fail".
Philippe Seewer [Tue, 16 Jun 2009 16:05:45 +0000 (18:05 +0200)]
Add warn() function to log warnings but not die()
Philippe Seewer [Tue, 16 Jun 2009 16:03:59 +0000 (18:03 +0200)]
Log error messages to /dev/kmsg
When die()'ing inside scripts that are udev run, a simple echo isn't
good, udev usually swallows that. Routing messages to /dev/kmsg
ensures they appear on screen and in addition are easily saved through
dmesg.
Philippe Seewer [Tue, 16 Jun 2009 12:39:35 +0000 (14:39 +0200)]
Add 'die()' for easier error handling
Printing out an errormessage and quitting is easier if there's a function
to call. If the script calling die has exit trapped, like in init, the
emergency_shell is automatically called.
Philippe Seewer [Tue, 16 Jun 2009 12:24:38 +0000 (14:24 +0200)]
netroot and others: Style changes
Multiline conditionals ( && { ... } ) should use if, function
declarations go to the top of the file, add/update comments and remove
some unnecessary clutter.
Philippe Seewer [Tue, 16 Jun 2009 10:14:02 +0000 (12:14 +0200)]
write-ifcfg: Save static ip configuration
Saveing ip= options in ifup makes the information available for
later use. This solves the problem how to write static ip configuration
in ifcfg files.
Philippe Seewer [Tue, 16 Jun 2009 10:08:19 +0000 (12:08 +0200)]
netroot: Always write an override file if an ip= line is present
Even if we use dhcp, ip= lines are allowed to contain the server-ip
for nfsroot, so we should store those variables for later use.
Philippe Seewer [Tue, 16 Jun 2009 09:58:16 +0000 (11:58 +0200)]
netroot: Move writing ifcfg config files to a pre-pivot script
This is mostly about style: Doing stuff after a successful mount
should go into pre-pivot.
In addition this corrects the case where the used netif is not eth0
Philippe Seewer [Tue, 16 Jun 2009 09:35:49 +0000 (11:35 +0200)]
netroot: Use same method to check for already mounted root as init
base/init uses [ -d "$NEWROOT/proc" ] to check if root is mounted
or not. Netroot should do the same. In addition this gets rid of
another file in /tmp, since /tmp/netroot.done isn't needed anymore.
Philippe Seewer [Tue, 16 Jun 2009 09:26:29 +0000 (11:26 +0200)]
netroot: Use root.info instead of netroot.info
Having two files which are used more or less at the same time isn't
that easy to handle and read. Instead, move the contents of netroot.info
to root.info and only use root.info. This is cleaner and makes debugging
easier.
Philippe Seewer [Tue, 16 Jun 2009 09:08:40 +0000 (11:08 +0200)]
netroot: Check argument
There's no sense in running netroot without a valid first argument
and further running netroot with no interface config present isn't
good as well.
Philippe Seewer [Tue, 16 Jun 2009 08:52:21 +0000 (10:52 +0200)]
netroot handlers: Add argument checking
This is probably not necessary, but paranoia dictates that the actual
netroot handlers should check if all three required arguments (netif,
root, NEWROOT) are there and useable.
Philippe Seewer [Tue, 16 Jun 2009 08:46:30 +0000 (10:46 +0200)]
netroot: Don't export NEWROOT
Exporting NEWROOT to handlers when we already pass them two other
arguments doesn't make sense. Passing it as a third argument is
better.
Philippe Seewer [Tue, 16 Jun 2009 08:39:20 +0000 (10:39 +0200)]
Exporting fstype, rflags and root is no longer necessary
Exporting these variables is no longer needed. All scripts that need
these are sourced and they're not used inside udev.
Philippe Seewer [Tue, 16 Jun 2009 08:31:29 +0000 (10:31 +0200)]
nfsroot: statd is only needed for nfs4
rpc.statd is only needed for NFSv4, because it's required for
locking. We don't support locking for NFSv2/3, so start it only
if we are mount from NFSv4.
Philippe Seewer [Tue, 16 Jun 2009 08:09:25 +0000 (10:09 +0200)]
Install debian renamed udev rules as well
Sadly, debian has reworked/renamed the udev default rules. If dracut
is to boot debian as well we need those rules.
Philippe Seewer [Tue, 16 Jun 2009 08:06:21 +0000 (10:06 +0200)]
TEST: Add dhcpd support for debian based distros
Debian based distros use dhcpd3 instead of just dhcpd. Accordingly
paths to lease files etc are different as well. This patch ensures
that the test-suite can run with either dhcpd or dhcpd3.
Philippe Seewer [Tue, 16 Jun 2009 07:56:31 +0000 (09:56 +0200)]
NFS: Add support for debian based distros
This patch enhances nfsroot and the nfs test-suite with compatibility
for debian based distros. This is mainly the difference of using
portmap instead of rpcbind and the missing file /etc/netconfig
Philippe Seewer [Tue, 16 Jun 2009 07:26:07 +0000 (09:26 +0200)]
NBD Test: Server initramfs does not need modules crypt, lvm and mdraim
Philippe Seewer [Tue, 16 Jun 2009 06:58:10 +0000 (08:58 +0200)]
NBD Test: Don't start a shell inside the server
Warren Togami [Tue, 16 Jun 2009 15:43:13 +0000 (11:43 -0400)]
move dhclient.conf to /etc
Seewer Philippe [Tue, 16 Jun 2009 03:03:02 +0000 (23:03 -0400)]
Fix case where mdmon isn't available.
Seewer Philippe [Mon, 15 Jun 2009 21:34:36 +0000 (17:34 -0400)]
Use relative path for ip command.
Seewer Philippe [Mon, 15 Jun 2009 20:57:10 +0000 (16:57 -0400)]
Allow dhcp to work with dhcpv3 where the -R option did not exist. Use dhclient.conf instead.
Warren Togami [Mon, 15 Jun 2009 20:26:11 +0000 (16:26 -0400)]
Simple changes to allow test suite to work with dash.
Warren Togami [Sat, 13 Jun 2009 03:48:54 +0000 (23:48 -0400)]
grep is installed by 95debug for the moment, remove this to simplify.
Warren Togami [Thu, 11 Jun 2009 23:28:02 +0000 (19:28 -0400)]
Exclude i2o_scsi driver.
This kernel module is dangerous to load here. It is meant only to allow direct
access to SCSI disks, which can destroy data. The i2o_block driver gives you
access to the defined hardware RAID arrays.
David Dillow [Thu, 11 Jun 2009 05:36:10 +0000 (01:36 -0400)]
NBD root: add support for LVM/LUKS
With this change, we can now use LUKS and LVM over NBD. There are
some decisions to be made regarding where we should get the fstype
and fsoptions from (DHCP root vs rootfstype= etc), but the basic
functionality is there.
David Dillow [Tue, 9 Jun 2009 05:14:35 +0000 (01:14 -0400)]
network: add support for netroot=...
This adds support for a command line option netroot=, which is currently
equivalent to root=. This will allow us to break out handling in NBD and
iSCSI to support constructs such as "root=LABEL=/ netroot=dhcp" to make
use of our block device handling with network attached devices.
iSCSI has not been changed in this patch as I don't currently have a way
to test it.
David Dillow [Tue, 9 Jun 2009 03:50:28 +0000 (23:50 -0400)]
NBD test: add more option parsing tests
Warren Togami [Wed, 10 Jun 2009 18:02:45 +0000 (14:02 -0400)]
.override also becomes net.* file only after successful rootfs mount.
Warren Togami [Wed, 10 Jun 2009 17:16:50 +0000 (13:16 -0400)]
Write ifcfg style file upon successful netboot.
TODO: static must be implemented, example in comments.
Warren Togami [Wed, 10 Jun 2009 15:12:14 +0000 (11:12 -0400)]
Write MAC address to a file at successful netroot mount, NetworkManager wants this.
Warren Togami [Wed, 10 Jun 2009 14:21:11 +0000 (10:21 -0400)]
dhclient.* files become net.* only after successful netboot.
This is an attempt to avoid confusing post-boot scripts by having them
consider only net.* files.
Warren Togami [Mon, 8 Jun 2009 21:18:01 +0000 (17:18 -0400)]
Write DHCP lease file, dcbw wants it for NetworkManager to take over management of the lease post-netboot.
Warren Togami [Mon, 8 Jun 2009 20:51:13 +0000 (16:51 -0400)]
Copy netboot state into /dev/.initramfs/ before switch_root
If cmdline "rdcopystate", then copy all of /tmp/* into /dev/.initramfs/ for later debugging examination.
Harald Hoyer [Mon, 8 Jun 2009 12:50:22 +0000 (14:50 +0200)]
add ipv6 rpc.idmapd and various conf files for NFS
rpcbind on Fedora does not seem work for NFS4 without IPv6
Harald Hoyer [Mon, 8 Jun 2009 12:49:23 +0000 (14:49 +0200)]
add more tools to the debug module
Harald Hoyer [Mon, 8 Jun 2009 12:49:00 +0000 (14:49 +0200)]
specify dhcpd.conf path for test server
Harald Hoyer [Mon, 8 Jun 2009 12:48:39 +0000 (14:48 +0200)]
s/NFS/NBD
Harald Hoyer [Mon, 8 Jun 2009 08:34:50 +0000 (10:34 +0200)]
specify dhcpd.conf path for test server
David Dillow [Mon, 8 Jun 2009 04:28:52 +0000 (00:28 -0400)]
NBD: add test suite
This is an initial test suite for the NBD root. It does the basics, and
needs to be extended to check more parts of the configuration.
David Dillow [Mon, 8 Jun 2009 04:25:20 +0000 (00:25 -0400)]
NBD: fix parsing of Debian-style nbdroot config
David Dillow [Mon, 8 Jun 2009 04:03:10 +0000 (00:03 -0400)]
NFS test: add test for nfs[4]:srv:/path syntax
David Dillow [Sun, 7 Jun 2009 22:17:03 +0000 (18:17 -0400)]
dracut init: add rdnetdebug to exclude list
David Dillow [Sun, 7 Jun 2009 21:17:48 +0000 (17:17 -0400)]
NFS root: add support for default root path and %s substitution
This implements a default path of /tftpboot/%s if no path is provided,
and adds host name substitution for %s, with a fall back to the IP address,
as provided by the kernel's nfsroot handling.
The test suite is updated to test this functionality.
David Dillow [Sun, 7 Jun 2009 19:48:07 +0000 (15:48 -0400)]
NFS test: separate NFSv3 and NFSv4 tests into their own functions
The full tests take over 6 minutes to run, and commenting out unneeded
ones is time consuming -- this change lets me comment out one line to
temporarily avoid an entire class of tests.
David Dillow [Sun, 7 Jun 2009 19:01:31 +0000 (15:01 -0400)]
NFS test: add test cases for DHCP/nfsroot=[IP:]/path[,options]
David Dillow [Sun, 7 Jun 2009 18:59:38 +0000 (14:59 -0400)]
NFS root: add missing DHCP root-path/nfsroot=[IP:]/path[,options] format
Reported-by: Seewer Philippe <philippe.seewer@bfh.ch>
David Dillow [Sun, 7 Jun 2009 03:08:12 +0000 (23:08 -0400)]
NFS test: renumber MAC addresses to ease adding new test cases
David Dillow [Sun, 7 Jun 2009 02:59:42 +0000 (22:59 -0400)]
NFS test: add support for checking mount options used
David Dillow [Sun, 7 Jun 2009 01:55:53 +0000 (21:55 -0400)]
NFS test: verify that we used the right IP to get to the server
David Dillow [Sat, 6 Jun 2009 09:09:43 +0000 (05:09 -0400)]
NFS test: additional option tests
Test additional combinations of command line and DHCP option formats. This
is by no means the complete list, but gets us started with some common ones.
David Dillow [Sat, 6 Jun 2009 09:09:13 +0000 (05:09 -0400)]
NFS test: allow emergency shell while debugging
David Dillow [Sat, 6 Jun 2009 06:31:45 +0000 (02:31 -0400)]
root option parsing belongs in 99base now
We use this for NFS root as well, and NFSv4 was getting broken when
it wasn't present.
David Dillow [Sat, 6 Jun 2009 05:22:54 +0000 (01:22 -0400)]
NFS test: rearrange the server tree so we can differentiate NFSv3 vs NFSv4
David Dillow [Sat, 6 Jun 2009 05:13:47 +0000 (01:13 -0400)]
NFS test: re-add the fix for the terminal
When debugging, this is still needed as we won't be redirecting out
output to /dev/null or a file. However, we need to guard against not
having a terminal.
David Dillow [Sat, 6 Jun 2009 05:13:16 +0000 (01:13 -0400)]
NFS test: switch the ISC dhcpd server
This will let us expand the number of client configs we can test
David Dillow [Sat, 6 Jun 2009 04:25:07 +0000 (00:25 -0400)]
NFS test: rearrange code to test multiple client configurations
This also gets rid of BASENET, which was an unneeded idea in hindsight.
David Dillow [Sat, 6 Jun 2009 04:06:04 +0000 (00:06 -0400)]
NFS testing: add forgotten hard-off hook
David Dillow [Sat, 6 Jun 2009 04:05:33 +0000 (00:05 -0400)]
Have the test framework always run the cleanup script
Also remove some extra semicolons, and put the pointer to the test log
on its own line.
Peter Jones [Fri, 5 Jun 2009 14:20:13 +0000 (10:20 -0400)]
Don't use backticks, use $()
This is a minor style fix.
Seewer Philippe [Fri, 5 Jun 2009 14:10:52 +0000 (16:10 +0200)]
Get rid of cat and grep
Harald Hoyer [Fri, 5 Jun 2009 14:08:30 +0000 (16:08 +0200)]
make test output more readable, log errors to test.log
Harald Hoyer [Fri, 5 Jun 2009 06:51:31 +0000 (08:51 +0200)]
Merge branch 'master' of ssh://dracut.git.sourceforge.net/gitroot/dracut
Harald Hoyer [Fri, 5 Jun 2009 06:47:51 +0000 (08:47 +0200)]
Merge commit 'dillow/master'
Conflicts:
test/TEST-20-NFS/make-client-root
David Dillow [Fri, 5 Jun 2009 04:26:10 +0000 (00:26 -0400)]
nfs: cleanup currently needs grep
David Dillow [Fri, 5 Jun 2009 04:20:26 +0000 (00:20 -0400)]
test suite: automate NFS testing
First cut at automating the NFS test suite.
David Dillow [Fri, 5 Jun 2009 04:18:29 +0000 (00:18 -0400)]
test suite: allow a user-selected kernel
Sometimes it is desirable to allow the user to test with a different
kernel than the one they are currenting running.
Victor Lowther [Fri, 5 Jun 2009 02:57:30 +0000 (21:57 -0500)]
Ugh, using backticks instead of $()
Get that evilness out of dracut, please.
Victor Lowther [Fri, 5 Jun 2009 02:49:57 +0000 (21:49 -0500)]
make udevtriggeropts just use an environment variable
No point in making a file and then reading from it when hooks are sourced.
Victor Lowther [Fri, 5 Jun 2009 02:35:31 +0000 (21:35 -0500)]
Make debugging much more useful.
Since we are explicitly using bash, we can have nice, useful value for PS4
Harald Hoyer [Thu, 4 Jun 2009 15:23:41 +0000 (17:23 +0200)]
specfile update
Harald Hoyer [Thu, 4 Jun 2009 15:20:36 +0000 (17:20 +0200)]
add dracutbasedir as configurable variable in dracut.conf