Incomplete database if initial_root_password is too short
Observed in docker image gitlab/gitlab-ee:14.8.2-ee.0
.
If the initial_root_password is too short, an incomplete database is generated, which lacks the root user and the default issue (and potentially other things).
The resulting container works mostly fine if you create the first admin user afterwards using the gitlab-rails console.
However, if you try to create a new issue for a project on said container, you will always get a 500 Internal Server Error
and a exception.json due to the missing default issue.
It would be nice to make this fail clearly and right on initialization of the container. Once you are past that step and everything works except for creating issues, this issue is very hard to find.
One can easily reproduce it in a docker-compose.yml
:
version: '3.6'
services:
gitlab:
container_name: 'gitlab'
image: 'gitlab/gitlab-ee:14.8.2-ee.0'
restart: always
hostname: 'myhost'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://myhost:80'
gitlab_rails['initial_root_password'] = "admin"
ports:
- '80:80'
- '443:443'
shm_size: '256m'
It works after changing "admin"
to "admin1234"
.