Use a unix socket between httpd and Foreman's Puma - #593
Conversation
|
Looking at the logs I see in the DB migration: And then later on service startup: So I wonder what's going on here and if it's related to my change. |
| foreman_database_ssl_ca_path: /etc/foreman/db-ca.crt | ||
|
|
||
| foreman_name: "{{ ansible_facts['fqdn'] }}" | ||
| foreman_listen_stream: localhost:3000 |
There was a problem hiding this comment.
Should we keep this consistent with PROD deployment?
| foreman_listen_stream: localhost:3000 | |
| foreman_listen_stream: /run/httpd.foreman.sock |
There was a problem hiding this comment.
The design here is that the role defaults remain standalone while a level higher they're connected to Apache.
| # TODO: probably not the right boolean | ||
| - name: Set daemons_enable_cluster_mode so Apache can connect to unix sockets | ||
| ansible.posix.seboolean: | ||
| name: daemons_enable_cluster_mode | ||
| state: true | ||
| persistent: true |
There was a problem hiding this comment.
I think it would make sense to run this only when SELinux is enabled?
Also, since it worked for you, can we remove the TODO comment as part of this change?
| # TODO: probably not the right boolean | |
| - name: Set daemons_enable_cluster_mode so Apache can connect to unix sockets | |
| ansible.posix.seboolean: | |
| name: daemons_enable_cluster_mode | |
| state: true | |
| persistent: true | |
| - name: Set daemons_enable_cluster_mode so Apache can connect to unix sockets | |
| ansible.posix.seboolean: | |
| name: daemons_enable_cluster_mode | |
| state: true | |
| persistent: true | |
| when: ansible_facts['selinux']['status'] == "enabled" |
There was a problem hiding this comment.
I don't think this really is the correct boolean so IMHO the TODO still stands.
| - mod_ssl | ||
| state: present | ||
|
|
||
| - name: Set httpd_can_network_connect so Apache can connect to Puma and Gunicorn |
There was a problem hiding this comment.
We can now say we use httpd_can_network_connect just for Gunicorn? or we can remove this entirely when we update pulp unix sockets too?
|
Closing in favor of #608 |
Why are you introducing these changes? (Problem description, related links)
#118 included this previously, but splitting the focus.
In foreman-installer we saw using a unix socket had reliability benefits.
What are the changes introduced in this pull request?
How to test this pull request
Steps to reproduce:
Checklist