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

Support wsgi on python 3.8 and 3.9 on rhel8 #372

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

teluq-pbrideau
Copy link

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 teluq-pbrideau changed the title Fix/rhel8 wsgi Support wsgi on python 3.8 and 3.9 on rhel8 Oct 13, 2022
@gdubicki gdubicki mentioned this pull request Oct 27, 2022
@gdubicki
Copy link
Contributor

gdubicki commented Oct 27, 2022

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 #373.

@teluq-pbrideau
Copy link
Author

@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
Copy link
Author

teluq-pbrideau commented Oct 27, 2022

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?

@gdubicki
Copy link
Contributor

gdubicki commented Oct 27, 2022

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

@gdubicki
Copy link
Contributor

gdubicki commented Oct 27, 2022

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.

@teluq-pbrideau
Copy link
Author

teluq-pbrideau commented Dec 5, 2023

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

@kenyon
Copy link
Member

kenyon commented Dec 5, 2023

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

@teluq-pbrideau
Copy link
Author

@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?

@kenyon kenyon linked an issue Dec 5, 2023 that may be closed by this pull request
@kenyon
Copy link
Member

kenyon commented Dec 5, 2023

@teluq-pbrideau
Copy link
Author

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?

@gdubicki
Copy link
Contributor

gdubicki commented Dec 7, 2023

(...) 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 ?

@teluq-pbrideau
Copy link
Author

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 teluq-pbrideau force-pushed the fix/rhel8-wsgi branch 3 times, most recently from 3c0434c to 8d7e907 Compare July 11, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop support for EOL Ubuntu 18.04 Unable to install version 4.0.3 on RHEL 8 using python 3.9
3 participants