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

Apache2 module workaround for Shibboleth needs updating #1379

Closed
peter- opened this issue Nov 24, 2020 · 7 comments · Fixed by #1383
Closed

Apache2 module workaround for Shibboleth needs updating #1379

peter- opened this issue Nov 24, 2020 · 7 comments · Fixed by #1383
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type) web_infrastructure

Comments

@peter-
Copy link
Contributor

peter- commented Nov 24, 2020

SUMMARY

The workaround for Shibboleth previously added in #20341 no longer works (on Debian 10) since the module name has meanwhile been changed from shib2 (for which a workaround currently exists) to shib (to account for the increasingly unfortunate naming shib2 when the software currently has a major version of 3) which is not covered by the workaround.

Since upstream is unable to change the module identifer (easily, without causing breakage) the obvious and simple fix would be to amend the existing workaround to also match the current (and likely to remain that way in the future) module name, taking into account that different versions of the module may be in use:

# web_infrastructure/apache2_module.py
    # a2enmod name replacement to apache2ctl -M names
    text_workarounds = [
-       ('shib2', 'mod_shib'),
+       ('shib', 'mod_shib'),
+       ('shib2', 'mod_shib'),
        ('evasive', 'evasive20_module'),
    ]

Once (if ever) the module identifier changes upstream to match the Apache httpd convension the workaround can be removed.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

apache2_module

ANSIBLE VERSION

Current main branch.

STEPS TO REPRODUCE

See #20288, i.e., the behaviour matches the pre-workaround one exactly since the module name is no longer matched.
Ansible again fails with "Maybe the module identifier (shib) was guessed incorrectly":

failed: [filesender.lab.aco.net] (item=shib) => changed=false 
  ansible_loop_var: item
  item: shib
  msg: |-
    Failed to set module   shib
     to enabled:
    Module shib already enabled
  
    Maybe the module identifier (shib) was guessed incorrectly.Consider setting the "identifier" option.
  rc: 0
  stderr: ''
  stderr_lines: <omitted>
  stdout: |-
    Module shib already enabled
  stdout_lines: <omitted>
@ansibullbot
Copy link
Collaborator

Files identified in the description:

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

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug module module needs_triage plugins plugin (any type) web_infrastructure labels Nov 24, 2020
@felixfontein
Copy link
Collaborator

Feel free to create a PR. (If you do, please include a changelog fragment.)

@peter-
Copy link
Contributor Author

peter- commented Nov 24, 2020

Feel free to create a PR. (If you do, please include a changelog fragment.)

@felixfontein: Btw, how would I create a changelog fragment named after the PR number ("To create a changelog entry, create a new file with a unique name in the changelogs/fragments/ directory of the corresponding repository. The file name should include the PR number") when I add and commit the fragment file before ever creating the PR and hence don't know the PR number at the time I commit the changes? Create file with bogus name, commit, create PR with bogus file name, git rename file based on assignd PR number, push changes to feature branch, possibly forcing push? All that for a single line PR?

@felixfontein
Copy link
Collaborator

@peter- you could just create the PR without the fragment, and then add another commit with the fragment.

felixfontein added a commit that referenced this issue Nov 26, 2020
* Add another shib module identifier to apache2 module (#1379)

* Update changelogs/fragments/1383-apache2-module-amend-shib-workaround.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>
patchback bot pushed a commit that referenced this issue Nov 26, 2020
* Add another shib module identifier to apache2 module (#1379)

* Update changelogs/fragments/1383-apache2-module-amend-shib-workaround.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 382be57)
felixfontein pushed a commit that referenced this issue Nov 26, 2020
* Add another shib module identifier to apache2 module (#1379)

* Update changelogs/fragments/1383-apache2-module-amend-shib-workaround.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 382be57)

Co-authored-by: peter <peter-@users.noreply.github.com>
@thizmo
Copy link

thizmo commented Dec 6, 2021

Good morning,

i happen to have the problem still with ansible 2.9.27 on Ubuntu 20.04.LTS

When i add the fix manually to the module, the problem is fixed.

Thx.

@felixfontein
Copy link
Collaborator

@thizmo are you using the modules from the community.general collection (which have been fixed a long time ago), or are you the modules included in Ansible 2.9 (which have not been fixed and will never get fixed)?

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 module module plugins plugin (any type) web_infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants