I am attempting to run the full Icinga stack (Icinga2, IcingaWeb, IcingaDb) in an openshift cluster. The issue I am facing is that all containers on openshift are started with an arbitrary user ID, and a group ID of 0 (root). When I try to start the Icinga daemon I receive the following error:
critical/cli: setgroups() failed with error code 1, “Operation not permitted”
critical/cli: Please re-run this command as a privileged user or using the “icinga” account.
I have tried the suggestion here: Icinga2 satellite in openshift of changing the file permissions. I changed all the file permissions for /data (For the icinga docker image /etc/ and /var are links to directorys in /data) to 777 and verified they are under the root group. I have also tried changing the permissions for /etc/init.d/icinga2 and /usr/sbin/icinga2.
I have tried the following settings in /etc/sysconfig/icinga2:
ICINGA2_GROUP=root
In the container, I have tried directly changing the icinga entry in /etc/passwd to directly reflect the UID/GID that will be used.
Thus far I haven’t been able to get around the issue and am not sure what else to try. Any help is welcome.
As an FYI. I am running into similar permission issues with the IcingaWeb and IcingaDB containers as well, but haven’t given them enough attention yet.
Never fails, you ask a question then find the answer. The solution for me was to use the nss_wrapper workaround described on the Openshift link in my initial post. However, which that work around I needed to modify my start command from: