puppet-puppetboard icon indicating copy to clipboard operation
puppet-puppetboard copied to clipboard

Support wsgi on python 3.8 and 3.9 on rhel8

Open teluq-pbrideau opened this issue 3 years ago • 12 comments

Pull Request (PR) description

As inspired by issue mentioned, this fix the install of wsgi for python 3.8 and 3.9 on rhel. There is no need to set to specific mod_path as the packages provides the file in httpd/modules

yum provides /usr/lib64/httpd/modules/mod_wsgi_python3.so
python3-mod_wsgi-4.6.4-4.el8.x86_64 : A WSGI interface for Python web applications in Apache
Repo        : appstream
Matched from:
Filename    : /usr/lib64/httpd/modules/mod_wsgi_python3.so

python38-mod_wsgi-4.6.8-3.module+el8.4.0+570+c2eaf144.x86_64 : A WSGI interface for Python web applications in Apache
Repo        : appstream
Matched from:
Filename    : /usr/lib64/httpd/modules/mod_wsgi_python3.so

python39-mod_wsgi-4.7.1-4.module+el8.4.0+574+843c4898.x86_64 : A WSGI interface for Python web applications in Apache
Repo        : appstream
Matched from:
Filename    : /usr/lib64/httpd/modules/mod_wsgi_python3.so

I’m not a very confident test writer, but I did my best to test the changes I made. Please suggest what could be done better if you think it is required.

This Pull Request (PR) fixes the following issues

Fixes #369

teluq-pbrideau avatar Oct 13 '22 16:10 teluq-pbrideau

Hi @teluq-pbrideau, thanks for your contribution! I wanted to help as I have some experience with a similar thing from #370. Initially I pushed some changes directly to your branch - sorry for that! 😓 - but I reverted them now. I am doing my further experiments on it's copy, here https://github.com/voxpupuli/puppet-puppetboard/pull/373.

gdubicki avatar Oct 27 '22 15:10 gdubicki

@gdubicki Thanks for what you tried, no problems. I did install my infrastructure with different profiles for puppetdb and postgersql on my side, so i did not notice these bugs on the puppetboard class. Maybe we should try to fix #364 and merge before merging my PR?

teluq-pbrideau avatar Oct 27 '22 16:10 teluq-pbrideau

It seems to be a problem about upstream configuration about puppetdb itself. On my side, i’ve configured my infrastructure with

  package { 'postgresql-module':
    ensure      => '13',
    name        => 'postgresql',
    enable_only => true,
    provider    => 'dnfmodule',
  }
  class { 'puppetdb::database::postgresql' :
    listen_addresses    => '0.0.0.0',
    postgres_version    => '10',
    manage_package_repo => false,
    manage_server       => false,
    database_password   => $db_password.unwrap,
  }

as a weird hack that gets around installing correctly postgres

Is the upstream puppetdb module run the acceptance test on centos successfully?

teluq-pbrideau avatar Oct 27 '22 16:10 teluq-pbrideau

(Yes, sorry @teluq-pbrideau, I moved your comment here.)

gdubicki avatar Oct 27 '22 16:10 gdubicki

Is the upstream puppetdb module run the acceptance test on centos successfully?

No, but it's hard to tell why as the logs are gone, see https://github.com/puppetlabs/puppetlabs-puppetdb/actions/runs/2064063268 ....

But it seems that the default installed Postgres version is 11 (https://github.com/puppetlabs/puppetlabs-puppetdb/blob/main/manifests/params.pp#L29), while this package does not seem to exist for Centos / Redhat 8 as both our Ci logs say:

Error: /Stage[main]/Postgresql::Server::Install/Package[postgresql-server]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/dnf -d 0 -e 1 -y install postgresql11-server' returned 1: Error: Unable to find a match: postgresql11-server

~...as well as the Postgres docs: https://www.postgresql.org/download/linux/redhat/~ No, sorry I misunderstood this. There is Postgres 11 for RHEL/Centos 8, it's just not included in the distro.

gdubicki avatar Oct 27 '22 16:10 gdubicki

~~Would it be possible to merge this PR now that the test pass successfully? At lest start again the process to review this? Thanks~~

Nevermind, just rebase from master, and test fail, I’ll work on them

teluq-pbrideau avatar Dec 05 '23 18:12 teluq-pbrideau

Only Ubuntu 18.04 is failing right now, which is an EOL OS, so you may remove support for that OS.

kenyon avatar Dec 05 '23 19:12 kenyon

@kenyon I’m not sure if it is the only place, I've found references on ubuntu 18.04 in metadata.json and .sync.yml, should I change something else?

teluq-pbrideau avatar Dec 05 '23 20:12 teluq-pbrideau

@teluq-pbrideau you can also remove https://github.com/voxpupuli/puppet-puppetboard/blob/master/data/os/Ubuntu.16.04.yaml and https://github.com/voxpupuli/puppet-puppetboard/blob/master/data/os/Ubuntu.18.04.yaml

kenyon avatar Dec 05 '23 20:12 kenyon

Also, I see there is no acceptance test on RHEL (only on Debian and Ubuntu) and my PR is only related to RHEL.

Would it be simple to include acceptance on Rocky also? I’ve never done these kind of tests, so not sure if I really want to go down this rabbit hole, but if it is simple to add Rocky to the mix, would you be willing to help me helping this community?

teluq-pbrideau avatar Dec 05 '23 20:12 teluq-pbrideau

(...) would you be willing to help me helping this community?

I would like to but apparently I don't know how as I failed to fix the tests the last time I tried.

@kenyon ?

gdubicki avatar Dec 07 '23 11:12 gdubicki

I would rather have my changes merged than to wait another year for RHEL test to be included… Could we move forward please?

teluq-pbrideau avatar Jan 30 '24 15:01 teluq-pbrideau