使用 k8s 1.26.2 的 Deployment 部署的 gitlab/gitlab-ce:16.2.4-ce.0,使用 local PV 持久化
gitlab 服务器今天由于资源不足,导致 gitlab 宕机
机器资源充足时,启动 gitlab 时,出现异常日志,导致 gitlab 一直重启
Running handlers:
[2024-04-29T13:41:10+08:00] INFO: Running report handlers
Running handlers complete
[2024-04-29T13:41:10+08:00] INFO: Report handlers complete
Infra Phase complete, 342/1547 resources updated in 02 minutes 08 seconds
gitlab Reconfigured!
Checking for unmigrated data on legacy storage
Upgrade failed. Could not check for unmigrated data on legacy storage.
Waiting until database is ready before continuing... Waiting until database is ready before continuing... Waiting until database is ready before continuing... Waiting until database is ready before continuing... Waiting until database is ready before continuing... Failed to connect to the database... Error: There is an issue connecting to your database with your username/password, username: gitlab. Please check your database configuration to ensure the username/password are valid.
If you would like to restart the instance without performing this
check, add the following to your docker command:
-e GITLAB_SKIP_UNMIGRATED_DATA_CHECK=true
==> /var/log/gitlab/puma/current <==
2024-04-29_07:04:45.06408 {"timestamp":"2024-04-29T07:04:45.063Z","pid":15594,"message":"! Unable to load application: ActiveRecord::DatabaseConnectionError: There is an issue connecting to your database with your username/password, username: gitlab.\n\nPlease check your database configuration to ensure the username/password are valid.\n"}
2024-04-29_07:04:45.06426 bundler: failed to load command: puma (/opt/gitlab/embedded/bin/puma)
2024-04-29_07:04:45.06448 /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': There is an issue connecting to your database with your username/password, username: gitlab. (ActiveRecord::DatabaseConnectionError)
2024-04-29_07:04:45.06450
2024-04-29_07:04:45.06451 Please check your database configuration to ensure the username/password are valid.
2024-04-29_07:04:45.06451 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:77:in `new_client'
2024-04-29_07:04:45.06451 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
2024-04-29_07:04:45.06451 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `public_send'
2024-04-29_07:04:45.06452 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `new_connection'
2024-04-29_07:04:45.06452 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:700:in `checkout_new_connection'
2024-04-29_07:04:45.06452 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:679:in `try_to_checkout_new_connection'
2024-04-29_07:04:45.06452 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:640:in `acquire_connection'
2024-04-29_07:04:45.06452 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:341:in `checkout'
2024-04-29_07:04:45.06453 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `connection'
2024-04-29_07:04:45.06453 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract/connection_handler.rb:211:in `retrieve_connection'
2024-04-29_07:04:45.06453 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_handling.rb:313:in `retrieve_connection'
2024-04-29_07:04:45.06454 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_handling.rb:280:in `connection'
2024-04-29_07:04:45.06454 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/model_schema.rb:407:in `table_exists?'
2024-04-29_07:04:45.06454 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/attribute_methods/primary_key.rb:95:in `get_primary_key'
2024-04-29_07:04:45.06454 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/attribute_methods/primary_key.rb:83:in `reset_primary_key'
2024-04-29_07:04:45.06455 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/attribute_methods/primary_key.rb:71:in `primary_key'
2024-04-29_07:04:45.06455 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/relation/delegation.rb:93:in `primary_key'
2024-04-29_07:04:45.06455 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/relation/finder_methods.rb:575:in `ordered_relation'
2024-04-29_07:04:45.06455 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/relation/finder_methods.rb:174:in `last'
2024-04-29_07:04:45.06456 from /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-7.0.6/lib/active_record/querying.rb:22:in `last'