streamnative / pulsar-manager

A tool for managing Apache Pulsar.
Apache License 2.0
12 stars 3 forks source link

ISSUE-407: OpenShift OKD will not run the pulsar-manager container as a root user #218

Open sijie opened 3 years ago

sijie commented 3 years ago

Original Issue: apache/pulsar-manager#407


OpenShift OKD does not support running containers as a root user. Is it possible to change the Dockerfile in a way that is it not running as a root user? Otherwise these errors will occur:

Starting Pulsar Manager Front end nginx: [alert] could not open error log file: open() "/var/lib/nginx/logs/error.log" failed (13: Permission denied) 2021/08/11 11:27:15 [warn] 8#8: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:3 2021/08/11 11:27:15 [emerg] 8#8: mkdir() "/var/tmp/nginx/client_body" failed (13: Permission denied) Starting Pulsar Manager Back end touch: /pulsar-manager/supervisor.sock: Permission denied chmod: /pulsar-manager/supervisor.sock: No such file or directory Start Pulsar Manager by specifying a configuration file. Traceback (most recent call last): File "/usr/bin/supervisord", line 11, in <module> load_entry_point('supervisor==3.3.4', 'console_scripts', 'supervisord')() File "/usr/lib/python2.7/site-packages/supervisor/supervisord.py", line 357, in main go(options) File "/usr/lib/python2.7/site-packages/supervisor/supervisord.py", line 367, in go d.main() File "/usr/lib/python2.7/site-packages/supervisor/supervisord.py", line 71, in main self.options.make_logger() File "/usr/lib/python2.7/site-packages/supervisor/options.py", line 1423, in make_logger stdout = self.nodaemon, File "/usr/lib/python2.7/site-packages/supervisor/loggers.py", line 346, in getLogger handlers.append(RotatingFileHandler(filename,'a',maxbytes,backups)) File "/usr/lib/python2.7/site-packages/supervisor/loggers.py", line 172, in __init__ FileHandler.__init__(self, filename, mode) File "/usr/lib/python2.7/site-packages/supervisor/loggers.py", line 98, in __init__ self.stream = open(filename, mode) IOError: [Errno 13] Permission denied: '/pulsar-manager/supervisord.log'

jsteggink commented 1 year ago

+1