Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firewalld module redirect not working? #1940

Closed
geerlingguy opened this issue Mar 1, 2021 · 6 comments
Closed

Firewalld module redirect not working? #1940

geerlingguy opened this issue Mar 1, 2021 · 6 comments
Labels
bug This issue/PR relates to a bug needs_info This issue requires further information. Please answer any outstanding questions needs_triage python3

Comments

@geerlingguy
Copy link
Contributor

geerlingguy commented Mar 1, 2021

Summary

It seems like calls to the firewalld module in Ansible 2.10+ are not redirecting to the right place...

I get the following error message in my CI builds now:

The module firewalld was redirected to community.general.firewalld, which could not be loaded.

I'm not sure if this a bug in Ansible 2.10.x or 3.x, Ansible Core 2.10.x, or this collection, but I figured I'd start here.

Issue Type

Bug Report

Component Name

firewalld (since migrated to posix collection)

Ansible Version

ansible 2.10.5
  config file = /Users/jgeerling/Dropbox/VMs/docker/solr-container/ansible.cfg
  configured module search path = ['/Users/jgeerling/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.9.1 (default, Dec 17 2020, 10:08:12) [Clang 12.0.0 (clang-1200.0.32.27)]

Configuration

ANSIBLE_NOCOWS(/Users/jgeerling/Dropbox/VMs/docker/solr-container/ansible.cfg) = True
DEFAULT_ROLES_PATH(/Users/jgeerling/Dropbox/VMs/docker/solr-container/ansible.cfg) = ['/Users/jgeerling/Dropbox/VMs/dock
RETRY_FILES_ENABLED(/Users/jgeerling/Dropbox/VMs/docker/solr-container/ansible.cfg) = False

OS / Environment

macOS, Linux (Ubuntu, GitHub Actions CI).

Steps To Reproduce

  1. Install Ansible with Pip (pip install ansible).
  2. Call the firewalld module using Ansible's CLI (no FQCN):
ansible db -b -m firewalld -a "zone=database state=present permanent=yes"

Expected Results

The firewalld call should be redirected to wherever it is now, so I can write commands that are compatible with both Ansible 2.9 (and lower) and Ansible 2.10/3.0+.

Actual Results

db | FAILED! => {
    "msg": "The module firewalld was redirected to community.general.firewalld, which could not be loaded."
}

Related:

@ansibullbot
Copy link
Collaborator

Files identified in the description:
None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@geerlingguy
Copy link
Contributor Author

geerlingguy commented Mar 1, 2021

Could this PR be the ultimate fix? ansible/ansible#73689

Honestly, trying to follow the breadcrumbs on these redirects is more than mildly frustrating :P

@russoz
Copy link
Collaborator

russoz commented Mar 1, 2021

Could this PR be the ultimate fix? ansible/ansible#73689

It does look like the right way to go, IMHO.

Honestly, trying to follow the breadcrumbs on these redirects is more than mildly frustrating :P

Well, the split from ansible repo to collections is somewhat recent, I am actually surprised not to have seen more cases like that before.

@felixfontein
Copy link
Collaborator

felixfontein commented Mar 1, 2021

@geerlingguy yes, ansible/ansible#73689 is the correct fix. The module was supposed to be redirected correctly in ansible-base 2.10.0 already, but apparently the redirect there was incomplete. Unfortunately nobody reported the deprecation message that was shown because of the wrong redirect, so this only surfaced when the module was actually removed in community.general 2.0.0... (The deprecation was only left there for people who started using the c.g FQCN in community.general < 1.0.0, but should have been visible to anyone using the short name with Ansible 2.10 as well.)

For now the workaround is to use the correct FQCN (ansible.posix.firewalld).

@aminvakil
Copy link
Contributor

@geerlingguy As ansible/ansible#73689 has been merged, can you confirm this has been fixed?

needs_info

@ansibullbot ansibullbot added the needs_info This issue requires further information. Please answer any outstanding questions label May 11, 2021
@felixfontein
Copy link
Collaborator

I think it's safe to say this is now fixed, assuming you don't use a too old version of ansible-base 2.10 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug needs_info This issue requires further information. Please answer any outstanding questions needs_triage python3
Projects
None yet
Development

No branches or pull requests

5 participants