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 <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2022-05-16 17:11:27 -07:00
parent 35df2de4c9
commit 6f92ba3b9a
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# nbde_client dracut config
kernel_cmdline="ip=dhcp"
omit_dracutmodules+=" ifcfg "

View file

@ -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