Legacy self hosted upgrade kills supervisord if recommended logging enabled


#1

Issue Summary

Using a legacy self-hosted system on running

cd /opt/redash/current
sudo bin/upgrade

as in docs (help/open-source/admin-guide/how-to-upgrade-legacy).

If we are logging as suggested in the maintenance guide (help/open-source/admin-guide/maintenance).

the service supervisor will fail to start properly, as it is misconfigured: because the log path does not exist.

Technical details:

  • Redash Version: Self hosted pre-docker legacy upgrade from redash.4.0.1.b4038 to redash.5.0.1.b4851
  • Browser/OS: No browser-backend/Amazon linux
  • How did you install Redash: https://redash.io/help/open-source/setup#aws (need to sync with colleague on exactly when and what)

When we add

[program:redash_server]:
# ...
stdout_logfile=/opt/redash/current/logs/api.log
stderr_logfile=/opt/redash/current/logs/api_error.log

[program:redash_celery]:
# ...
stdout_logfile=/opt/redash/current/logs/celery.log

to /etc/supervisor/conf.d/redash.conf to start logging we need to mkdir /opt/redash/current/logs.

On sudo bin/upgrade the unpacked folder that is linked to /opt/redash/current/ does not contain a /logs directory.
This causes supervisord to fail to start.

Proposed fix is to ensure that path exists as part of upgrade: I can make a PR if this sounds like a real bug and folk are interested

[edited to ‘remove’ some links that triggered the spam filter]