Hello,
I’m currently trying to set up a GitLab HA installation, but I’m facing lots errors.
The setup is supposed to consist of multiple VMs, with separate ones for postgres, redis, rails, praefect and gitaly.
Starting with rails, the first error I get is a NameError: uninitialized constant Gitlab::Redis::ALL_CLASSES
. This can be circumvented by loading the redis initializer before the prometheus one (command: mv /opt/gitlab/embedded/service/gitlab-rails/config/initializers/{7,5}_redis.rb
). I still expect this to be a configuration error, which is getting worked around here. Maybe someone knows.
With this error out of my way, for now, I want, of cause, to create a repository. GitLab doesn’t like to play this game though. Confronting me with a
ActionView::Template::Error (undefined method `first' for nil:NilClass):
70: %meta{ property: 'og:site_name', content: site_name }
71: %meta{ property: 'og:title', content: page_title }
72: %meta{ property: 'og:description', content: page_description }
73: %meta{ property: 'og:image', content: page_image }
74: %meta{ property: 'og:image:width', content: '64' }
75: %meta{ property: 'og:image:height', content: '64' }
76: %meta{ property: 'og:url', content: request.base_url + request.fullpath }
app/models/application_setting_implementation.rb:487:in `pick_repository_storage'
lib/gitlab/current_settings.rb:32:in `method_missing'
app/models/repository.rb:1215:in `pick_storage_shard'
app/models/project.rb:114:in `block in <class:Project>'
lib/gitlab/gl_repository.rb:12:in `block in <class:GlRepository>'
lib/gitlab/gl_repository/repo_type.rb:71:in `repository_for'
app/models/project.rb:1284:in `repository'
app/models/project.rb:1792:in `avatar_in_git'
app/models/project.rb:1796:in `avatar_url'
app/models/concerns/avatarable.rb:36:in `avatar_url'
app/helpers/page_layout_helper.rb:62:in `page_image'
app/views/layouts/_head.html.haml:73
app/views/layouts/application.html.haml:7
app/views/layouts/dashboard.html.haml:6
[Some more lines]
This already breaks all the sense behind GitLab. But that is not enough, also administrating GitLab becomes a big problem when the general settings (/admin/application_settings/general
) greet you with a 500 and the console spits the following at you.
ActionView::Template::Error (First argument in form cannot contain nil or be empty):
1: = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-visibility-settings'), html: { class: 'fieldset-form', id: 'visibility-settings' } do |f|
2: = form_errors(@application_setting)
3:
4: %fieldset
app/helpers/application_helper.rb:463:in `gitlab_ui_form_for'
app/views/admin/application_settings/_visibility_and_access.html.haml:1
app/views/admin/application_settings/general.html.haml:15
app/controllers/application_controller.rb:161:in `render'
app/controllers/application_controller.rb:520:in `set_current_admin'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:511:in `set_session_storage'
[Some more lines again]
I’m not sure what exactly I did wrong with my whole setup. But the only problem seems to come from gitlab-rails. All the other services seem to come up absolutely fine.
For reference I created an example. It is a minimal setup in docker, omitting the gitaly and praefect nodes in exchange for a local git_data_dirs
location. The mentioned problems still apply to this setup though.