With Netbox 4.2.3 using non-system Python the netbox_uwsgi_in_venv
needs the secontext reasserted otherwise systemd cant start uwsgi
#200
Labels
Going through the install on Rocky Linux 9. System python is still 3.9 but we've installed Python 3.11 and its available and have got the playbooks and variables to the point of installing, migrating and configuring netbox.
However systemd is unable to start the services because selinux won't approve:
from
/var/log/messages
Output from
ausearch -c '(uwsgi)' --raw
Note that the context has to be set on the absolute path and not the link to
current
(though It might need both?)The context can't be set before the playbook because the binaries may not yet be installed, and can't be set after the playbook because this exits the Ansible run when the
netbox.service
can not start.I'm having trouble setting the context appropriately but it should be possible with https://docs.ansible.com/ansible/latest/collections/community/general/sefcontext_module.html
We'd strongly prefer to be able to run this service wit SELinux in enforcing mode, so please don't recommend using permissive or disabling SELinux.
The text was updated successfully, but these errors were encountered: