Commit Graph

6116 Commits (055)

Author SHA1 Message Date
Harald Hoyer a2dbecfcd6 test: add TEST_RUN_ID 2018-08-14 15:54:31 +02:00
Harald Hoyer 604c09b1da TEST-31-ISCSI-MULTI/test.sh: fixed test description 2018-08-14 15:28:56 +02:00
Harald Hoyer f9c8b3112a TEST-50-MULTINIC/test.sh: fixed server startup 2018-08-14 14:12:54 +02:00
Harald Hoyer bb75d16521 kernel-network-modules: add vlan kernel modules 2018-08-14 14:07:12 +02:00
Harald Hoyer ca8f1c1ba3 test: fixed KVERSION and qemu backwards compatiblity 2018-08-14 14:03:55 +02:00
Harald Hoyer 94cc856cb8 TEST-70-BONDBRIDGETEAMVLAN: load vlan kernel modules 2018-08-14 13:57:15 +02:00
Harald Hoyer 827a5b1a80 test: also output server.log on failure 2018-08-14 11:37:57 +02:00
Harald Hoyer 393da0c370 TEST-50-MULTINIC: s/--device/-device 2018-08-14 11:35:26 +02:00
Harald Hoyer 82fe4ea0a5 enable parallel test suite
$ time sudo make -j SKIP=14 V=2 check
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-13-ENC-RAID-LVM'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-40-NBD'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-04-FULL-SYSTEMD'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-12-RAID-DEG'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-15-BTRFSRAID'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-16-DMSQUASH'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-17-LVM-THIN'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-11-LVM'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-31-ISCSI-MULTI'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-20-NFS'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-99-RPM'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-02-SYSTEMD'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-30-ISCSI'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-01-BASIC'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-03-USR-MOUNT'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-70-BONDBRIDGETEAMVLAN'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-50-MULTINIC'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-10-RAID'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-18-LVM-ENC-LV'
TEST: root filesystem on an encrypted LVM PV on a degraded RAID-5 [STARTED]
TEST: root filesystem on NBD [STARTED]
TEST: root filesystem on NBD [SKIPPED]
TEST: Full systemd serialization/deserialization test with /usr mount [STARTED]
TEST: root filesystem on multiple device btrfs [STARTED]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-40-NBD'
TEST: root filesystem on a LiveCD dmsquash filesystem [STARTED]
TEST: root filesystem on a LiveCD dmsquash filesystem [SKIPPED]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-16-DMSQUASH'
TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [STARTED]
TEST: root filesystem on LVM PV [STARTED]
TEST: rpm integrity after dracut and kernel install [STARTED]
TEST: root filesystem on NFS [STARTED]
TEST: root filesystem over iSCSI [STARTED]
TEST: root filesystem on LVM PV with thin pool [STARTED]
TEST: root filesystem over iSCSI [STARTED]
TEST: root filesystem on a ext3 filesystem [STARTED]
TEST: root filesystem on a ext3 filesystem [STARTED]
TEST: root filesystem on a btrfs filesystem with /usr subvolume [STARTED]
TEST: root filesystem on NFS with bridging/bonding/vlan [STARTED]
TEST: root filesystem on NFS with multiple nics [STARTED]
TEST: root filesystem on an encrypted LVM PV on a RAID-5 [STARTED]
TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [STARTED]
TEST: root filesystem on LVM PV [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-11-LVM'
TEST: root filesystem on multiple device btrfs [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-15-BTRFSRAID'
TEST: root filesystem on LVM PV with thin pool [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-17-LVM-THIN'
TEST: root filesystem on a ext3 filesystem [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-02-SYSTEMD'
TEST: root filesystem on a btrfs filesystem with /usr subvolume [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-03-USR-MOUNT'
TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-18-LVM-ENC-LV'
TEST: Full systemd serialization/deserialization test with /usr mount [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-04-FULL-SYSTEMD'
TEST: root filesystem on an encrypted LVM PV on a RAID-5 [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-10-RAID'
TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-13-ENC-RAID-LVM'
TEST: root filesystem over iSCSI [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-30-ISCSI'
TEST: root filesystem on a ext3 filesystem [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-01-BASIC'
TEST: root filesystem over iSCSI [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-31-ISCSI-MULTI'
TEST: rpm integrity after dracut and kernel install [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-99-RPM'
TEST: root filesystem on NFS [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-20-NFS'
TEST: root filesystem on NFS with bridging/bonding/vlan [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-70-BONDBRIDGETEAMVLAN'
TEST: root filesystem on an encrypted LVM PV on a degraded RAID-5 [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-12-RAID-DEG'
TEST: root filesystem on NFS with multiple nics [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-50-MULTINIC'

real	9m3,969s
user	22m50,323s
sys	5m24,411s
2018-08-14 11:04:50 +02:00
Harald Hoyer ffbd37d784 TEST-31-ISCSI-MULTI: use different port than TEST-30 2018-08-14 11:03:48 +02:00
Harald Hoyer ab94a204e0 load modules earlier for iscsi via dhcp root-path 2018-08-14 11:03:11 +02:00
Harald Hoyer 6058b06b86 test/{TEST-50-MULTINIC,TEST-70-BONDBRIDGETEAMVLAN}: use qemu-3.0 syntax
use qemu-3.0 syntax for network devices
2018-08-13 16:30:25 +02:00
Harald Hoyer 26aea0299a multipath-shutdown: fix shell syntax
seems like a misplaced $()
2018-08-13 16:30:25 +02:00
Harald Hoyer 0a80cda0ea dracut.spec: remove warpclock from z-series, not the other way round 2018-08-13 16:30:25 +02:00
Harald Hoyer 6f0500ed4a iscsi: remove $() where it does not fit
also simplify iscsiadm command to one call
2018-08-13 16:30:25 +02:00
Harald Hoyer 746135dd1e mdraid: better handling of various UUID formats 2018-08-13 16:30:25 +02:00
Lukas Nykryn a762dedb60 dracut-functions: fix the word splitting 2018-08-09 13:13:52 +02:00
Nicolas Chauvet a0c915b1e4 Add gpio and pinctrl drivers for arm*/aarch64
This is needed since few gpio/pinctrl can be built as modules and are
useful on early boot.

One example is jetson-tx1 where sata and external mmc can work only
after loading pinctrl-max77620 and gpio-max77620 modules.

Having theses kind of drivers bundled into the initramfs will also
avoid some deferred probes.

V2: add pinctrl for all arches

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2018-08-06 09:46:08 +02:00
Harald Hoyer 99df3d22be mdraid/parse-md.sh: also accept rd.md.uuid with ":"
convert rd.md.uuid=32ef2172:f056:6fa7:66a8:2f7fc8b1798
to udev rules in the correct UUID format 32ef2172-f056-6fa7-66a8-2f7fcf8b1798
2018-08-02 16:32:41 +02:00
Yu Watanabe be98291caf spec: sort modules
Also drops remaining %defattr.
2018-07-30 10:43:21 +02:00
Yu Watanabe 33782aebbf spec: warpclock is not available on s390 or s390x 2018-07-30 10:43:21 +02:00
Harald Hoyer 55a12055c5 dracut.spec: Remove needless use of %defattr 2018-07-26 13:04:20 +02:00
Harald Hoyer 25111d717e dracut.spec: add 00warpclock dracut module 2018-07-26 13:01:14 +02:00
Harald Hoyer 819ea38651 Bring back 51-dracut-rescue-postinst.sh
can only be obsoleted after F30
2018-07-26 12:58:21 +02:00
Kairui Song 143420bc05 lsinitrd: update help message and man page
Signed-off-by: Kairui Song <kasong@redhat.com>
2018-07-26 09:57:55 +02:00
Kairui Song 986b12d391 lsinitrd: optimize performance when handling multiple files
Currently, when trying to unpack or print the content of multiple
files, lsinitrd will decompress the image and pipe the decompressed
content to cpio to retrive each file if the image is compressed.
Which mean if we want to extract 10 files the image will be decompressed
10 times, which is a waste of time.

This patch will let lsinitrd decompress the image file to a temp file
first if multiple file names are given, then cpio will read from the
decompressed temp file, which will speed up a lot.

Time consumption test for command:
`lsinitrd initramfs-4.16.15-300.fc28.x86_64.img \
    usr/lib/dracut/build-parameter.txt \
    usr/lib/dracut/modules.txt \
    etc/machine-id \
    etc/hostname \
    usr/lib/udev/rules.d/99-systemd.rules`

Before the patch:
2.37user 0.33system 0:02.12elapsed

After the patch:
0.50user 0.42system 0:00.72elapsed

There would be a more significant time difference if we try to
extract more files.
2018-07-26 09:57:55 +02:00
Kairui Song f81c864eed lsinitrd: allow to only unpack certain files
Before this patch, "--unpack" will always unpack the whole image.
Make "--unpack" be able to unpack only certain files, it will be
easier to retrieve files from initramfs image.

Signed-off-by: Kairui Song <kasong@redhat.com>
2018-07-26 09:57:55 +02:00
Harald Hoyer aac3a0652a NEWS: forgot to update the latest version 2018-07-26 09:54:13 +02:00
Hannes Reinecke a0eadcdc64 00warpclock: Set correct timezone
Add module for setting correct timezone.

References: bnc#830060

For now, this module will not be included automatically due to different
expectations (see e.g.  https://bugzilla.redhat.com/show_bug.cgi?id=981617)

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Daniel Molkentin <daniel.molkentin@suse.com>
2018-07-24 07:08:11 +02:00
Harald Hoyer e331e06a39 dracut-install: skip modules with empty path
if kmod_module_get_path(module) returns NULL, skip the module
2018-07-18 12:42:02 +02:00
Kairui Song 7047294617 Record loaded kernel modules when hostonly mode is enabled
A hostonly image will not include every possibly required kernel module,
so if any hardware or configuration changed, the image may fail to boot.

One way to know if there are any hardware change or configuration change
that will require an image rebuild or not is to check the loaded kernel
module list. If the loaded kernel module list differs from last build
time, then the image may require to be rebuilt.

This commit will let dracut record the loaded kernel module list when
the image is being built, so other tools or services can compare this
list with currently loaded kernel modules to decide if dracut should be
called to rebuild the image.

To retrieve the loaded kernel modules list when an image is built, use
lsinitrd command:

lsinitrd $image -f */lib/dracut/loaded-kernel-modules.txt
2018-07-18 11:50:18 +02:00
Harald Hoyer 1caaeaae1e modules.d/95fcoe/cleanup-fcoe.sh: chmod +x 2018-07-12 15:19:17 +02:00
Harald Hoyer d63a4e285e TEST-40-NBD: disable for now
nbd is always broken
2018-07-12 15:18:48 +02:00
Harald Hoyer 9a9c67d61b TEST-30-ISCSI: readd multiple target test 2018-07-06 11:56:23 +02:00
Harald Hoyer bc01f822de NEWS and AUTHORS update 2018-07-06 10:37:51 +02:00
Harald Hoyer f265cb67dc mdraid: fix case if rd.md.uuid is in ID_FS_UUID format
if rd.md.uuid is in ID_FS_UUID format with dashes
e40a0234-7e52-5f10-f267-658d8ec463fa
convert it for the /dev/disk/by-id/md-uuid-${uuid} format
e40a0234:7e525f10:f267658d:8ec463fa
2018-07-06 09:25:03 +02:00
Harald Hoyer f98d3066d9 rdsosreport.sh: best effort to strip out passwords
Modified version of:
https://github.com/dracutdevs/dracut/pull/96

Thanks to Zhiguo Deng <bjzgdeng@linux.vnet.ibm.com>
2018-07-05 14:49:23 +02:00
Mike Gilbert 9d1b81c0d1 dracut.sh: improve udevdir and systemdutildir fallback logic
Check for a common binary in systemdutildir. This resolves an issue on
split-usr systems, where it is common to have both /lib/systemd[/system]
and /usr/lib/systemd[/user] present.

Check for systemd-udevd specifically, since some distros (Gentoo) allow
udev to be installed without the rest of the systemd stack.

Similar logic is applied to udevdir simply for consistency.
2018-07-05 13:57:43 +02:00
Harald Hoyer e3fb645821 TEST-99-RPM: use Fedora 29 2018-07-05 13:39:46 +02:00
Harald Hoyer 8f77326479 dracut-init.sh: fix instmods with zero input
instmods < /dev/null

should not error
2018-07-05 13:39:46 +02:00
Harald Hoyer ca77afdeb3 dracut.spec: remove 90multipath-hostonly 2018-07-05 13:39:46 +02:00
Kairui Song 35e86ac117 Merge 90-multipath-hostonly and 90-multipath
This commit basically reverts 5ce7cc73

90-multipath-hostonly module was added in 5ce7cc73, because if hostonly
mode is enabled, multipath module will always hardcode wwids which
causes problems when the initramfs is cloned to another system with same
hardware.

Now with tri-state hostonly mode, the two modules could be merged and only
hardcode wwids when "strict" hostonly mode is enabled.
2018-07-05 13:17:19 +02:00
Harald Hoyer 058ff2f06d dracut.spec: add 95qeth_rules 2018-07-05 12:03:34 +02:00
Harald Hoyer efecf0a95e network: iface_has_carrier(): fixed logic 2018-07-05 09:37:10 +02:00
Hiroaki Mizuguchi c574c3f565 ifup.sh: don't wait linkup when set static ip explicitly
iface_has_carrier is skipped when set $dev. Fail curl fetch for root=live:<url>.
2018-07-05 09:37:01 +02:00
Daniel Molkentin 61ac90fefa 95qeth_rules: Add new module to copy qeth rules
Only pick rules for interfaces which have a carrier in the running
system. Those interfaces will be assembled by udev to allow booting
from those devices (i.e. iSCSI).

Reference: FATE#323440
2018-07-05 09:15:08 +02:00
Kairui Song 432647c278 90kernel-modules: Don't install extra modules when hostonly mode is set to strict 2018-07-05 09:14:02 +02:00
Kairui Song a695250ec7 Introduce tri-state hostonly mode
Add a new option --hostonly-mode which accept an <mode> parameter, so we have a tri-state hostonly mode:

    * generic: by passing "--no-hostonly" or not passing anything.
               "--hostonly-mode" has no effect in such case.
    * sloppy: by passing "--hostonly --hostonly-mode sloppy". This
              is also the default mode when only "--hostonly" is given.
    * strict: by passing "--hostonly --hostonly-mode strict".

Sloppy mode is the original hostonly mode, the new introduced strict
mode will allow modules to ignore more drivers or do some extra job to
save memory and disk space, while making the image less portable.

Also introduced a helper function "optional_hostonly" to make it
easier for modules to leverage new hostonly mode.

To force install modules only in sloppy hostonly mode, use the form:

hostonly="$(optional_hostonly)" instmods <modules>

Signed-off-by: Kairui Song <kasong@redhat.com>
2018-07-05 09:14:02 +02:00
Harald Hoyer 6ccb58a5b6 iscsi: s/rd.iscsilogin.retries/rd.iscsi.login_retry_max 2018-07-05 09:02:55 +02:00
Harald Hoyer 7d0848957c iscsi: do discovery for every network change 2018-07-04 13:05:56 +02:00