Commit Graph

4000 Commits (033-502)

Author SHA1 Message Date
Harald Hoyer b8e6c051c6 network:ibft put IPv6 IP in brackets
ip=2620:0052:0000:2220:0226:b9ff:fe81:cde4::[2620:0052:0000:2220:0000:0000:0000:03fe]:64::ibft0:none

should be

ip=[2620:0052:0000:2220:0226:b9ff:fe81:cde4]::[2620:0052:0000:2220:0000:0000:0000:03fe]:64::ibft0:none

https://bugzilla.redhat.com/show_bug.cgi?id=1322592#c19
2016-08-17 16:26:13 +02:00
Harald Hoyer fc77aca7dd systemd/dracut-cmdline.sh: unset "UNSET" $root
https://bugzilla.redhat.com/show_bug.cgi?id=1365667
caused by commit 9aa224cc
2016-08-12 13:29:31 +02:00
Harald Hoyer 7a7b8c1740 dracut-functions.sh: catch all lvm slaves
add check_vol_slaves_all to be used in check_block_and_slaves_all

otherwise only the first lvm VG member would be processed
2016-08-12 12:33:10 +02:00
Harald Hoyer 8dd6ff8d6a fips: remove sha1-mb
This module should be loaded automatically, if the HW supports it.
2016-08-12 12:33:10 +02:00
Lukas Nykryn 10e6bf0e43 fips-module: add missing spaces
https://bugzilla.redhat.com/show_bug.cgi?id=1359677
2016-07-28 12:27:10 +02:00
Harald Hoyer cd6679c716 add rd.emergency=[reboot|poweroff|halt]
specifies what action to execute in case of a critical failure

(cherry picked from commit c45e856a65)

https://bugzilla.redhat.com/show_bug.cgi?id=1359144
2016-07-22 15:26:32 +02:00
Harald Hoyer 20171c7519 lvm: include /etc/lvm/lvm_<host_tag>.conf
https://bugzilla.redhat.com/show_bug.cgi?id=1328778
2016-07-22 13:26:10 +02:00
Harald Hoyer b7c7b16d4e dracut.sh: extend host_fs_types with $filesystems
Additional filesystems specified on the kernel command line or in the
configuration files, should trigger the inclusion of the corresponding
dracut modules, therefore host_fs_types is extended with these
filesystems.
2016-07-22 08:39:38 +02:00
Harald Hoyer b077d18963 nfs: install all nfs modules non-hostonly
If nfs is used, we should include all nfs modules, in the case, where
$host_fs_types contains nfs.
2016-07-22 08:30:36 +02:00
Harald Hoyer 2f42cfcbeb fips: add "sha1-mb" to fips modules
https://bugzilla.redhat.com/show_bug.cgi?id=1357080
2016-07-21 15:08:59 +02:00
Harald Hoyer 0eb1afa9ea fips: use /lib/modules/$(uname -r)/modules.fips
if /lib/modules/$(uname -r)/modules.fips exists, use that list instead
of the dracut module list.
2016-07-21 15:07:52 +02:00
Harald Hoyer 2c9f267268 Merge pull request #141 from pratyushanand/for-RHEL-7
RHEL7: Install module for active watchdog
2016-07-21 11:12:01 +02:00
Harald Hoyer 038f142ef9 dracut.spec: remove trailing space 2016-07-06 09:17:36 +02:00
Harald Hoyer 1492490070 watchdog: start traversing the device tree from the right directory
start with the device subtree, not with the parent of it
2016-07-05 12:52:16 +05:30
Harald Hoyer 0eb1ee3db2 watchdog: clean return of installkernel()
return 0, otherwise if _alldrivers is empty, the return code is fail
2016-07-05 12:52:16 +05:30
Harald Hoyer 4c83fd10ab watchdog/module-setup.sh: rewrite
- use local variables with _
- use associative array for the kernel modules
- install emergency hook even in the systemd case
- follow device path until /sys is reached
- set kernel version for modprobe checking
2016-07-05 12:52:16 +05:30
Pratyush Anand f69cd051ab watchdog: ensure that module is loaded as early as possible
It is expected that a watchdog module will disable an active watchdog when
its probe is called ie, when it is loaded. So an early load of the module
will help to disable it earlier.
This can be helpful in some corner cases where kdump and watchdog daemon
both are active.

Testing:
    -- When watchdog kernel modules were added
	# dracut --no-hostonly initramfs-test.img -a watchdog
	# lsinitrd initramfs-test.img -f etc/cmdline.d/00-watchdog.conf
 	rd.driver.pre=iTCO_wdt,lpc_ich,

Signed-off-by: Pratyush Anand <panand@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Harald Hoyer <harald@redhat.com>
2016-07-05 12:52:16 +05:30
Pratyush Anand 0be17528e5 watchdog: install module for active watchdog
Recently following patches have been added in upstream Linux kernel, which
(1) fixes parent of watchdog_device so that
/sys/class/watchdog/watchdogn/device is populated. (2) adds some sysfs
device attributes so that different watchdog status can be read.

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6551881c86c791237a3bebf11eb3bd70b60ea782
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=906d7a5cfeda508e7361f021605579a00cd82815
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=33b711269ade3f6bc9d9d15e4343e6fa922d999b

With the above support, now we can find out whether a watchdog is active or
not. We can also find out the driver/module responsible for that watchdog
device.

Proposed patch uses above support and then adds module of active watchdog
in initramfs generated by dracut for hostonly mode. Kernel module for
inactive watchdog will be added as well for none hostonly mode.

When an user does not want to add kernel module, then one should exclude
complete dracut watchdog module with --omit.

Testing:
-- When watchdog is active watchdog modules were added
	# cat /sys/class/watchdog/watchdog0/identity
	iTCO_wdt
	# cat /sys/class/watchdog/watchdog0/state
	active
	# dracut --hostonly initramfs-test.img -a watchdog
	# lsinitrd initramfs-test.img | grep iTCO
	-rw-r--r--   1 root     root         9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
	-rw-r--r--   1 root     root        19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko

-- When watchdog is inactive then watchdog modules were not added
	# cat /sys/class/watchdog/watchdog0/state
	inactive
	# dracut --hostonly initramfs-test.img -a watchdog
	# lsinitrd initramfs-test.img | grep iTCO

-- When watchdog is inactive, but no hostonly mode, watchdog modules were added
	# cat /sys/class/watchdog/watchdog0/state
	inactive
	# dracut --no-hostonly initramfs-test.img -a watchdog
	# lsinitrd initramfs-test.img | grep iTCO
	-rw-r--r--   1 root     root         9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
	-rw-r--r--   1 root     root        19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko

Signed-off-by: Pratyush Anand <panand@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Harald Hoyer <harald@redhat.com>
2016-07-05 12:52:16 +05:30
Pratyush Anand e5439c9b37 watchdog: Do not add hooks if systemd module is included
When systemd is present, let it manage watchdog feed.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Harald Hoyer <harald@redhat.com>
2016-07-05 12:52:16 +05:30
Harald Hoyer 573e508554 dracut.spec: remove dd
dd is part of coreutils
2016-07-04 16:30:47 +02:00
Harald Hoyer 7b0ce59233 TEST-70-BONDBRIDGETEAMVLAN: add testcase for testsuite
multiple bonds
multiple bridges
multiple vlans
2016-07-04 16:28:08 +02:00
Harald Hoyer 7a90c8b343 network: support multiple vlan, team, bridge and bond 2016-07-04 16:28:08 +02:00
HATAYAMA Daisuke 84d845fc7d lsinitrd: Suppress "cat: write error: Broken pipe"
On systemd, SIGPIPE is ignored by default; see man 5 systemd.exec for
IgnoreSIGPIPE=. As a result, lsinitrd.sh under a systemd service
outputs "cat: write error: Broken pipe" in the processing of
determining a compression format of a given initramfs file using cat
command in the write part of a pipeline processing.

For example, this is a log message of kdump.service in RHEL7.1,

    -- Logs begin at Wed 2015-11-04 09:57:33 JST, end at Wed 2015-11-04 09:58:28 JST. --
    Nov 04 09:57:33 localhost systemd[1]: Stopping Crash recovery kernel arming...
    Nov 04 09:57:33 localhost kdumpctl[22545]: kexec: unloaded kdump kernel
    Nov 04 09:57:33 localhost kdumpctl[22545]: Stopping kdump: [OK]
    Nov 04 09:57:33 localhost systemd[1]: Starting Crash recovery kernel arming...
    Nov 04 09:57:36 localhost kdumpctl[22553]: Detected change(s) in the following file(s):
    Nov 04 09:57:36 localhost kdumpctl[22553]: /etc/kdump.conf
    Nov 04 09:57:36 localhost kdumpctl[22553]: Rebuilding /boot/initramfs-3.10.0-229.el7.x86_64kdump.img
    Nov 04 09:57:40 localhost dracut[24914]: Executing: /usr/sbin/dracut --hostonly --hostonly-cmdline -o "plymouth dash resume" -f /boot/initramfs-3.10.0-229.el7.x86_64kdump.img 3.10.0-229.el7.x86_64
    ...<cut>...
    Nov 04 09:58:12 localhost dracut[24914]: *** Creating image file done ***
    Nov 04 09:58:12 localhost dracut[24914]: Image: /boot/initramfs-3.10.0-229.el7.x86_64kdump.img: 18M
    Nov 04 09:58:12 localhost kdumpctl[22553]: cat: write error: Broken pipe
    Nov 04 09:58:12 localhost dracut[24914]: ========================================================================
    Nov 04 09:58:12 localhost dracut[24914]: Version: dracut-033-240.el7
    Nov 04 09:58:12 localhost dracut[24914]:
    Nov 04 09:58:12 localhost dracut[24914]: Arguments: --hostonly --hostonly-cmdline -o 'plymouth dash resume' -f
    Nov 04 09:58:13 localhost dracut[24914]:
    Nov 04 09:58:13 localhost dracut[24914]: dracut modules:
    Nov 04 09:58:13 localhost dracut[24914]: bash

kdump.service builds and loads an initramfs for kdump kernel using
kdumpctl command which uses dracut command and so lsinitrd command,
too.

Although there's no actual harm except for the error message, there
has been several inquiries from customers about this message so
far. We should suppress this message to reduce needless
communications.

To suppress the message, this commit cleans up the processing of
reading the first 6 bytes of a given initramfs file without cat
command.

(cherry picked from commit 3ce142861d)

Conflicts:
	lsinitrd.sh
2016-07-01 13:17:18 +02:00
Harald Hoyer aea64fe178 TEST-14-IMSM: add rd.device.timeout 2016-07-01 13:17:18 +02:00
Harald Hoyer 271a64bfd1 TEST-13-ENC-RAID-LVM: add rd.device.timeout=40 2016-07-01 12:29:16 +02:00
Harald Hoyer fd8506b5da systemd: let booting work after exiting emergency
If the user managed to mount /sysroot, let it work
2016-07-01 12:29:16 +02:00
Harald Hoyer 4c5f1b3b4a systemd/dracut-initqueue.sh: don't go into emergency
let systemd go into emergency.target later on
2016-07-01 12:29:15 +02:00
Harald Hoyer a95fe14581 99base/init.sh: break the initqueue, if emergency shell was successful 2016-07-01 12:29:15 +02:00
Harald Hoyer 6efee60f93 test/TEST-12-RAID-DEG: add rd.device.timeout 2016-07-01 12:29:15 +02:00
Harald Hoyer 22a907b383 test/TEST-04-systemd: fixup test
- fix find -perm
- add failme test cases
- remove journal output
2016-07-01 12:29:15 +02:00
Harald Hoyer ca46c751d1 add rd.device.timeout=<seconds> parameter 2016-07-01 12:29:15 +02:00
Harald Hoyer ca64eeec79 virtfs: use systemd generator
use a systemd generator, instead of a dracut hook to mount
2016-07-01 12:29:15 +02:00
Alexander Kurtz 9aa224cc19 dracut-systemd/dracut-cmdline.sh: Don't error out if there is no root= argument.
Thanks to systemd's gpt-auto-generator [0] (which implements the Discoverable
Partitions Specification [1]), it is no longer necessary to always specify the
root= argument.

However, dracut would still refuse to boot if there was no root= argument (or
if it was set to the special value "gpt-auto" [2]). This commit stops dracut
from aborting the boot process in these cases and simply lets systemd do its
magic.

[0] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator
[1] https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/
[2] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator/gpt-auto-generator.c#L928

(cherry picked from commit 016613c774)
2016-07-01 12:29:15 +02:00
Harald Hoyer 13264563a9 network:wait_for_ipv6_auto() wait for all tentative addresses 2016-07-01 12:29:15 +02:00
Harald Hoyer cc3f588071 network: flush only IPv4 addresses on configuration
also flush on dhcp
2016-07-01 12:29:15 +02:00
Harald Hoyer 42dd8928a8 network: differ between ipv6 local and global tentative
For dhcpv6, only a non-tentative scope local address is needed.
2016-06-30 11:10:35 +02:00
Harald Hoyer 6d22a6860e network/net-lib.sh: auto6 wait for route ra
Wait for a router advertised route
2016-06-30 08:52:09 +02:00
Hannes Reinecke bac74f05e3 40network: Update iBFT scanning code to handle IPv6
IPv6 addresses should be specified in brackets so that the
ip= scanning code doesn't get confused.

References: bnc#887542

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.com>
(cherry picked from commit c98d1756f7)
2016-06-29 18:26:58 +02:00
Xunlei Pang a320422588 network/net-lib.sh: delete duplicated DNS items from "/etc/resolv.conf"
Users can pass the DNS information throught "nameserver=" cmdline,
there maybe duplicated inputs.

"/etc/resolv.conf" have some restrictions on the number of DNS items
effective, so make sure that this file contains no duplicated items.

We achieve this by simply making the file have no duplicated lines.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
(cherry picked from commit 4fa5c235a7)
2016-06-29 17:27:36 +02:00
Harald Hoyer 5bc318633f network: dhcp before parsing specified dns through cmdline
I met a problem when passing kdump dns to dracut via "nameserver=x.x.x.x",
the dns I provided didn't appear in the "/etc/resolv.conf".

After some debugging, found that when setup dhcp DNS, in setup_interface()
and setup_interface6(), it has:
    echo "search $search $domain" > /tmp/net.$netif.resolv.conf

So if "$search $domain" isn't NULL(this is ture in my kdump environment),
the dns contents(that is, dns1, dns2, nameserver) in "ifup" before dhcp
will be discarded.

This patch addresses it by handling dhcp first. In fact this is also the
way the NetworkManager in 1st kernel works.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>

cherry-pick of commit cf376023e6
2016-06-29 17:26:17 +02:00
Michael Chapman 53310e44c9 systemd: ensure journal is volatile
If journald.conf already contains Storage=persistent, journald will
write to /var/log/journal/, which ends up at /run/initramfs/log/journal/
after switching root. We want to make sure early boot logs are written
to /run/log/journal/ so they can be flushed to /var/log/journal/ after
switching root.

(cherry picked from commit 5dea430e08)
2016-06-29 17:21:56 +02:00
Harald Hoyer a7805d1297 network/net-lib.sh(wait_for_ipv6_dad): simplify ip call
taken from initscripts
2016-06-29 17:19:06 +02:00
Harald Hoyer 435af39a00 network/net-lib.sh(parse_ifname_opts): support 21 byte MAC addrs
infiniband MAC addrs are 20 bytes long not 6

https://bugzilla.redhat.com/show_bug.cgi?id=1319270
2016-06-29 16:37:40 +02:00
Harald Hoyer 323093b621 test: add TEST-60-MTUMAC
test MTU and MACADDR setting
2016-06-29 15:51:42 +02:00
Harald Hoyer 61b5ee6d1d network: set MTU and MACADDR for dhcp and auto6 2016-06-29 15:13:35 +02:00
Harald Hoyer 55712f46c0 test: don't call ldconfig with -- path separator 2016-06-29 15:11:39 +02:00
Harald Hoyer 53e4ab7174 network: support macaddr in brackets []
ip=ens3:dhcp:1000
ip=ens3:dhcp::54:52:00:abπŸ’Ώef
ip=ens3:dhcp::[54:52:00πŸ†Žcd:ef]
ip=ens3:dhcp:1000:54:52:00:abπŸ’Ώef
ip=ens3:dhcp:1000:[54:52:00πŸ†Žcd:ef]

ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000
ip=192.168.122.20::192.168.122.1:24:test:ens3:none::54:52:00:abπŸ’Ώef
ip=192.168.122.20::192.168.122.1:24:test:ens3:none::[54:52:00πŸ†Žcd:ef]
ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:54:52:00πŸ†Žcd:ef
ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:[54:52:00πŸ†Žcd:ef]

ip=::::test:ens3:dhcp:1000
ip=::::test:ens3:dhcp::54:52:00:abπŸ’Ώef
ip=::::test:ens3:dhcp::[54:52:00πŸ†Žcd:ef]
ip=::::test:ens3:dhcp:1000:54:52:00:abπŸ’Ώef
ip=::::test:ens3:dhcp:1000:[54:52:00πŸ†Žcd:ef]
2016-06-29 12:44:49 +02:00
Harald Hoyer b7f5e42c57 network/net-lib.sh: correctly set mac address for ip=...:<mtu>:<mac>
if ip=...:<mtu>:<mac> was specified, macadress was not set

(cherry picked from commit efbc47b8e4)
2016-06-29 12:15:12 +02:00
Harald Hoyer 603a0fe0a3 fcoe-up: remove initlog logic
(cherry picked from commit f60b7d8655)
2016-06-29 12:06:20 +02:00
Hannes Reinecke f105eaebb8 95fcoe: update fcoe interface check 2016-06-29 11:57:56 +02:00