ERROR: relation "user_callouts" does not exist when trying to open a repository
I'm not sure what is the cause of the problem but I suspect it could be because I've updated gitlab from 10.4.2 to 10.5.2.
Other thing that could be is that after that I made a backup and restored the tar into a docker gitlab container version 10.5.2 (note that previously I was using gitlab omnibus installation).
Logs attached.
Will update the issue as soon as I have new info.
==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/vlvpn/docs" for XX.XX.XX.XX at 2018-03-05 12:42:49 +0000
Processing by ProjectsController#show as HTML
Parameters: {"namespace_id"=>"vlvpn", "id"=>"docs"}
==> /var/log/gitlab/postgresql/current <==
2018-03-05_12:42:49.45896 ERROR: relation "user_callouts" does not exist at character 323
2018-03-05_12:42:49.45900 STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2018-03-05_12:42:49.45901 pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2018-03-05_12:42:49.45901 FROM pg_attribute a LEFT JOIN pg_attrdef d
2018-03-05_12:42:49.45901 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2018-03-05_12:42:49.45902 WHERE a.attrelid = '"user_callouts"'::regclass
2018-03-05_12:42:49.45902 AND a.attnum > 0 AND NOT a.attisdropped
2018-03-05_12:42:49.45902 ORDER BY a.attnum
2018-03-05_12:42:49.45902
==> /var/log/gitlab/gitlab-rails/production.log <==
Completed 500 Internal Server Error in 359ms (ActiveRecord: 21.1ms)
==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/vlvpn/docs","format":"html","controller":"ProjectsController","action":"show","status":500,"error":"ActionView::Template::Error: PG::UndefinedTable: ERROR: relation \"user_callouts\" does not exist\nLINE 5: WHERE a.attrelid = '\"user_callouts\"'::regclas...\n ^\n: SELECT a.attname, format_type(a.atttypid, a.atttypmod),\n pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod\n FROM pg_attribute a LEFT JOIN pg_attrdef d\n ON a.attrelid = d.adrelid AND a.attnum = d.adnum\n WHERE a.attrelid = '\"user_callouts\"'::regclass\n AND a.attnum > 0 AND NOT a.attisdropped\n ORDER BY a.attnum\n","duration":360.0,"view":0.0,"db":21.14,"time":"2018-03-05T12:42:49.101Z","params":{"namespace_id":"vlvpn","id":"docs"},"remote_ip":"XX.XX.XX.XX","user_id":1,"username":"adrianharabula"}
==> /var/log/gitlab/gitlab-rails/production.log <==
ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "user_callouts" does not exist
LINE 5: WHERE a.attrelid = '"user_callouts"'::regclas...
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"user_callouts"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
):
184: Environments
185:
186: - if project_nav_tab? :clusters
187: - show_cluster_hint = show_gke_cluster_integration_callout?(@project)
188: = nav_link(controller: [:clusters, :user, :gcp]) do
189: = link_to project_clusters_path(@project), title: _('Kubernetes'), class: 'shortcuts-cluster' do
190: %span
app/helpers/user_callouts_helper.rb:12:in `user_dismissed?'
app/helpers/user_callouts_helper.rb:6:in `show_gke_cluster_integration_callout?'
app/views/layouts/nav/sidebar/_project.html.haml:187:in `block in _app_views_layouts_nav_sidebar__project_html_haml___3412438198453104885_70356913487020'
app/helpers/tab_helper.rb:55:in `nav_link'
app/views/layouts/nav/sidebar/_project.html.haml:149:in `_app_views_layouts_nav_sidebar__project_html_haml___3412438198453104885_70356913487020'
app/views/layouts/_page.html.haml:3:in `_app_views_layouts__page_html_haml__1640529216979363017_70356875756340'
app/views/layouts/application.html.haml:8:in `_app_views_layouts_application_html_haml__2249008294364942988_70356903182060'
app/views/layouts/project.html.haml:14:in `_app_views_layouts_project_html_haml___1450807127529291275_70356898260600'
app/controllers/projects_controller.rb:276:in `render_landing_page'
app/controllers/projects_controller.rb:117:in `block (2 levels) in show'
app/controllers/projects_controller.rb:114:in `show'
lib/gitlab/i18n.rb:47:in `with_locale'
lib/gitlab/i18n.rb:53:in `with_user_locale'
app/controllers/application_controller.rb:325:in `set_locale'
lib/gitlab/middleware/multipart.rb:95:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only.rb:31:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
Edited by Adrian Harabula