Skip to content

Circular dependency in gitlab-ctl reconfigure and gitlab-rake db:create during initial omnibus install with MySQL database.

  1. Can not install ombnibus correctly with external MySQL database due to circular dependency in commands

  2. Steps to reproduce:

Prereqs: MySQL-server 5.7 installation with default settings, no previously existing databases, users or schemas.

Install the gitlab RPM to RHEL 6, and update the /etc/gitlab/gitlab.rb with the settings for a localhost MySQL database. When running gitlab-ctl reconfigure for the first time, it produces until it attempts to make a database connection, and fails, warning me that first, a gitlab-rake db:create db:migrate command must be run to populate the database.

Starting over on a fresh VM, Install the gitlab RPM to RHEL6, update the settings, and run gitlab-rake db:create db:migrate. This command fails and instructs me to run gitlab-ctl reconfigure before I can populate the database. Running gitlab-ctl reconfigure returns me the same error as before, telling me to run gitlab-rake db:create db:migrate. So the gitlab-ctl reconfigure command depends on gitlab-rake db:create db:migrate, but the gitlab-rake db:create db:migrate depends on the reconfigure command, so I am stuck with a circular dependency.

  1. Expected Behavior: either gitlab-ctl reconfigure should succeed, or gitlab-rake db:create db:migrate should succeed on the first execution. Neither do.

  2. Observed Behavior: gitlab-ctl reconfigure fails with instructions to use gitlab-rake db:create db:migrate. gitlab-rake db:create db:migrate fails with instructions to use gitlab-ctl reconfigure.

  3. Attached gitlab.rb settings and logs of output of gitlab-ctl reconfigure below.

  4. Output checks: Mostly not relevant, gitlab is not yet installed. Installing RPM of '7.11.4~ee.omnibus-1'.

  5. Possible fixes:

I was able to work around this issue by running the gitlab-ctl reconfigure, letting it fail, then running gitlab-rake db:create db:migrate, which succeeds, then running gitlab-ctl reconfigure again, which succeeds. But this series of commands seems incorrect.

partial_gitlab-ctl-reconfigure.log

gitlab.rb