iptables-persistent fails to install if module iptable_filter is not available
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
iptables-persistent (Debian) |
Fix Released
|
Unknown
|
|||
iptables-persistent (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In my case, I'm upgrading to Ubuntu 12.04 LTS from Ubuntu 11.10. The machine is hosted at Linode who compiles the netfilter modules into their kernels.
Error occurred during do-release-upgrade and here is the same error from apt-get install iptables-
Setting up iptables-persistent (0.5.3ubuntu2) ...
dpkg: error processing iptables-persistent (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
iptables-
E: Sub-process /usr/bin/dpkg returned an error code (1)
I traced this to /var/lib/
modprobe -q iptable_filter
If iptable_filter is not available as a module, modprobe returns a non-zero exit status which halts execution of the postinst script.
From "man modprobe" in the -q section:
However, it will still return with a non-zero exit status. The kernel uses this to opportunistically probe for modules which might exist using request_module.
Changing the modprobe calls to trap the errors using " || true" worked for me:
modprobe -q iptable_filter || true
Related branches
Changed in iptables-persistent (Debian): | |
importance: | Undecided → Unknown |
status: | Fix Released → Unknown |
Changed in iptables-persistent (Debian): | |
status: | Unknown → New |
Changed in iptables-persistent (Debian): | |
status: | New → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.