Skip to content

firewalld Service Duplicate Declaration #82

@valerahime

Description

@valerahime

I'm running into another issue with two dependencies on this module, puppetlabs-firewall and puppet-firewalld. After switching to the GitHub repo in my Puppetfile, I've consistently been getting errors with the two modules duplicating a service declaration for firewalld. I ran into this before with this module, but updating to 3.0.0 on the Puppet Forge fixed it.

Here's the error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Service[firewalld] is already declared at (file: /etc/puppetlabs/code/environments/development/modules/firewall/manifests/linux/redhat.pp, line: 54); cannot redeclare (file: /etc/puppetlabs/code/environments/development/modules/firewalld/manifests/init.pp, line: 78) (file: /etc/puppetlabs/code/environments/development/modules/firewalld/manifests/init.pp, line: 78, column: 3) on node [redacted]

I've tried disabling the ensure_firewalld_service_is_enabled_and_running rule as I think that's the main cause of the conflict, but haven't had any luck. A quick grep of the rest of the rules points to ensure_a_firewall_package_is_installed.pp as a potential problem, but I don't believe my code is triggering its else conditional.

    else {
      class { '::firewalld':
        default_zone              => 'drop',
        schedule                  => 'harden_schedule',
        purge_direct_rules        => true,
        purge_direct_chains       => true,
        purge_direct_passthroughs => true,
      }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions