Can't create new Project after 14.0.0 migration

Hello Community, I’m looking for some help.

I made a migration of Gitlab-EE from 13.12.15-ee to 14.0.0-ee.0 then to 14.1.0-ee.

All is right except project creation. When I go on “New Project” page it throw an error 500.

The logs gitlab-rails:

Processing by ProjectsController#new as HTML
Completed 500 Internal Server Error in 398ms (ActiveRecord: 57.2ms | Elasticsearch: 0.0ms | Allocations: 48146)

NoMethodError (undefined method `container_registry_enabled=' for #<Project id: >>
Did you mean?  container_registry_enabled
               container_registry_enabled?
               container_registry_url
               container_registry_variables):

app/models/project.rb:859:in `initialize'
lib/gitlab/metrics/instrumentation.rb:160:in `block in initialize'
lib/gitlab/metrics/method_call.rb:27:in `measure'
lib/gitlab/metrics/instrumentation.rb:160:in `initialize'
app/controllers/projects_controller.rb:65:in `new'
ee/lib/gitlab/ip_address_state.rb:10:in `with'
ee/app/controllers/ee/application_controller.rb:44:in `set_current_ip_address'
app/controllers/application_controller.rb:483:in `set_current_admin'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:474:in `set_session_storage'
lib/gitlab/i18n.rb:99:in `with_locale'
lib/gitlab/i18n.rb:105:in `with_user_locale'
app/controllers/application_controller.rb:468:in `set_locale'
app/controllers/application_controller.rb:462:in `set_current_context'
lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'
lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'
lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'
lib/gitlab/metrics/web_transaction.rb:21:in `run'
lib/gitlab/metrics/rack_middleware.rb:16:in `call'
lib/gitlab/middleware/speedscope.rb:13:in `call'
lib/gitlab/request_profiler/middleware.rb:17:in `call'
lib/gitlab/jira/middleware.rb:19:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:21:in `call'
lib/gitlab/middleware/multipart.rb:172:in `call'
lib/gitlab/middleware/read_only/controller.rb:50:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/same_site_cookies.rb:27:in `call'
lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'
lib/gitlab/middleware/request_context.rb:21:in `call'
config/initializers/fix_local_cache_middleware.rb:11:in `call'
lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:74:in `call'
lib/gitlab/middleware/release_env.rb:12:in `call'

I made search on that container_registry_enabled= but found nothing.
Is it a configuration problem ?

Thank for your help :slight_smile:

********EDIT

I manage to make the project creation work with a patch in app/models/project.rb:

  alias_method :container_registry_enabled=, :container_registry_enabled?

Why I have this problem ?

Hi,

maybe you are affected by a bug in the .0 release. The upgrading documentation mentions to use 14.0.5 as the preferred minimum upgrade version. Suggest upgrading to the latest 14.0.Z release before moving into 14.1.Z.

Cheers,
Michael

1 Like

Thank you @dnsmichi for your answer. I will give a try, downgrading from 14.1.0 to 14.0.0 then upgrading to last 14.0.X before 14.1.0

I tried this solution, reverted 14.1.0 → 14.0.0 then 14.0.0 → 14.0.8 → 14.1.0

The problem is still there. I have to create the alias method to make the projects creation working.

I don’t understand what is looking for this method in the Gitlab code. Does a configuration in database keep track of this method “container_registry_enabled” (which is deprecated)?