Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dracut-module-setup: consolidate s390 network device config (#1937048)
This is a preparation for consolidating s390 network device config with dracutdevs/dracut#2534 ("feat(znet): use zdev for consolidated device configuration") https://github.com/steffen-maier/s390utils/pull/1/commits ("znet: migrate to consolidated persistent device config with zdev (#1937046,#1937048))" ("znet: clean up old deprecated persistent device config (#1937046,#1937048)"). With above consolidation, s390-specific low-level configuration information will no longer be in NetworkManager connections (nor ifcfg files), but in the persistent configuration database of chzdev from s390-tools. Since the kdump dracut module here depends on the "znet" dracut module [1] and "znet" will copy all persistent configuration into initrd as of above commit, all s390-specific information would already be in the kdump initrd. [1] 08de712 ("Move some dracut module dependencies checks to module-setup.sh"), 7148c0a ("add s390x netdev setup") However, it is more appropriate and also removes the copy dependency from "znet" to introduce the consolidated zdev mechanism for importing just the required network device config from the current active system configuration. It does not depend on any of the pull requests above. It does not depend on any existing persistent configuration and can replace the old function code. This is similar to dracut block device dependency handling in s390-tools zdev/dracut/95zdev-kdump. The old code only seems to work if there is exactly one s390-specific nmconnection (or ifcfg file). Related commits: b5577c1 ("Simplify setup_znet by copying connection profile to initrd"), 7d47251 ("Iterate /sys/bus/ccwgroup/devices to tell if we should set up rd.znet"), 8b08b4f ("Set up s390 znet cmdline by "nmcli --get-values""), ce0305d ("Add a new option 'rd.znet_ifname' in order to use it in udev rules"), 7148c0a ("add s390x netdev setup"). A bonding or teaming setup would have multiple following network interfaces, each of which would need a low-level config if they're s390 channel-attached network devices. The new code should be able to handle that by iterating the involved network interfaces. Chzdev only exports something if it's a device type it deems itself responsible for. Additional debugging output can be generated with e.g. dracut option "--stdlog 5" (or short -L5). It shows the chzdev export result, the output of chzdev export and import, and an overview of the resulting persistent config within the initrd. On systems, which default to using dracut option "--quiet", you might need an additional "--verbose" to counter "--quiet" so -L5 has effect. Typically combined with "--debug" to get a shell trace from building an initrd (Note: --debug does not increase the log levels). Signed-off-by: Steffen Maier <[email protected]> Reviewed-by: Philipp Rudo <[email protected]> Reviewed-by: Coiby Xu <[email protected]>
- Loading branch information