Skip to content

No downtime documentation is not compatible with most Ubuntu installations

Hi,

The "no downtime" Omnibus documentation uses the following command to trigger the reconfigure action without post-deployment migration:

SKIP_POST_DEPLOYMENT_MIGRATIONS=true sudo gitlab-ctl reconfigure

But for a default Ubuntu installation, sudoers cannot inject env variables to sudo commands, and the SKIP_POST_DEPLOYMENT_MIGRATIONS variable will not pass through the sudo.

# Does not work
$ foo=bar sudo env | grep foo
<nothing>

# Works
$ sudo foo=bar env | grep foo
foo=bar

Without further configuration consideration, the following command should work (with default configurations), by injecting the variable in the sudo command:

sudo SKIP_POST_DEPLOYMENT_MIGRATIONS=true gitlab-ctl reconfigure

This injection could be prevented by a sudoers configuration with a !SETENV.

Edited by Olivier Billard