Due to the package name of mod_wsgi being python39-mod_wsgi in python 3.9 I'm unable to install on RHEL8.
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 7.18.0
- Ruby: 2.7.0
- Distribution: RHEL 8
- Module version: v9.0.0
How to reproduce (e.g Puppet code you use)
$page_title = "${environment} - Puppetboard"
class { 'puppetboard':
version => '4.0.3',
python_version => '3.9',
offline_mode => true,
groups => 'root',
homedir => '/srv/puppetboard',
manage_git => false,
manage_virtualenv => true,
manage_selinux => false,
puppetdb_host => $puppetboard_certname,
puppetdb_port => 8081,
puppetdb_key => "/etc/httpd/ssl/private_keys/${puppetboard_certname}.pem",
puppetdb_ssl_verify => '/etc/httpd/ssl/certs/ca.pem',
puppetdb_cert => "/etc/httpd/ssl/certs/${puppetboard_certname}.pem",
reports_count => 100,
default_environment => '*',
enable_catalog => true,
extra_settings => { 'PAGE_TITLE' => "\"${page_title}\"", },
}
class { 'puppetboard::apache::vhost':
vhost_name => $puppetboard_certname,
ssl => true,
ssl_cert => "/etc/pki/tls/certs/${trusted['hostname']}.crt",
ssl_key => "/etc/pki/tls/private/${trusted['hostname']}.key",
port => 443,
}
What are you seeing
puppet agent -t --environment dev
Info: Using environment 'dev'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppetboard.internal
Info: Applying configuration version 'puppet-dev-162b8843a30'
Notice: /Stage[main]/Puppetboard/File[/srv/puppetboard]/ensure: created (corrective)
Notice: /Stage[main]/Puppetboard/File[/srv/puppetboard/puppetboard]/ensure: created (corrective)
Notice: /Stage[main]/Puppetboard/File[/srv/puppetboard/puppetboard/settings.py]/ensure: defined content as '{sha256}f7aee1d278f518cc163188e6a8fead9b65a73fc83eeeb27b78d6946f734713e3' (corrective)
Info: /Stage[main]/Puppetboard/File[/srv/puppetboard/puppetboard/settings.py]: Scheduling refresh of Service[httpd]
Notice: /Stage[main]/Puppetboard::Apache::Vhost/File[/srv/puppetboard/puppetboard/wsgi.py]/ensure: defined content as '{sha256}a13cf924517e3a845432adfa66cdb21d461c8f6e5465d46b5afc23fef5e4765e' (corrective)
Notice: /Stage[main]/Puppetboard/Python::Pyvenv[/srv/puppetboard/virtenv-puppetboard]/File[/srv/puppetboard/virtenv-puppetboard]/ensure: created (corrective)
Notice: /Stage[main]/Puppetboard/Python::Pyvenv[/srv/puppetboard/virtenv-puppetboard]/Exec[python_virtualenv_/srv/puppetboard/virtenv-puppetboard]/returns: executed successfully (corrective)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: executed successfully (corrective)
Notice: /Stage[main]/Apache::Mod::Wsgi/Apache::Mod[wsgi]/Package[python3-mod_wsgi]/ensure: created (corrective)
Info: /Stage[main]/Apache::Mod::Wsgi/Apache::Mod[wsgi]/Package[python3-mod_wsgi]: Scheduling refresh of Class[Apache::Service]
Notice: /Stage[main]/Apache/File[/etc/httpd/conf.modules.d/10-wsgi-python3.conf]/ensure: removed
Info: /etc/httpd/conf.modules.d: Scheduling refresh of Class[Apache::Service]
Info: Class[Apache::Service]: Scheduling refresh of Service[httpd]
Notice: /Stage[main]/Apache::Service/Service[httpd]: Triggered 'refresh' from 2 events
Notice: Applied catalog in 30.27 seconds
Agent installs python3-mod_wsgi regardless of the python_version specified, results in internal server error due to virtualenv running python3.9 and mod_wsgi being 3.6
What behaviour did you expect instead
Specifying python 3.9 and RHEL 8 should modify apache::mod::wsgi::package_name and apache::mod::wsgi::mod_path
Output log
Any additional information you'd like to impart
Was able to "Hack" a way around it by editing puppetboard/manifests/apache/vhost.pp
$wsgi = $facts['os']['family'] ? {
'Debian' => {
package_name => 'libapache2-mod-wsgi-py3',
mod_path => '/usr/lib/apache2/modules/mod_wsgi.so',
},
'RedHat' => {
package_name => 'python39-mod_wsgi',
mod_path => "/usr/lib64/python3.9/site-packages/mod_wsgi/server/mod_wsgi-py39.cpython-39-x86_64-linux-gnu.so",
},
default => {},
}
class { 'apache::mod::wsgi':
* => $wsgi,
}
This is extremely crude but get's me round the issue for now.
Due to the package name of mod_wsgi being python39-mod_wsgi in python 3.9 I'm unable to install on RHEL8.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
Agent installs python3-mod_wsgi regardless of the python_version specified, results in internal server error due to virtualenv running python3.9 and mod_wsgi being 3.6
What behaviour did you expect instead
Specifying python 3.9 and RHEL 8 should modify
apache::mod::wsgi::package_nameandapache::mod::wsgi::mod_pathOutput log
Any additional information you'd like to impart
Was able to "Hack" a way around it by editing
puppetboard/manifests/apache/vhost.ppThis is extremely crude but get's me round the issue for now.