[go: up one dir, main page]

Page MenuHomePhabricator

puppet package install cycle with firewall::service, ferm/nftables and libnet-dns-perl
Closed, DuplicatePublic

Description

When using firewall::service and nftables as the firewall provider, ferm and packages installed by it are being removed by puppet.

This isn't an issue as long as libnet-dns-perl isn't installed by something else.

But some hosts, like lists and vrts install libnet-dns-perl for other unrelated reasons.

For example on lists, it's pulled in by spamd/spamassassin.

If such a host is switched to nftables there is a package installation cycle. On every single puppet run, libnet-dns-perl and with it spamd/spamassassin packages as well (!) get removed.

Then on the next run they get installed again.

Noticed by one of the "puppet change on every run" monitoring alerts.

The code that removes the package seems to be this directly in the ferm class:

class ferm (
    Wmflib::Ensure $ensure ='present'
) {
    # @resolve requires libnet-dns-perl
    package { ['iptables', 'libnet-dns-perl']:
        ensure => stdlib::ensure($ensure, package),
    }

In class firewall the whole ferm class is absented when ferm is not the firewall provider.

class firewall (
    Firewall::Provider $provider = 'none',
) {
    unless $provider == 'none' {
        class { 'ferm': # lint:ignore:wmf_styleguide
            ensure => stdlib::ensure($provider == 'ferm'),
        }

Needs a fix one way or another. Patches or just comments very welcome!

Event Timeline

Also more of a reminder and note to self. And wanted to share things I noticed while working on switching all our services to nftables which is T370677 and I thought infra foundations will like :)

@eoghan fyi, this is why puppet is disabled currently on lists1004. it does come from our change [https://gerrit.wikimedia.org/r/c/operations/puppet/+/1055492 gerrit:1055492] when we switched lists to nftables.

Also totally fine with just reverting that if this doesn't turn out to be simple enough to fix.

Dzahn updated the task description. (Show Details)
SLyngshede-WMF triaged this task as Low priority.

This is a duplicate of T373637 (resolved as of this morning), I'm merging the task into it.