systemd ignoring /etc/modules due to blacklist

Bug #1535840 reported by Paul Crawford on 2016-01-19
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Undecided
Unassigned

Bug Description

I tried the daily build of 16.04 32-bit to test out the watchdog daemon code. Usually (Ubuntu 10.04-14.04) I add the watchdog module in /etc/modules so it is loaded at boot-time, as watchdog timer modules are not normally auto-loaded due to the risk of an unexpected reboot.

However I now find that systemd is choosing to ignore my command to load the module in /etc/modules since it appears in the watchdog blacklist. Typical syslog entries look like this:

Jan 19 16:46:14 ubuntu systemd-modules-load[337]: Module 'softdog' is blacklisted
Jan 19 17:53:23 ubuntu systemd-modules-load[342]: Module 'softdog' is blacklisted

This is just dumb! I have explicitly told the system to load the module, an action that works perfectly well using modprobe or by adding it to the start script for the watchdog, and yet systemd chooses to override that because of the blacklist for auto-loaded modules (in this case in /etc/modprobe.d/blacklist-watchdog.conf).

$ lsb_release -rd
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04

$ apt-cache policy systemd
systemd:
  Installed: 228-4ubuntu1
  Candidate: 228-4ubuntu1
  Version table:
 *** 228-4ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status

What I expect to happen is modules added to /etc/modules are loaded at boot time, and not subject to the blacklist for hardware detect / automatic loading.

Olivier Louvignes (olouvignes) wrote :

I'm having the exact same issue, can't load watchdog TCO-related modules because they are blacklisted.

Did you find any workaround?

I don't want to mess with the blacklist list.

Paul Crawford (psc-sat) wrote :

Generally me work-around so far has been to avoid systemd!
However, where that is not an option you might be able to edit /etc/default/watchdog so the module is loaded on watchdog start-up. It is not ideal as you might have some other reasons for wanting the /dev/watchdog virtual file to be testable without the watchdog having started though (e.g. automated install script that probes harder support, etc).

Olivier Louvignes (olouvignes) wrote :

Thanks for the tip, will try that. What is extremely frustrating is that to unblacklist a module you have to edit 4 different, some dynamic files. I don't really get how such poor design could ever be validated. Maybe we're missing something (systemd config?).

```
# Blacklists that must be edited on 16.04:
root@toto:/lib/modprobe.d# grep -R iTCO_wdt /*/modprobe.d
/etc/modprobe.d/blacklist-watchdog.conf:# blacklist iTCO_wdt
/lib/modprobe.d/blacklist_linux_4.4.0-64-generic.conf:blacklist iTCO_wdt
/lib/modprobe.d/blacklist_linux-hwe-edge_4.8.0-34-generic.conf:blacklist iTCO_wdt
/lib/modprobe.d/blacklist_linux_4.4.0-63-generic.conf:blacklist iTCO_wdt
```

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Andrejs Bondarevs (abondarevs) wrote :

I'm having the same issue. In fact, removing iTCO_wdt from all blacklists doesn't solve the problem. At the boot I still get:

systemd-modules-load[365]: Module 'iTCO_wdt' is blacklisted

Adding the following to /etc/modprobe.d/watchdog.conf doesn't help either:

install /sbin/modprobe iTCO_wdt

Ingo Fischer (apollon77) wrote :

I also have this problem and it is stupid to have watchdog started manually using systemd after each (re)boot to work.

I have removed all blacklist-entries for iTCO_wdt and also rebuild initramfs ... but it still says at boot that module is blacklisted ... :-(

starox (starox) wrote :

Same problem here, once you have removed the modules from every blacklist files, you must update initramfs:

$ sudo update-initramfs -u

Then, it works ...

Ingo Fischer (apollon77) wrote :

I tried that but I had no success.

I now have the /etc/init.d/watchdog start in /etc/rc.local (systemctl did not worked that way) and so start using that

Sung Jeho (jehos) on 2017-11-25
Changed in systemd (Ubuntu):
status: Confirmed → Opinion

This problem still exists.

The problem is that these modules are listed in the blacklist files provided with the kernel(/lib/modprobe.d/blacklist_linux-*.conf). Given that these files aren't located in /etc they apparently are not configuration files. Also very new kernel package you get a new file with a different name.

Why are they blacklisted in this way? Why not only in /etc/modprobe.d/blacklist-watchdog.conf? Is there a way to overwrite this blacklisting through configuration files?

AW01545 (ricknickle) wrote :

Issue still exists in 18.04.

AW01545 (ricknickle) wrote :

In my case I'm trying to get softdog to load for SBD instead of the watchdog daemon.

I can see the point of marking it as opinion, but as Olivier points out, you have to eliminate the blacklist entry from all of the blacklists spammed into /lib/modprobe.d, systemd-modules-load does not discriminate for particular kernel versions and reads every .conf file.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers