saltstack-formulas / apache-formula

Set up and configure the Apache HTTP server
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
50 stars 285 forks source link

[BUG] apache.config.modules.mod_wsgi fails, pkg: apache not found #370

Open iaingeorgeson opened 3 years ago

iaingeorgeson commented 3 years ago

Your setup

Formula commit hash / release tag

v1.1.8

Versions reports (master & minion)

Salt Version: Salt: 3003.2

Dependency Versions: cffi: Not Installed cherrypy: unknown dateutil: 2.7.3 docker-py: Not Installed gitdb: 2.0.5 gitpython: 2.1.11 Jinja2: 2.10 libgit2: Not Installed M2Crypto: 0.31.0 Mako: Not Installed msgpack: 0.5.6 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: Not Installed pycrypto: 2.6.1 pycryptodome: 3.6.1 pygit2: Not Installed Python: 3.7.3 (default, Jan 22 2021, 20:04:44) python-gnupg: Not Installed PyYAML: 3.13 PyZMQ: 17.1.2 smmap: 2.0.5 timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.3.1

System Versions: dist: debian 10 buster locale: UTF-8 machine: x86_64 release: 4.19.0-17-cloud-amd64 system: Linux version: Debian GNU/Linux 10 buster

Pillar / config used


Bug details

Describe the bug

Including apache.config.modules.mod_wsgi fails. pkg: apache-config-modules-wsgi-pkg attempts to require pkg: apache, but that state no longer exists. The correct name is now apache-package-install-pkg-installed

https://github.com/saltstack-formulas/apache-formula/blob/v1.1.8/apache/config/modules/mod_wsgi.sls#L17

The mod_ssl.sls state in the same directory uses the correct pkg name.

Steps to reproduce the bug

include: [...]

Expected behaviour

mod_wsgi is enabled.

Actual behaviour:

      ID: apache-config-modules-wsgi-pkg
Function: pkg.installed
    Name: mod_wsgi
  Result: False
 Comment: The following requisites were not found:
                             require:
                                 pkg: apache

Attempts to fix the bug

Additional context

iaingeorgeson commented 3 years ago

It looks like the map values used by this sls file are also incorrect in the files used by map.jinja - at least for Ubuntu 20.4. That's apache.pkg.mod_wsgi and apache.conf_mod_wsgi.

myii commented 2 years ago

Thanks for this report, @iaingeorgeson. Apologies for the delayed response.

This was discussed in one of the recent Formulas working group meetings. The main bug has been fixed in 1002efa90920c38b77bdb35e8d741eed636f359a. A secondary issue was also resolved by c4dce0747667f2befe9bf4f16775fa7656b700d6.

It looks like the map values used by this sls file are also incorrect in the files used by map.jinja - at least for Ubuntu 20.4. That's apache.pkg.mod_wsgi and apache.conf_mod_wsgi.

Would you mind linking to the specific parts in the YAML files? That will help address this problem.