Skip to content

Getting 500 error on adding a Kubernetes cluster (undefined method cleanup_status)

Summary

On 12.5.4 CE every time opening "Kubernetes", clicking "Add Kubernetes cluster" in Admin Area I am getting 500 error.

Steps to reproduce

  1. Go to Admin area
  2. Open Kubernetes tab
  3. Click "Add Kubernetes cluster" button

What is the current bug behavior?

Getting 500 error.

What is the expected correct behavior?

Should be able to add a cluster

Relevant logs and/or screenshots

Exception below is present in production.log:

Started GET "/admin/clusters/new" for 79.120.113.221 at 2019-12-14 19:34:44 +0000
Processing by Admin::ClustersController#new as HTML
Completed 500 Internal Server Error in 68ms (ActiveRecord: 7.6ms | Elasticsearch: 0.0ms)
NoMethodError (undefined method `cleanup_status=' for #<Clusters::Cluster:0x00007fc74e040ea8>
Did you mean? cleanup_status?):
app/services/clusters/build_service.rb:9:in `execute'
app/controllers/clusters/clusters_controller.rb:289:in `gcp_cluster'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:450:in `set_session_storage'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:444:in `set_locale'
lib/gitlab/request_profiler/middleware.rb:17:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/multipart.rb:117:in `call'
lib/gitlab/middleware/read_only/controller.rb:48:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:32:in `call'
config/initializers/fix_local_cache_middleware.rb:9:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:49:in `call'
lib/gitlab/middleware/release_env.rb:12:in `call'

Output of checks

❯ curl "https://git.rapidsoft.ru/-/readiness?token="
{"status":"ok","master_check":[{"status":"ok"}]}
❯ curl "https://git.rapidsoft.ru/-/liveness?token="
{"status":"ok"}
❯ curl "https://git.rapidsoft.ru/-/metrics?token="
# Metrics are disabled, see: https://git.rapidsoft.ru/help/administration/monitoring/prometheus/gitlab_metrics#gitlab-prometheus-metrics

No Health Problems Detected

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Ubuntu 18.04 Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 3.2.12 Git Version: 2.22.2 Sidekiq Version:5.2.7 Go Version: unknown

GitLab information Version: 12.5.4 Revision: 63af04cacf5 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 9.6.14 URL: https://git.rapidsoft.ru HTTP Clone URL: https://git.rapidsoft.ru/some-group/some-project.git SSH Clone URL: git@git.rapidsoft.ru:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 10.2.0 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 10.2.0 ? ... OK (10.2.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 32 users of 100 limit.

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 6/1 ... yes 2/2 ... yes 10/3 ... yes 2/4 ... yes 6/12 ... yes 21/13 ... yes 18/14 ... yes 19/15 ... yes 19/16 ... yes 18/17 ... yes 22/18 ... yes 22/19 ... yes 2/20 ... yes 29/22 ... yes 18/23 ... yes 3/28 ... yes 3/30 ... yes 3/32 ... yes 3/33 ... yes 2/35 ... yes 3/36 ... yes 3/37 ... yes 3/38 ... yes 3/39 ... yes 3/40 ... yes 3/41 ... yes 3/42 ... yes 22/43 ... yes 3/44 ... yes 3/45 ... yes 3/46 ... yes 3/47 ... yes 3/48 ... yes 3/49 ... yes 3/50 ... yes 3/51 ... yes 3/52 ... yes 3/53 ... yes 3/54 ... yes 3/55 ... yes 2/56 ... yes 19/57 ... yes 22/58 ... yes 19/59 ... yes 2/60 ... yes 22/61 ... yes 2/63 ... yes 2/64 ... yes 39/65 ... yes 5/66 ... yes 2/68 ... yes 9/71 ... yes 3/72 ... yes 3/73 ... yes 3/74 ... yes 3/75 ... yes 34/76 ... yes 7/77 ... yes 7/78 ... yes 8/79 ... yes 9/80 ... yes 29/81 ... yes 2/82 ... yes 2/83 ... yes 21/84 ... yes 19/85 ... yes 3/86 ... yes 3/87 ... yes 44/88 ... yes 44/89 ... yes 45/90 ... yes 45/91 ... yes 45/93 ... yes 45/94 ... yes 45/95 ... yes 45/96 ... yes 45/100 ... yes 45/101 ... yes 45/102 ... yes 21/103 ... yes 45/104 ... yes 45/106 ... yes 43/108 ... yes 39/109 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.22.0 ? ... yes (2.22.2) Git user has default SSH configuration? ... yes Active users: ... 14 Is authorized keys file accessible? ... yes

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished