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

remove _module from apache::mod::unique_id name. #2339

Conversation

mdklapwijk
Copy link
Contributor

@mdklapwijk mdklapwijk commented Oct 26, 2022

The unique_id module gets installed/loaded with its internal id 'unique_id_module' used as name; resulting in inconsistent naming and possible double entries if the module was already enabled outside of puppet (or security.pp).

@mdklapwijk mdklapwijk requested a review from a team as a code owner October 26, 2022 10:00
@puppet-community-rangefinder
Copy link

apache::mod::security is a class

that may have no external impact to Forge modules.

This module is declared in 175 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@CLAassistant
Copy link

CLAassistant commented Oct 26, 2022

CLA assistant check
All committers have signed the CLA.

@david22swan
Copy link
Member

@mdklapwijk Look's like this change is causing some failures in the unit tests.
Also, not entirely sure of the need behind it.

@mdklapwijk
Copy link
Contributor Author

@david22swan, the reason is partly about consistency througout this module:

root@kc-sys-01:~/gittmp/puppetlabs-apache# grep -ir "::apache::mod { 'uniq"
manifests/default_mods.pp:        ::apache::mod { 'unique_id': }
manifests/mod/security.pp:  ::apache::mod { 'unique_id_module':
root@kc-sys-01:~/gittmp/puppetlabs-apache# grep -ir "::apache::mod { '" | grep _module
manifests/mod/security.pp:  ::apache::mod { 'unique_id_module':
root@kc-sys-01:~/gittmp/puppetlabs-apache# grep -ir "::apache::mod { '"
spec/acceptance/default_mods_spec.rb:        ::apache::mod { 'auth_basic':
manifests/default_mods.pp:      ::apache::mod { 'log_config': }
manifests/default_mods.pp:            ::apache::mod { 'systemd': }
manifests/default_mods.pp:          ::apache::mod { 'systemd': }
manifests/default_mods.pp:        ::apache::mod { 'unixd': }
manifests/default_mods.pp:      ::apache::mod { 'log_config': }
manifests/default_mods.pp:      ::apache::mod { 'unixd': }
manifests/default_mods.pp:      ::apache::mod { 'log_config': }
manifests/default_mods.pp:      ::apache::mod { 'authz_host': }
manifests/default_mods.pp:          ::apache::mod { 'authn_alias': }
manifests/default_mods.pp:        ::apache::mod { 'auth_digest': }
manifests/default_mods.pp:        ::apache::mod { 'authn_anon': }
manifests/default_mods.pp:        ::apache::mod { 'authn_dbm': }
manifests/default_mods.pp:        ::apache::mod { 'authz_dbm': }
manifests/default_mods.pp:        ::apache::mod { 'authz_owner': }
manifests/default_mods.pp:        ::apache::mod { 'expires': }
manifests/default_mods.pp:        ::apache::mod { 'include': }
manifests/default_mods.pp:        ::apache::mod { 'logio': }
manifests/default_mods.pp:        ::apache::mod { 'substitute': }
manifests/default_mods.pp:        ::apache::mod { 'usertrack': }
manifests/default_mods.pp:          ::apache::mod { 'authn_alias': }
manifests/default_mods.pp:          ::apache::mod { 'authn_default': }
manifests/default_mods.pp:        ::apache::mod { 'asis': }
manifests/default_mods.pp:        ::apache::mod { 'auth_digest': }
manifests/default_mods.pp:        ::apache::mod { 'auth_form': }
manifests/default_mods.pp:        ::apache::mod { 'authn_anon': }
manifests/default_mods.pp:        ::apache::mod { 'authn_dbm': }
manifests/default_mods.pp:        ::apache::mod { 'authn_socache': }
manifests/default_mods.pp:        ::apache::mod { 'authz_dbd': }
manifests/default_mods.pp:        ::apache::mod { 'authz_dbm': }
manifests/default_mods.pp:        ::apache::mod { 'authz_owner': }
manifests/default_mods.pp:        ::apache::mod { 'dumpio': }
manifests/default_mods.pp:        ::apache::mod { 'expires': }
manifests/default_mods.pp:        ::apache::mod { 'file_cache': }
manifests/default_mods.pp:        ::apache::mod { 'imagemap': }
manifests/default_mods.pp:        ::apache::mod { 'include': }
manifests/default_mods.pp:        ::apache::mod { 'logio': }
manifests/default_mods.pp:        ::apache::mod { 'request': }
manifests/default_mods.pp:        ::apache::mod { 'session': }
manifests/default_mods.pp:        ::apache::mod { 'unique_id': }
manifests/default_mods.pp:      ::apache::mod { 'authz_core':
manifests/default_mods.pp:      ::apache::mod { 'access_compat': }
manifests/default_mods.pp:      ::apache::mod { 'authz_core':
manifests/default_mods.pp:      ::apache::mod { 'authz_core':
manifests/mod/setenvif.pp:  ::apache::mod { 'setenvif': }
manifests/mod/authz_user.pp:  ::apache::mod { 'authz_user': }
manifests/mod/dir.pp:  ::apache::mod { 'dir': }
manifests/mod/ssl.pp:    ::apache::mod { 'ssl':
manifests/mod/ssl.pp:    ::apache::mod { 'ssl':
manifests/mod/authnz_ldap.pp:  ::apache::mod { 'authnz_ldap':
manifests/mod/include.pp:  ::apache::mod { 'include': }
manifests/mod/proxy_html.pp:      ::apache::mod { 'xml2enc': }
manifests/mod/proxy_html.pp:        ::apache::mod { 'xml2enc': }
manifests/mod/proxy_html.pp:  ::apache::mod { 'proxy_html':
manifests/mod/perl.pp:  ::apache::mod { 'perl': }
manifests/mod/cache.pp:  ::apache::mod { 'cache': }
manifests/mod/xsendfile.pp:  ::apache::mod { 'xsendfile': }
manifests/mod/jk.pp:  ::apache::mod { 'jk': }
manifests/mod/autoindex.pp:  ::apache::mod { 'autoindex': }
manifests/mod/proxy_fcgi.pp:  ::apache::mod { 'proxy_fcgi': }
manifests/mod/apreq2.pp:  ::apache::mod { 'apreq2':
manifests/mod/auth_mellon.pp:  ::apache::mod { 'auth_mellon': }
manifests/mod/auth_kerb.pp:  ::apache::mod { 'auth_kerb': }
manifests/mod/version.pp:    ::apache::mod { 'version': }
manifests/mod/authz_default.pp:    ::apache::mod { 'authz_default': }
manifests/mod/expires.pp:  ::apache::mod { 'expires': }
manifests/mod/dav.pp:  ::apache::mod { 'dav': }
manifests/mod/python.pp:  ::apache::mod { 'python':
manifests/mod/cgi.pp:    ::apache::mod { 'cgi':
manifests/mod/cgi.pp:    ::apache::mod { 'cgi': }
manifests/mod/dumpio.pp:  ::apache::mod { 'dumpio': }
manifests/mod/geoip.pp:  ::apache::mod { 'geoip': }
manifests/mod/proxy_balancer.pp:    ::apache::mod { 'slotmem_shm': }
manifests/mod/proxy_balancer.pp:  ::apache::mod { 'proxy_balancer': }
manifests/mod/reqtimeout.pp:  ::apache::mod { 'reqtimeout': }
manifests/mod/proxy_wstunnel.pp:  ::apache::mod { 'proxy_wstunnel': }
manifests/mod/env.pp:  ::apache::mod { 'env': }
manifests/mod/wsgi.pp:    ::apache::mod { 'wsgi':
manifests/mod/wsgi.pp:    ::apache::mod { 'wsgi': }
manifests/mod/authn_dbd.pp:  ::apache::mod { 'authn_dbd': }
manifests/mod/auth_cas.pp:  ::apache::mod { 'auth_cas': }
manifests/mod/speling.pp:  ::apache::mod { 'speling': }
manifests/mod/authn_core.pp:    ::apache::mod { 'authn_core': }
manifests/mod/dav_fs.pp:  ::apache::mod { 'dav_fs': }
manifests/mod/userdir.pp:  ::apache::mod { 'userdir': }
manifests/mod/proxy_http.pp:  ::apache::mod { 'proxy_http': }
manifests/mod/dbd.pp:  ::apache::mod { 'dbd': }
manifests/mod/status.pp:  ::apache::mod { 'status': }
manifests/mod/ext_filter.pp:  ::apache::mod { 'ext_filter': }
manifests/mod/proxy_ajp.pp:  ::apache::mod { 'proxy_ajp': }
manifests/mod/rewrite.pp:  ::apache::mod { 'rewrite': }
manifests/mod/fcgid.pp:  ::apache::mod { 'fcgid':
manifests/mod/rpaf.pp:  ::apache::mod { 'rpaf': }
manifests/mod/intercept_form_submit.pp:  ::apache::mod { 'intercept_form_submit': }
manifests/mod/security.pp:  ::apache::mod { 'unique_id_module':
manifests/mod/socache_shmcb.pp:  ::apache::mod { 'socache_shmcb': }
manifests/mod/cluster.pp:  ::apache::mod { 'proxy': }
manifests/mod/cluster.pp:  ::apache::mod { 'proxy_ajp': }
manifests/mod/cluster.pp:  ::apache::mod { 'manager': }
manifests/mod/cluster.pp:  ::apache::mod { 'proxy_cluster': }
manifests/mod/cluster.pp:  ::apache::mod { 'advertise': }
manifests/mod/cluster.pp:    ::apache::mod { 'cluster_slotmem': }
manifests/mod/cluster.pp:    ::apache::mod { 'slotmem': }
manifests/mod/authnz_pam.pp:  ::apache::mod { 'authnz_pam': }
manifests/mod/filter.pp:  ::apache::mod { 'filter': }
manifests/mod/headers.pp:  ::apache::mod { 'headers': }
manifests/mod/dav_svn.pp:  ::apache::mod { 'dav_svn': }
manifests/mod/dav_svn.pp:    ::apache::mod { 'authz_svn':
manifests/mod/data.pp:  ::apache::mod { 'data': }
manifests/mod/suexec.pp:  ::apache::mod { 'suexec': }
manifests/mod/vhost_alias.pp:  ::apache::mod { 'vhost_alias': }
manifests/mod/lookup_identity.pp:  ::apache::mod { 'lookup_identity': }
manifests/mod/deflate.pp:  ::apache::mod { 'deflate': }
manifests/mod/macro.pp:  ::apache::mod { 'macro': }
manifests/mod/negotiation.pp:  ::apache::mod { 'negotiation': }
manifests/mod/auth_basic.pp:  ::apache::mod { 'auth_basic': }
manifests/mod/proxy.pp:  ::apache::mod { 'proxy':
manifests/mod/info.pp:    ::apache::mod { 'info':
manifests/mod/info.pp:    ::apache::mod { 'info': }
manifests/mod/ldap.pp:  ::apache::mod { 'ldap':
manifests/mod/passenger.pp:    ::apache::mod { 'passenger':
manifests/mod/remoteip.pp:  ::apache::mod { 'remoteip': }
manifests/mod/authn_file.pp:  ::apache::mod { 'authn_file': }
manifests/mod/cgid.pp:    ::apache::mod { 'cgid':
manifests/mod/cgid.pp:    ::apache::mod { 'cgid': }

But mostly about it resulting into the module enabled twice under certain conditions:

root@server-05:~# l /etc/apache2/mods-enabled/uniq*
lrwxrwxrwx 1 root root 32 Nov 21 16:13 /etc/apache2/mods-enabled/unique_id.load -> ../mods-available/unique_id.load
lrwxrwxrwx 1 root root 49 Nov 21 16:12 /etc/apache2/mods-enabled/unique_id_module.load -> /etc/apache2/mods-available/unique_id_module.load
root@server-05:~# l /etc/apache2/mods-available/uniq*
-rw-r--r-- 1 root root 70 Jun  9 06:22 /etc/apache2/mods-available/unique_id.load
-rw-r--r-- 1 root root 70 Nov 21 16:12 /etc/apache2/mods-available/unique_id_module.load
root@server-05:~# md5sum /etc/apache2/mods-available/uniq*
6c13959015fb35276572070b44e63380  /etc/apache2/mods-available/unique_id.load
6c13959015fb35276572070b44e63380  /etc/apache2/mods-available/unique_id_module.load

@mdklapwijk
Copy link
Contributor Author

I have no idea why those 2 spec tests are failing, as they only state exit 1 without any failures:

...
Finished in 20 minutes 19 seconds (files took 12.22 seconds to load)
5060 examples, 0 failures

Tests Failed

7324 examples, 14 failures

Took 1231 seconds (20:31)
Error: exit status 1
Error: Process completed with exit code 1.
...

@mdklapwijk mdklapwijk force-pushed the patch-mod-security-unique_id-naming branch from 00881da to cd9673b Compare November 21, 2022 15:33
@ekohl
Copy link
Collaborator

ekohl commented Nov 21, 2022

I have no idea why those 2 spec tests are failing, as they only state exit 1 without any failures:

We actually have multiple rspec processes running in parallel and they all report their failures separate. It's a trade off between performance and usefulness.

puppetlabs/puppetlabs_spec_helper@8eaa209 should make it easier to see in CI, but is currently unreleased.

Copy link
Member

@david22swan david22swan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Reason behind the change seems logical to me and everything is green so happy to merge.

@david22swan david22swan merged commit 1d2302d into puppetlabs:main Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants