From 10a48c1541489e4248253aa1513056f82ddcb9e6 Mon Sep 17 00:00:00 2001 From: Kazunori Kimura Date: Wed, 22 Feb 2023 04:55:17 +0900 Subject: [PATCH 1/2] Clarify user=root in supervisord.conf to prevent "Supervisor running as root" warning --- assets/build/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/build/install.sh b/assets/build/install.sh index 0d16848d..46537070 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -251,6 +251,10 @@ echo "UseDNS no" >> /etc/ssh/sshd_config # move supervisord.log file to ${GITLAB_LOG_DIR}/supervisor/ sed -i "s|^[#]*logfile=.*|logfile=${GITLAB_LOG_DIR}/supervisor/supervisord.log ;|" /etc/supervisor/supervisord.conf +# prevent confusing warning "CRIT Supervisor running as root" by clarify run as root +# user not defined in supervisord.conf by default, so just append it after [supervisord] block +sed -i "/\[supervisord\]/a user=root" /etc/supervisor/supervisord.conf + # move nginx logs to ${GITLAB_LOG_DIR}/nginx sed -i \ -e "s|access_log /var/log/nginx/access.log;|access_log ${GITLAB_LOG_DIR}/nginx/access.log;|" \ From a1dcfe6eaf6436e9ff668e39dcf49a4d5efe1c92 Mon Sep 17 00:00:00 2001 From: Kazunori Kimura Date: Wed, 22 Feb 2023 04:24:00 +0900 Subject: [PATCH 2/2] Update sidekiq supervisord config; sidekiq v6.0 Sidekiq is updated to v6.0 here (first contained tag: v14.4.0-ee) https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69655 In Sidekiq 6.0, these options have been marked as "deprecated": -P (set pid file) -L (set log file) See https://github.com/sidekiq/sidekiq/commit/3f5b1c5 Now, we can see error message in {GITLAB_LOGS_DIR}/supervisor/sidekiq.log like below: ---- ERROR: PID file creation was removed in Sidekiq 6.0, please use a proper process supervisor to start and manage your services ERROR: Logfile redirection was removed in Sidekiq 6.0, Sidekiq will only log to STDOUT ---- Just stop using this option. --- assets/build/install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/assets/build/install.sh b/assets/build/install.sh index 46537070..774aaa6a 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -353,8 +353,6 @@ command=bundle exec sidekiq -c {{SIDEKIQ_CONCURRENCY}} -C ${GITLAB_INSTALL_DIR}/config/sidekiq_queues.yml -e ${RAILS_ENV} -t {{SIDEKIQ_SHUTDOWN_TIMEOUT}} - -P ${GITLAB_INSTALL_DIR}/tmp/pids/sidekiq.pid - -L ${GITLAB_INSTALL_DIR}/log/sidekiq.log user=git autostart=true autorestart=true