Changing default env directory for gitaly breaks downgrades
In !2825 (merged), we changed env_dir of gitaly to /opt/gitlab/etc/gitaly/env
from /opt/gitlab/etc/gitaly/
.
-
As part of reconfigure, we clean up the directory which contains environment variables to make sure that it don't contain any files that are not specified in
gitaly['env']
. - In 11.5, this environment variable directory for gitaly was
/opt/gitlab/etc/gitaly
. In 11.6, we changed it to/opt/gitlab/etc/gitaly/env
. - So, reconfigure after installing 11.6 created an
env
directory inside/opt/gitlab/etc/gitaly
, since it is now the default location for env variables - Then we rolled back to 11.5.3. Now, according to reconfigure, the env directory is now
/opt/gitlab/etc/gitaly
and anything inside it, other than the list of env variables should be removed. - However, that includes the
env
directory, that 11.6 reconfigure created. So, reconfigure attempts to remove that too. This fails because we expect a file andenv
is a directory.