Commit Graph

2378 Commits (033-502)

Author SHA1 Message Date
Lukas Nykryn 7b9bbc2a82 01fips: add authenec module
Resolves: #1465946
2017-06-28 16:10:48 +02:00
Lukas Nykryn 994a6cdd88 95iscsi: run iscsistart with DefaultDependencies=no
In upstream part of 7e51a94f5b

Resolves: #1461234
2017-06-15 14:01:13 +02:00
Lukas Nykryn 3674e2e16f fips: add cmac kernel module
cmac is now marked as fips_allowed

Resolves: rhbz#1460865
2017-06-13 16:40:47 +02:00
Peter Robinson 436052a84b Add check for aarch64 to the arm kernel module list
This adds the same list of drivers we use for arm platforms for
aarch64 too, also add the DMA drivers there too as they can add
sigficant performance for some storage/usb and often need to be
present when the storage drivers load.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>

Cherry-picked from: 917e1b6b5b
Resolves: #1459277
2017-06-12 16:09:01 +02:00
Prarit Bhargava 784c92876b module-setup.sh: Add ARM specific driver to initramfs image
If a hisi_sas storage device is used as / during system install, the
resulting installation will not boot because the hisi_sas driver is not
included in the initramfs.

The Hisilicon storage driver needs to be added to the initramfs image for
aarch64 kernels.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: dzickus@redhat.com
Cc: dmarlin@redhat.com
Cc: wefu@redhat.com
Cc: harald@redhat.com

Resolves: #1459277
2017-06-12 16:09:01 +02:00
Lukas Nykryn fb008ce665 Revert "systemd/dracut-initqueue.sh: don't go into emergency"
This reverts commit 4c5f1b3b4a.

Resolves: #1396865
2017-06-12 16:09:01 +02:00
Michal Sekletar 02d0d0a208 udev-rules: pull in 40-redhat-cpu-hotplug.rules
Cpu hotplug policy was split off to separate file. Let's pull in the new
rules file by default.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1266322

Resolves: #1460707
2017-06-12 15:55:30 +02:00
Tong Li 5ae8333947 95ssh-client: attempt to copy UserKnownHostsFile to kdump's initramfs
Bug related to this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1360131
Now dracut only attempts to copy GlobalKnownHostsFile while generating kdump's
initramfs. This method will cause kdump's failure if users set customized
UserKnownHostsFile in /etc/ssh/ssh_config. This patch simply attempts to copy
those files too while going through /etc/ssh/ssh_config. Note that we need to
make sure ~/foo will be copied as /root/foo in kdump's initramfs.

Cherry-picked from: 32f5af2f5e
Resolves: #1360131
2017-04-20 10:08:06 +02:00
Lukas Nykryn ea8bef9893 ifup: don't ifup team master indefinitely
https://bugzilla.redhat.com/show_bug.cgi?id=1416958
Thanks to martin.moore@hpe.com for the patch
2017-04-06 16:27:01 +02:00
Lukas Nykryn 3186abd76e write-ifcfg: do't write MTU twice for regular eth devices
If MTU is specified, we write it for every type of device in the
beginning. There is not point writing it again for Type=ethernet
devices.
2017-04-06 16:27:01 +02:00
Lukas Nykryn a603e1f3a6 network/ifup: write override file before dhcp_do
Commit cf376023e6 moved writing .resolv.conf and .override
after dhcp_do, because dhcp_do was overwriting .resolv.conf. But .override does not have
such problem and on the contrary dhcp_do reads .override file if it is present. So let\'s
move it back.

https://bugzilla.redhat.com/show_bug.cgi?id=1415004
2017-03-24 10:34:27 +01:00
Xunlei Pang e186d99780 99base: apply kernel module memory debug support
Extend "rd.memdebug" to "4", and "make_trace_mem" to "4+:komem".
Add new "cleanup_trace_mem" to cleanup the trace if active.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2017-03-14 12:33:13 +01:00
Xunlei Pang 3ce2235abb 99base: add memtrace-ko.sh to debug kernel module large memory consumption
The current method for memory debug is to use "rd.memdebug=[0-3]",
it is not enough for debugging kernel modules. For example, when we
want to find out which kernel module consumes a large amount of memory,
"rd.memdebug=[0-3]" won't help too much.

A better way is needed to achieve this requirement, this is useful for
kdump OOM debugging.

The principle of this patch is to use kernel trace to track slab and
buddy allocation calls during kernel module loading(module_init), thus
we can analyze all the trace data and get the total memory consumption.
As for large slab allocation, it will probably fall into buddy allocation,
thus tracing "mm_page_alloc" alone should be enough for the purpose(this
saves quite some trace buffer memory, also large free is quite unlikey
during module loading, we neglect those memory free events).

The trace events include memory calls under "tracing/events/":
  kmem/mm_page_alloc

We also inpect the following events to detect the module loading:
  module/module_load
  module/module_put

Since we use filters to trace events, the final trace data size won't
be too big. Users can adjust the trace buffer size via "trace_buf_size"
kernel boot command line as needed.

We can get the module name and task pid from "module_load" event which
also mark the beginning of the loading, and module_put called by the
same task pid implies the end of the loading. So the memory events
recorded in between by the same task pid are consumed by this module
during loading(i.e. modprobe or module_init()).

With these information, we can record the rough total memory(the larger,
the more precise the result will be) consumption involved by each kernel
module loading.

Thus we introduce this shell script to find out which kernel module
consumes a large amount of memory during loading. Use "rd.memdebug=4"
as the tigger.

After applying this patch and specifying "rd.memdebug=4", during booting
it will print out something extra like below:
0 pages consumed by "pata_acpi"
0 pages consumed by "ata_generic"
1 pages consumed by "drm"
0 pages consumed by "ttm"
0 pages consumed by "drm_kms_helper"
835 pages consumed by "qxl"
0 pages consumed by "mii"
6 pages consumed by "8139cp"
0 pages consumed by "virtio"
0 pages consumed by "virtio_ring"
9 pages consumed by "virtio_pci"
1 pages consumed by "8139too"
0 pages consumed by "serio_raw"
0 pages consumed by "crc32c_intel"
199 pages consumed by "virtio_console"
0 pages consumed by "libcrc32c"
9 pages consumed by "xfs"

From the print, we see clearly that "qxl" consumed the most memory.

This file will be installed as a separate executable named "tracekomem"
in the following patch.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2017-03-14 12:33:07 +01:00
Harald Hoyer 72ae0fd418 systemd/dracut-cmdline.sh: unset "UNSET" $root
https://bugzilla.redhat.com/show_bug.cgi?id=1365667
caused by commit 9aa224cc
2017-01-18 13:13:44 +01:00
Harald Hoyer 1bb76cea72 fips/module-setup.sh: make tcrypt non-optional 2016-11-30 15:02:16 +01:00
Harald Hoyer 455f87f41f fips/fips.sh: also check for crypto-$mod in /proc/crypto
if the module name is the alias crypto-<algo>, check if <algo> is in
/proc/crypto as "name : <algo>" or "driver: <algo>"
2016-11-30 13:56:23 +01:00
Harald Hoyer 73cf135d80 fips/module-setup.sh: also blacklist the alias resolved modules 2016-11-30 13:54:20 +01:00
Lukas Nykryn 443d167a95 network: do not check "firmware boot selected flag"
Apparently it is not set correctly on some setups
https://bugzilla.redhat.com/show_bug.cgi?id=1380581
2016-10-05 17:46:36 +02:00
Harald Hoyer 33710dfbfc network: fix dhcp classless_static_routes
removed copy&paste artifact "modify_routes add"

there is no modify_routes() function, and we simply want the output
of the parse function.
2016-09-07 10:20:20 +02:00
Harald Hoyer c87d489ca6 network/parse-ip-opts: be more liberal to multiple ip= options
Do not bail out early.

https://bugzilla.redhat.com/show_bug.cgi?id=1304069
2016-09-07 10:20:20 +02:00
Harald Hoyer 99e72a4b1c fcoe: only install /etc/hba.conf, it it exists
https://bugzilla.redhat.com/show_bug.cgi?id=1369342
2016-09-07 10:17:43 +02:00
Harald Hoyer 8c67fb9123 nfs: install more kernel modules
adds support for rpcrdma to support NFSROOT over NFSoRDMA

https://bugzilla.redhat.com/show_bug.cgi?id=1367374
2016-08-19 15:56:47 +02:00
Harald Hoyer 1b23c6c65c url-lib: ca-bundle.crt changed to a symlink
use inst() instead of inst_simple()

/etc/pki/tls/certs/ca-bundle.crt is a symlink to
../../ca-trust/extracted/pem/tls-ca-bundle.pem

with inst() we install the original file also.

https://bugzilla.redhat.com/show_bug.cgi?id=1341280
2016-08-17 16:41:21 +02:00
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 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 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 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 7a90c8b343 network: support multiple vlan, team, bridge and bond 2016-07-04 16:28:08 +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 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