Gitlab-pages fail to start due to invalid path for admin.secret
Summary
If the gitlab-pages dir folder is not the default one in the configuration, gitlab-ctl reconfigure
and gitlab-pages fail to start in Gitlab 11 (11.0.2)
Steps to reproduce
- Change the default path in gitlab.rb for the key
gitlab_pages['dir']
(the folder/var/opt/gitlab/gitlab-pages
must not exist) - launch gitlab-ctl reconfigure
- gitlab-ctl reconfigure fail and the gitlab-pages service too
What is the current bug behavior?
gitlab-ctl reconfigure fail and the gitlab-pages service too because the default path doesn't exit.
What is the expected correct behavior?
gitlab-pages status up without any error in gitlab-ctl reconfigure
Relevant logs
Gitlab-ctl reconfigure logs
* template[/var/opt/gitlab/gitlab-pages/admin.secret] action create * Parent directory /var/opt/gitlab/gitlab-pages does not exist. ================================================================================ Error executing action `create` on resource 'template[/var/opt/gitlab/gitlab-pages/admin.secret]' ================================================================================Chef::Exceptions::EnclosingDirectoryDoesNotExist ------------------------------------------------ Parent directory /var/opt/gitlab/gitlab-pages does not exist. Resource Declaration: --------------------- # In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/gitlab-pages.rb 41: template admin_secret_path do 42: source "secret_token.erb" 43: owner 'root' 44: group account_helper.gitlab_group 45: mode "0640" 46: variables(secret_token: node['gitlab']['gitlab-pages']['admin_secret_token']) 47: notifies :restart, "service[gitlab-pages]" 48: end 49:
Running handlers: There was an error running gitlab-ctl reconfigure:
template[/var/opt/gitlab/gitlab-pages/admin.secret] (gitlab::gitlab-pages line 41) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /var/opt/gitlab/gitlab-pages does not exist.
Details of package version
Gitlab EE 11.0.2
Environment details
- Operating System: Centos 6.9
- Installation Target:
- VM: Azure
- Installation Type:
- Upgrade from version
10.8.2
- Upgrade from version
- Is there any other software running on the machine:
no
- Is this a single or multiple node installation? single
- Resources
- CPU:
4
- Memory total:
16Go
- CPU:
Configuration details
Provide the relevant sections of `/etc/gitlab/gitlab.rb`
```rubygitlab_pages['redirect_http'] = true
gitlab_pages['use_http2'] = true
gitlab_pages['dir'] = "/data/pages"
</pre> </details>