From 6f92ba3b9a0368767be5648278fdcb9fe9503c1c Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 16 May 2022 17:11:27 -0700 Subject: [PATCH] nbde_client: workaround bug in dracut In RHEL8.0->8.2 this all worked fine, because dracut was using legacy networking. So, needsneed=1 would bring up network, it would not save it to ifcfg files due to removing that dracut module all then NM would take over. However, on RHEL8.3+ dracut started using NetworkManager. So, it would bring up network, nbde_client would flush those so they had no ip's on them, but dracut would hand off a "Wired Connection" NM profile (even tho the interface had no ips now). It would then of course activate it and boom, mess up your real Networking. It seems the logic for handing off this network config is pivoting on needsnet=1. So, if we switch to just 'ip=dhcp' it works and doesn't mess with your real networking. TODO: report this and try and get a real fix in either nbde_client or dracut or both. Signed-off-by: Kevin Fenzi --- files/hotfix/nbde_client.conf | 3 +++ playbooks/groups/virthost.yml | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 files/hotfix/nbde_client.conf diff --git a/files/hotfix/nbde_client.conf b/files/hotfix/nbde_client.conf new file mode 100644 index 0000000000..579fab6850 --- /dev/null +++ b/files/hotfix/nbde_client.conf @@ -0,0 +1,3 @@ +# nbde_client dracut config +kernel_cmdline="ip=dhcp" +omit_dracutmodules+=" ifcfg " diff --git a/playbooks/groups/virthost.yml b/playbooks/groups/virthost.yml index 4dd4265dcd..caad509890 100644 --- a/playbooks/groups/virthost.yml +++ b/playbooks/groups/virthost.yml @@ -18,6 +18,14 @@ - include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README - import_tasks: "{{ tasks_path }}/yumrepos.yml" + - name: override nbde_client.conf to work around bug + copy: + src: "{{ files }}/hotfix/nbde_client.conf" + dest: /etc/dracut.conf.d/nbde_client.conf + owner: root + group: root + mode: 444 + roles: - base - rkhunter