DB not seeded when GitLab chart installed with OpenBao enabled

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

When installing GitLab chart v9.6.1 with OpenBao enabled, The main GitLab database is not seeded. In particular, the users table is empty.

By default GitLab and OpenBao share the same database. OpenBao successfully creates openbao_kv_store and openbao_ha_locks.

We might be experiencing the same problem in the context of E2E tests on CNG. To be checked. See !213782 (comment 2926196440)

Note: However, in production environments OpenBao should probably have its own database instead of storing its data in the main database. Then E2E tests on CNG should replicate that setup, and make OpenBao use a dedicated database. This might hurt adoption though, as GitLab chart can't just create a new (logical) database – unlike Omnibus. See discussion: #582640 (comment 2935472025).

Workarounds

  • Enable OpenBao after installing the GitLab Helm Chart, using helm upgrade.
  • Configure a separate database for OpenBao.
  • Execute db:seed_fu rake task from the toolbox pod.
    kubectl exec -it <toolbox-pod-name> -- gitlab-rake db:seed_fu

Steps to reproduce

  1. Install the GitLab Helm Chart with OpenBao installed.
    helm install gitlab gitlab/gitlab --set global.openbao.enabled=true openbao.install=true ...
  2. Connect to the database console using the toolbox.
    kubectl exec -it <toolbox-pod-name> -- gitlab-rails dbconsole --include-password --database main
  3. Check the users table.
    SELECT username FROM users

What is the current bug behavior?

The main database is not seeded. The users table is empty.

What is the expected correct behavior?

The main database is seeded. The users table contains the root user.

Relevant logs and/or screenshots

Possible fixes

/cc @clemensbeck @cipherboy-gitlab

Edited by 🤖 GitLab Bot 🤖