Add warning message in init container if database has not been initialized
We currently do not show any log entry, in the event that we fail to initialize containers due to the database not being initialized.
We should add an appropriate log entry, so users can more easily debug why it is failing to start.
Original issue
Summary
I am trying to deploy gitlab community edition on bare-metal kubernetes cluster using the gitlab helm chart.Data is persisted locally with persistent volumes directly attached to local disks.All gitlab components are starting normally except the dependencies init container of unicorn and sidekiq
Steps to reproduce
Just deploy the chart with the configuration mentioned bellow after creating local persitent volumes.
Configuration used
global:
edition: ce
hosts:
domain: code-test.example.com
service:
type: ClusterIP
minio:
enabled: true
smtp:
enabled: false
appConfig:
lfs:
enabled: false
minio:
persistence:
storageClass: local-storage
size: 200Gi
matchLabels:
component: minio
certmanager:
install: false
certmanager-issuer:
email: xx.yy@example.com
nginx-ingress:
enabled: false
prometheus:
install: false
postgresql:
install: true
persistence:
existingClaim: gitlab-pgsql-local-pvc
metrics:
enabled: false
registry:
enabled: false
redis:
enabled: true
persistence:
storageClass: local-storage
size: 200Gi
matchLabels:
component: redis
shared-secrets:
enabled: true
rbac:
create: true
gitlab-runner:
install: false
gitlab:
migrations:
enabled: false
unicorn:
enabled: true
workerProcesses: 1
maxUnavailable: 1
minReplicas: 1
maxReplicas: 2
metrics:
enabled: false
sidekiq:
enabled: true
metrics:
enabled: false
gitaly:
enabled: true
persistence:
storageClass: local-storage
size: 200Gi
matchLabels:
component: gitaly
resources:
limits:
cpu: 200m
memory: 200Mi
requests:
cpu: 100m
memory: 128Mi
gitlab-shell:
enabled: true
task-runner:
enabled: true
Current behavior
The dependencies unicorn init container fails to start after visualizing the log message specified in the log section.
Expected behavior
Everything should work correctly
Versions
- Chart: ad7042f7
- Platform:
- Cloud: No Cloud provider is used
- Self-hosted: Bare-metal
- Kubernetes: (
kubectl version)- Client: 1.11.1
- Server: 1.11.1
- Helm: (
helm version)- Client: 2.11.0
- Server: 2.11.0
Relevant logs
+ /scripts/set-config /var/opt/gitlab/templates /srv/gitlab/config
Begin parsing .erb files from /var/opt/gitlab/templates
Writing /srv/gitlab/config/gitlab.yml
Writing /srv/gitlab/config/resque.yml
Writing /srv/gitlab/config/database.yml
Copying other config files found in /var/opt/gitlab/templates
Copying smtp_settings.rb into /srv/gitlab/config
Copying unicorn.rb into /srv/gitlab/config
+ exec /scripts/wait-for-deps
Checking database connection and schema version
WARNING: This version of GitLab depends on gitlab-shell 8.4.3, but you're running Unknown. Please update gitlab-shell.
Database Schema
Current version: 0
Codebase version: 20181204154019
Checking database connection and schema version