Upgrade failed from 8.16.4 to 8.17.1
Summary
PostgreSQL
Steps to reproduce
apt-get upgrade
What is the current bug behavior?
Fail during migration
What is the expected correct behavior?
(What you should see instead)
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
Setting up gitlab-ce (8.17.1-ce.2) ...
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
gitlab: Thank you for installing GitLab!
gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:
sudo gitlab-ctl reconfigure
gitlab: GitLab should be reachable at https://git.kfsyscc.org
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab:
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab:
gitlab: GitLab now ships with a newer version of PostgreSQL (9.6.1), and will be used
gitlab: as the default in the next major release. To upgrade, RUN THE FOLLOWING COMMANDS:
sudo gitlab-ctl pg-upgrade
gitlab: For more details, please see:
gitlab: https://docs.gitlab.com/omnibus/settings/database.html#upgrade-packaged-postgresql-server
gitlab:
Checking PostgreSQL executables:Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab::postgresql-bin"]
Synchronizing Cookbooks:
- gitlab (0.0.1)
- package (0.0.0)
- runit (0.14.2)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 1 resources
Recipe: gitlab::postgresql-bin
* ruby_block[Link postgresql bin files to the correct version] action run (skipped due to only_if)
Running handlers:
Running handlers complete
Chef Client finished, 0/1 resources updated in 07 seconds
Checking PostgreSQL executables: OK
Shutting down all GitLab services except those needed for migrations
ok: down: gitlab-workhorse: 0s, normally up
ok: down: logrotate: 0s, normally up
ok: down: nginx: 0s, normally up
ok: down: postgresql: 0s, normally up
ok: down: redis: 0s, normally up
ok: down: registry: 1s, normally up
ok: down: sidekiq: 0s, normally up
ok: down: unicorn: 0s, normally up
ok: run: postgresql: (pid 13383) 0s
ok: run: redis: (pid 13385) 1s
run: postgresql: (pid 13383) 1s; run: log: (pid 1104) 3689570s
run: redis: (pid 13385) 1s; run: log: (pid 1073) 3689570s
Reconfiguring GitLab to apply migrations
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- runit (0.14.2)
- gitlab (0.0.1)
- package (0.0.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create (up to date)
init (upstart 1.12.1)
Converging 308 resources
* directory[/etc/gitlab] action create (up to date)
* directory[Create /var/opt/gitlab] action create (up to date)
* directory[/opt/gitlab/embedded/etc] action create (up to date)
* template[/opt/gitlab/embedded/etc/gitconfig] action create (up to date)
Recipe: gitlab::web-server
* group[Webserver user and group] action create (up to date)
* user[Webserver user and group] action create (up to date)
Recipe: gitlab::users
* directory[/var/opt/gitlab] action create (up to date)
* group[GitLab user and group] action create (up to date)
* user[GitLab user and group] action create (up to date)
* template[/var/opt/gitlab/.gitconfig] action create (up to date)
Recipe: gitlab::gitlab-shell
* ruby_block[directory resource: /var/opt/gitlab/git-data] action run (skipped due to not_if)
* ruby_block[directory resource: /var/opt/gitlab/git-data/repositories] action run (skipped due to not_if)
* ruby_block[directory resource: /var/opt/gitlab/.ssh] action run (skipped due to not_if)
* directory[/opt/gitlab/embedded/service/gitlab-shell/hooks/] action create
- change owner from 'root' to 'git'
- change group from 'root' to 'git'
* directory[/var/log/gitlab/gitlab-shell/] action create (up to date)
* directory[/var/opt/gitlab/gitlab-shell] action create (up to date)
* templatesymlink[Create a config.yml and create a symlink to Rails root] action create
* template[/var/opt/gitlab/gitlab-shell/config.yml] action create
- update content in file /var/opt/gitlab/gitlab-shell/config.yml from b28e1e to 946d85
--- /var/opt/gitlab/gitlab-shell/config.yml 2016-12-02 17:35:21.674706260 +0800
+++ /var/opt/gitlab/gitlab-shell/.chef-config.yml20170301-13404-hapysa 2017-03-01 09:03:16.424649737 +0800
@@ -48,9 +48,5 @@
# For CentOS: sudo yum install epel-release && sudo yum install git-annex
git_annex_enabled:
-# Git trace log file.
-# If set, git commands receive GIT_TRACE* environment variables
-# See https://git-scm.com/book/es/v2/Git-Internals-Environment-Variables#Debugging for documentation
-# An absolute path starting with / – the trace output will be appended to that file.
-# It needs to exist so we can check permissions and avoid to throwing warnings to the users.
+
* link[Link /opt/gitlab/embedded/service/gitlab-shell/config.yml to /var/opt/gitlab/gitlab-shell/config.yml] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-shell/.gitlab_shell_secret] action create (up to date)
* execute[/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys check-permissions] action run
- execute /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys check-permissions
* bash[Set proper security context on ssh files for selinux] action run (skipped due to only_if)
Recipe: gitlab::gitlab-rails
* directory[/var/log/gitlab] action create (up to date)
* ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared] action run (skipped due to not_if)
* ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/artifacts] action run (skipped due to not_if)
* ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/lfs-objects] action run (skipped due to not_if)
* ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/uploads] action run (skipped due to not_if)
* ruby_block[directory resource: /var/opt/gitlab/gitlab-ci/builds] action run (skipped due to not_if)
* ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/pages] action run (skipped due to not_if)
* directory[create /var/opt/gitlab/gitlab-rails/etc] action create (up to date)
* directory[create /opt/gitlab/etc/gitlab-rails] action create (up to date)
* directory[create /var/opt/gitlab/gitlab-rails/working] action create (up to date)
* directory[create /var/opt/gitlab/gitlab-rails/tmp] action create (up to date)
* directory[create /var/opt/gitlab/gitlab-rails/upgrade-status] action create (up to date)
* directory[create /var/log/gitlab/gitlab-rails] action create (up to date)
* directory[/var/opt/gitlab/backups] action create (up to date)
* directory[/var/opt/gitlab/gitlab-rails] action create (up to date)
* directory[/var/opt/gitlab/gitlab-ci] action create (up to date)
* template[/opt/gitlab/etc/gitlab-rails/gitlab-rails-rc] action create (up to date)
* file[/opt/gitlab/embedded/service/gitlab-rails/.secret] action delete (up to date)
* file[/var/opt/gitlab/gitlab-rails/etc/secret] action delete (up to date)
* templatesymlink[Create a database.yml and create a symlink to Rails root] action create
* template[/var/opt/gitlab/gitlab-rails/etc/database.yml] action create (up to date)
* link[Link /opt/gitlab/embedded/service/gitlab-rails/config/database.yml to /var/opt/gitlab/gitlab-rails/etc/database.yml] action create (up to date)
(up to date)
* templatesymlink[Create a secrets.yml and create a symlink to Rails root] action create
* template[/var/opt/gitlab/gitlab-rails/etc/secrets.yml] action create (up to date)
* link[Link /opt/gitlab/embedded/service/gitlab-rails/config/secrets.yml to /var/opt/gitlab/gitlab-rails/etc/secrets.yml] action create (up to date)
(up to date)
* templatesymlink[Create a resque.yml and create a symlink to Rails root] action create
* template[/var/opt/gitlab/gitlab-rails/etc/resque.yml] action create (up to date)
* link[Link /opt/gitlab/embedded/service/gitlab-rails/config/resque.yml to /var/opt/gitlab/gitlab-rails/etc/resque.yml] action create (up to date)
(up to date)
* templatesymlink[Create a aws.yml and create a symlink to Rails root] action delete
* template[/var/opt/gitlab/gitlab-rails/etc/aws.yml] action delete (up to date)
* link[Link /opt/gitlab/embedded/service/gitlab-rails/config/aws.yml to /var/opt/gitlab/gitlab-rails/etc/aws.yml] action delete (up to date)
(up to date)
* templatesymlink[Create a smtp_settings.rb and create a symlink to Rails root] action delete
* template[/var/opt/gitlab/gitlab-rails/etc/smtp_settings.rb] action delete (up to date)
* link[Link /opt/gitlab/embedded/service/gitlab-rails/config/initializers/smtp_settings.rb to /var/opt/gitlab/gitlab-rails/etc/smtp_settings.rb] action delete (up to date)
(up to date)
* templatesymlink[Create a relative_url.rb and create a symlink to Rails root] action delete
* template[/var/opt/gitlab/gitlab-rails/etc/relative_url.rb] action delete (up to date)
* link[Link /opt/gitlab/embedded/service/gitlab-rails/config/initializers/relative_url.rb to /var/opt/gitlab/gitlab-rails/etc/relative_url.rb] action delete (up to date)
(up to date)
* templatesymlink[Create a gitlab.yml and create a symlink to Rails root] action create
* template[/var/opt/gitlab/gitlab-rails/etc/gitlab.yml] action create
- update content in file /var/opt/gitlab/gitlab-rails/etc/gitlab.yml from a7482f to 270f51
--- /var/opt/gitlab/gitlab-rails/etc/gitlab.yml 2017-02-02 12:31:43.746777772 +0800
+++ /var/opt/gitlab/gitlab-rails/etc/.chef-gitlab.yml20170301-13404-1h1saw6 2017-03-01 09:03:17.536649726 +0800
@@ -139,7 +139,7 @@
enabled: false
host:
- ## GitLab Pages (EE only)
+ ## GitLab Pages
pages:
enabled: false
path: /var/opt/gitlab/gitlab-rails/shared/pages
@@ -149,14 +149,6 @@
external_http:
external_https:
- ## Elasticsearch (EE only)
- # Enable it if you are going to use elasticsearch instead of
- # regular database search
- elasticsearch:
- enabled: false
- host:
- port:
-
## Gravatar
## For Libravatar see: https://docs.gitlab.com/ce/customization/libravatar.html
gravatar:
@@ -190,10 +182,6 @@
# GitLab EE only jobs:
# Snapshot active users statistics
-
- # Update mirrored repositories
-
- # Update remote mirrors
# In addition to refreshing users when they log in,
# periodically refresh LDAP users membership.
* link[Link /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml to /var/opt/gitlab/gitlab-rails/etc/gitlab.yml] action create (up to date)
* templatesymlink[Create a rack_attack.rb and create a symlink to Rails root] action create
* template[/var/opt/gitlab/gitlab-rails/etc/rack_attack.rb] action create (up to date)
* link[Link /opt/gitlab/embedded/service/gitlab-rails/config/initializers/rack_attack.rb to /var/opt/gitlab/gitlab-rails/etc/rack_attack.rb] action create (up to date)
(up to date)
* templatesymlink[Create a gitlab_workhorse_secret and create a symlink to Rails root] action create
* template[/var/opt/gitlab/gitlab-rails/etc/gitlab_workhorse_secret] action create (up to date)
* link[Link /opt/gitlab/embedded/service/gitlab-rails/.gitlab_workhorse_secret to /var/opt/gitlab/gitlab-rails/etc/gitlab_workhorse_secret] action create (up to date)
(up to date)
* templatesymlink[Create a gitlab_shell_secret and create a symlink to Rails root] action create
* template[/var/opt/gitlab/gitlab-rails/etc/gitlab_shell_secret] action create (up to date)
* link[Link /opt/gitlab/embedded/service/gitlab-rails/.gitlab_shell_secret to /var/opt/gitlab/gitlab-rails/etc/gitlab_shell_secret] action create (up to date)
(up to date)
* directory[/opt/gitlab/etc/gitlab-rails/env] action create (up to date)
* file[/opt/gitlab/etc/gitlab-rails/env/HOME] action create (up to date)
* file[/opt/gitlab/etc/gitlab-rails/env/RAILS_ENV] action create (up to date)
* file[/opt/gitlab/etc/gitlab-rails/env/LD_PRELOAD] action create (up to date)
* file[/opt/gitlab/etc/gitlab-rails/env/SIDEKIQ_MEMORY_KILLER_MAX_RSS] action create (up to date)
* file[/opt/gitlab/etc/gitlab-rails/env/BUNDLE_GEMFILE] action create (up to date)
* file[/opt/gitlab/etc/gitlab-rails/env/PATH] action create (up to date)
* file[/opt/gitlab/etc/gitlab-rails/env/ICU_DATA] action create (up to date)
* file[/opt/gitlab/etc/gitlab-rails/env/PYTHONPATH] action create (up to date)
* file[/opt/gitlab/etc/gitlab-rails/env/EXECJS_RUNTIME] action create
- create new file /opt/gitlab/etc/gitlab-rails/env/EXECJS_RUNTIME
- update content in file /opt/gitlab/etc/gitlab-rails/env/EXECJS_RUNTIME from none to 75081b
--- /opt/gitlab/etc/gitlab-rails/env/EXECJS_RUNTIME 2017-03-01 09:03:17.740649724 +0800
+++ /opt/gitlab/etc/gitlab-rails/env/.chef-EXECJS_RUNTIME20170301-13404-4j20dp 2017-03-01 09:03:17.740649724 +0800
@@ -1 +1,2 @@
+Disabled
* link[/opt/gitlab/embedded/service/gitlab-rails/tmp] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/public/uploads] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/log] action create (up to date)
* link[/var/log/gitlab/gitlab-rails/sidekiq.log] action create (skipped due to not_if)
* file[/opt/gitlab/embedded/service/gitlab-rails/db/schema.rb] action create
- change owner from 'root' to 'git'
* remote_file[/var/opt/gitlab/gitlab-rails/VERSION] action create
- update content in file /var/opt/gitlab/gitlab-rails/VERSION from e73685 to 43e964
--- /var/opt/gitlab/gitlab-rails/VERSION 2017-02-03 17:05:29.245797152 +0800
+++ /var/opt/gitlab/gitlab-rails/.chef-VERSION20170301-13404-12oqys7 2017-03-01 09:03:17.836649723 +0800
@@ -1,2 +1,2 @@
-8.16.4
+8.17.1
* remote_file[/var/opt/gitlab/gitlab-rails/REVISION] action create
- update content in file /var/opt/gitlab/gitlab-rails/REVISION from d50f40 to 16affd
--- /var/opt/gitlab/gitlab-rails/REVISION 2017-02-03 17:05:29.285797151 +0800
+++ /var/opt/gitlab/gitlab-rails/.chef-REVISION20170301-13404-1gplitq 2017-03-01 09:03:17.860649723 +0800
@@ -1,2 +1,2 @@
-f32ee82
+8943e22
* file[/var/opt/gitlab/gitlab-rails/RUBY_VERSION] action create (up to date)
* execute[chown -R root:root /opt/gitlab/embedded/service/gitlab-rails/public] action run
- execute chown -R root:root /opt/gitlab/embedded/service/gitlab-rails/public
* execute[clear the gitlab-rails cache] action nothing (skipped due to action :nothing)
* file[/var/opt/gitlab/gitlab-rails/config.ru] action delete (up to date)
Recipe: gitlab::gitlab-ci-proxying
* template[/var/opt/gitlab/nginx/conf/gitlab-ci-http.conf] action delete (up to date)
Recipe: gitlab::add_trusted_certs
* directory[/etc/gitlab/trusted-certs] action create (up to date)
* directory[/opt/gitlab/embedded/ssl/certs] action create (up to date)
* file[/opt/gitlab/embedded/ssl/certs/README] action create (up to date)
* ruby_block[Move existing certs and link to /opt/gitlab/embedded/ssl/certs] action run
* Moving existing certificates found in /opt/gitlab/embedded/ssl/certs
* Symlinking existing certificates found in /etc/gitlab/trusted-certs
- execute the ruby block Move existing certs and link to /opt/gitlab/embedded/ssl/certs
Recipe: gitlab::default
* service[create a temporary unicorn service] action nothing (skipped due to action :nothing)
* service[create a temporary ci-unicorn service] action nothing (skipped due to action :nothing)
* service[create a temporary sidekiq service] action nothing (skipped due to action :nothing)
* service[create a temporary ci-sidekiq service] action nothing (skipped due to action :nothing)
* service[create a temporary mailroom service] action nothing (skipped due to action :nothing)
Recipe: runit::upstart
* cookbook_file[/etc/init/gitlab-runsvdir.conf] action create (up to date)
* execute[initctl reload-configuration] action run
- execute initctl reload-configuration
* execute[initctl status gitlab-runsvdir] action run
[execute] gitlab-runsvdir start/running, process 1048
- execute initctl status gitlab-runsvdir
* execute[initctl start gitlab-runsvdir] action run (skipped due to only_if)
Recipe: gitlab::redis
* group[user and group for redis] action create (up to date)
* user[user and group for redis] action create (up to date)
* group[Socket group] action create (up to date)
* directory[/var/opt/gitlab/redis] action create (up to date)
* directory[/var/log/gitlab/redis] action create (up to date)
* template[/var/opt/gitlab/redis/redis.conf] action create (up to date)
* directory[/opt/gitlab/sv/redis] action create (up to date)
* directory[/opt/gitlab/sv/redis/log] action create (up to date)
* directory[/opt/gitlab/sv/redis/log/main] action create (up to date)
* template[/opt/gitlab/sv/redis/run] action create (up to date)
* template[/opt/gitlab/sv/redis/log/run] action create (up to date)
* template[/var/log/gitlab/redis/config] action create (up to date)
* ruby_block[reload redis svlogd configuration] action nothing (skipped due to action :nothing)
* file[/opt/gitlab/sv/redis/down] action delete (up to date)
* link[/opt/gitlab/init/redis] action create (up to date)
* link[/opt/gitlab/service/redis] action create (up to date)
* ruby_block[supervise_redis_sleep] action run (skipped due to not_if)
* service[redis] action nothing (skipped due to action :nothing)
Recipe: gitlab::postgresql
* group[Postgresql user and group] action create (up to date)
* user[Postgresql user and group] action create (up to date)
* directory[/var/opt/gitlab/postgresql] action create (up to date)
* directory[/var/opt/gitlab/postgresql/data] action create (up to date)
* directory[/var/log/gitlab/postgresql] action create (up to date)
* link[/var/opt/gitlab/postgresql/data] action create (skipped due to not_if)
* file[/var/opt/gitlab/postgresql/.profile] action create (up to date)
* directory[create /etc/sysctl.d for kernel.shmmax] action create (up to date)
* file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.shmmax.conf kernel.shmmax] action create (up to date)
* link[/etc/sysctl.d/90-omnibus-gitlab-kernel.shmmax.conf] action create (up to date)
* file[delete /etc/sysctl.d/90-postgresql.conf kernel.shmmax] action delete (skipped due to only_if)
* file[delete /etc/sysctl.d/90-unicorn.conf kernel.shmmax] action delete (skipped due to only_if)
* file[delete /opt/gitlab/embedded/etc/90-omnibus-gitlab.conf kernel.shmmax] action delete (skipped due to only_if)
* file[delete /etc/sysctl.d/90-omnibus-gitlab.conf kernel.shmmax] action delete (skipped due to only_if)
* execute[load sysctl conf kernel.shmmax] action nothing (skipped due to action :nothing)
* directory[create /etc/sysctl.d for kernel.shmall] action create (up to date)
* file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.shmall.conf kernel.shmall] action create (up to date)
* link[/etc/sysctl.d/90-omnibus-gitlab-kernel.shmall.conf] action create (up to date)
* file[delete /etc/sysctl.d/90-postgresql.conf kernel.shmall] action delete (skipped due to only_if)
* file[delete /etc/sysctl.d/90-unicorn.conf kernel.shmall] action delete (skipped due to only_if)
* file[delete /opt/gitlab/embedded/etc/90-omnibus-gitlab.conf kernel.shmall] action delete (skipped due to only_if)
* file[delete /etc/sysctl.d/90-omnibus-gitlab.conf kernel.shmall] action delete (skipped due to only_if)
* execute[load sysctl conf kernel.shmall] action nothing (skipped due to action :nothing)
* directory[create /etc/sysctl.d for kernel.sem] action create (up to date)
* file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.sem.conf kernel.sem] action create (up to date)
* link[/etc/sysctl.d/90-omnibus-gitlab-kernel.sem.conf] action create (up to date)
* file[delete /etc/sysctl.d/90-postgresql.conf kernel.sem] action delete (skipped due to only_if)
* file[delete /etc/sysctl.d/90-unicorn.conf kernel.sem] action delete (skipped due to only_if)
* file[delete /opt/gitlab/embedded/etc/90-omnibus-gitlab.conf kernel.sem] action delete (skipped due to only_if)
* file[delete /etc/sysctl.d/90-omnibus-gitlab.conf kernel.sem] action delete (skipped due to only_if)
* execute[load sysctl conf kernel.sem] action nothing (skipped due to action :nothing)
* execute[/opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8] action run (skipped due to not_if)
* template[/var/opt/gitlab/postgresql/data/postgresql.conf] action create
- update content in file /var/opt/gitlab/postgresql/data/postgresql.conf from f7847f to e8b307
--- /var/opt/gitlab/postgresql/data/postgresql.conf 2017-01-20 10:38:29.793554234 +0800
+++ /var/opt/gitlab/postgresql/data/.chef-postgresql.conf20170301-13404-hodfke 2017-03-01 09:03:18.508649717 +0800
@@ -157,7 +157,8 @@
wal_level = minimal
# (change requires restart)
#fsync = on # turns forced synchronization on or off
-#synchronous_commit = on # synchronization level; on, off, or local
+synchronous_commit = on # synchronization level; on, off, or local
+synchronous_standby_names = ''
#wal_sync_method = fsync # the default is the first option
# supported by the operating system:
# open_datasync
@@ -181,10 +182,10 @@
# - Archiving -
-#archive_mode = off # allows archiving to be done
- # (change requires restart)
-#archive_command = '' # command to use to archive a logfile segment
-#archive_timeout = 0 # force a logfile segment switch after this
+archive_mode = off # allows archiving to be done
+ # (change requires restart, also requires 'wal_level' of 'hot_standby' OR 'replica')
+archive_command = '' # command to use to archive a logfile segment
+archive_timeout = 60 # force a logfile segment switch after this
# number of seconds; 0 disables
@@ -212,10 +213,10 @@
hot_standby = off
# (change requires restart)
-#max_standby_archive_delay = 30s # max delay before canceling queries
+max_standby_archive_delay = 30s # max delay before canceling queries
# when reading WAL from archive;
# -1 allows indefinite delay
-#max_standby_streaming_delay = 30s # max delay before canceling queries
+max_standby_streaming_delay = 30s # max delay before canceling queries
# when reading streaming WAL;
# -1 allows indefinite delay
#wal_receiver_status_interval = 10s # send replies at least this often
* service[postgresql] action restart
- restart service service[postgresql]
* template[/var/opt/gitlab/postgresql/data/pg_hba.conf] action create (up to date)
* template[/var/opt/gitlab/postgresql/data/pg_ident.conf] action create (up to date)
* directory[/opt/gitlab/sv/postgresql] action create (up to date)
* directory[/opt/gitlab/sv/postgresql/log] action create (up to date)
* directory[/opt/gitlab/sv/postgresql/log/main] action create (up to date)
* template[/opt/gitlab/sv/postgresql/run] action create (up to date)
* template[/opt/gitlab/sv/postgresql/log/run] action create (up to date)
* template[/var/log/gitlab/postgresql/config] action create (up to date)
* ruby_block[reload postgresql svlogd configuration] action nothing (skipped due to action :nothing)
* file[/opt/gitlab/sv/postgresql/down] action delete (up to date)
* directory[/opt/gitlab/sv/postgresql/control] action create (up to date)
* template[/opt/gitlab/sv/postgresql/control/t] action create (up to date)
* link[/opt/gitlab/init/postgresql] action create (up to date)
* link[/opt/gitlab/service/postgresql] action create (up to date)
* ruby_block[supervise_postgresql_sleep] action run (skipped due to not_if)
* service[postgresql] action nothing (skipped due to action :nothing)
Recipe: gitlab::postgresql-bin
* ruby_block[Link postgresql bin files to the correct version] action run (skipped due to only_if)
Recipe: gitlab::postgresql
* template[/opt/gitlab/etc/gitlab-psql-rc] action create (up to date)
* execute[create gitlab database user] action run (skipped due to not_if)
* execute[create gitlabhq_production database] action run (skipped due to not_if)
* execute[create gitlab_replicator replication user] action run (skipped due to not_if)
* execute[enable pg_trgm extension] action nothing (skipped due to action :nothing)
Recipe: gitlab::database_migrations
* bash[migrate gitlab-rails database] action run
- Would execute "bash" "/tmp/chef-script20170301-13404-nz8bla"
Recipe: gitlab::postgresql
* execute[enable pg_trgm extension] action run
[execute] CREATE EXTENSION
NOTICE: extension "pg_trgm" already exists, skipping
- execute /opt/gitlab/bin/gitlab-psql -d gitlabhq_production -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
Recipe: gitlab::database_migrations
* bash[migrate gitlab-rails database] action run
[execute] rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
The single-table inheritance mechanism failed to locate the subclass: 'GitlabCiService'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Service.inheritance_column to use another column for that information./opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20170211073944_disable_invalid_service_templates.rb:11:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'GitlabCiService'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Service.inheritance_column to use another column for that information.
/opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20170211073944_disable_invalid_service_templates.rb:11:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
NameError: uninitialized constant GitlabCiService
/opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20170211073944_disable_invalid_service_templates.rb:11:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
== 20151215132013 AddPagesSizeToApplicationSettings: migrating ================
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0005s
-- transaction()
-- add_column(:application_settings, :max_pages_size, :integer, {:default=>nil})
-> 0.1542s
-- change_column_default(:application_settings, :max_pages_size, 100)
-> 0.2231s
-> 0.4036s
-- exec_query("SELECT COUNT(*) AS count FROM \"application_settings\"")
-> 0.0014s
-- exec_query("SELECT \"application_settings\".\"id\" FROM \"application_settings\" ORDER BY \"application_settings\".\"id\" ASC LIMIT 1")
-> 0.0008s
-- exec_query("SELECT \"application_settings\".\"id\" FROM \"application_settings\" WHERE \"application_settings\".\"id\" >= 1 ORDER BY \"application_settings\".\"id\" ASC LIMIT 1 OFFSET 1")
-> 0.0009s
-- execute("UPDATE \"application_settings\" SET \"max_pages_size\" = 100 WHERE \"application_settings\".\"id\" >= 1")
-> 0.0030s
-- change_column_null(:application_settings, :max_pages_size, false)
-> 0.0018s
== 20151215132013 AddPagesSizeToApplicationSettings: migrated (0.4203s) =======
== 20160210105555 CreatePagesDomain: migrating ================================
-- create_table(:pages_domains)
-> 0.5399s
-- add_index(:pages_domains, :domain, {:unique=>true})
-> 0.0089s
== 20160210105555 CreatePagesDomain: migrated (0.5491s) =======================
== 20161114024742 AddCoverageRegexToBuilds: migrating =========================
-- add_column(:ci_builds, :coverage_regex, :string)
-> 0.0309s
== 20161114024742 AddCoverageRegexToBuilds: migrated (0.0310s) ================
== 20170104150317 RequeuePendingDeleteProjects: migrating =====================
== 20170104150317 RequeuePendingDeleteProjects: migrated (0.4077s) ============
== 20170124174637 AddForeignKeysToTimelogs: migrating =========================
-- change_table(:timelogs)
-> 0.0061s
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0004s
-- add_index(:timelogs, :issue_id, {:algorithm=>:concurrently})
-> 0.0113s
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0003s
-- add_index(:timelogs, :merge_request_id, {:algorithm=>:concurrently})
-> 0.0094s
-- execute(" ALTER TABLE timelogs ADD CONSTRAINT \"fk_timelogs_issues_issue_id\" FOREIGN KEY (issue_id) REFERENCES \"issues\" (id) ON DELETE CASCADE NOT VALID;\n ALTER TABLE timelogs ADD CONSTRAINT \"fk_timelogs_merge_requests_merge_request_id\" FOREIGN KEY (merge_request_id) REFERENCES \"merge_requests\" (id) ON DELETE CASCADE NOT VALID;\n")
-> 0.1383s
== 20170124174637 AddForeignKeysToTimelogs: migrated (0.2389s) ================
== 20170126174819 AddTerminalMaxSessionTimeToApplicationSettings: migrating ===
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0004s
-- transaction()
-- add_column(:application_settings, :terminal_max_session_time, :integer, {:default=>nil})
-> 0.0018s
-- change_column_default(:application_settings, :terminal_max_session_time, 0)
-> 0.0054s
-> 0.0093s
-- exec_query("SELECT COUNT(*) AS count FROM \"application_settings\"")
-> 0.0009s
-- exec_query("SELECT \"application_settings\".\"id\" FROM \"application_settings\" ORDER BY \"application_settings\".\"id\" ASC LIMIT 1")
-> 0.0006s
-- exec_query("SELECT \"application_settings\".\"id\" FROM \"application_settings\" WHERE \"application_settings\".\"id\" >= 1 ORDER BY \"application_settings\".\"id\" ASC LIMIT 1 OFFSET 1")
-> 0.0007s
-- execute("UPDATE \"application_settings\" SET \"terminal_max_session_time\" = 0 WHERE \"application_settings\".\"id\" >= 1")
-> 0.0018s
-- change_column_null(:application_settings, :terminal_max_session_time, false)
-> 0.0017s
== 20170126174819 AddTerminalMaxSessionTimeToApplicationSettings: migrated (0.0173s)
== 20170127032550 RemoveBacklogListsFromBoards: migrating =====================
-- execute(" DELETE FROM lists WHERE list_type = 0;\n")
-> 0.0229s
== 20170127032550 RemoveBacklogListsFromBoards: migrated (0.0230s) ============
== 20170204181513 AddIndexToLabelsForTypeAndProject: migrating ================
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0004s
-- add_index(:labels, [:type, :project_id], {:algorithm=>:concurrently})
-> 0.0476s
== 20170204181513 AddIndexToLabelsForTypeAndProject: migrated (0.0483s) =======
== 20170206071414 AddRecaptchaVerifiedToSpamLogs: migrating ===================
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0003s
-- transaction()
-- add_column(:spam_logs, :recaptcha_verified, :boolean, {:default=>nil})
-> 0.0339s
-- change_column_default(:spam_logs, :recaptcha_verified, false)
-> 0.0344s
-> 0.0708s
-- exec_query("SELECT COUNT(*) AS count FROM \"spam_logs\"")
-> 0.0012s
-- change_column_null(:spam_logs, :recaptcha_verified, false)
-> 0.0019s
== 20170206071414 AddRecaptchaVerifiedToSpamLogs: migrated (0.0751s) ==========
== 20170206101007 RemoveTrackableColumnsFromTimelogs: migrating ===============
-- remove_columns(:timelogs, :trackable_id, :trackable_type)
-> 0.0548s
== 20170206101007 RemoveTrackableColumnsFromTimelogs: migrated (0.0549s) ======
== 20170206101030 ValidateForeignKeysOnTimelogs: migrating ====================
-- execute(" ALTER TABLE timelogs VALIDATE CONSTRAINT \"fk_timelogs_issues_issue_id\";\n ALTER TABLE timelogs VALIDATE CONSTRAINT \"fk_timelogs_merge_requests_merge_request_id\";\n")
-> 0.0220s
== 20170206101030 ValidateForeignKeysOnTimelogs: migrated (0.0221s) ===========
== 20170210062829 AddIndexToLabelsForTitleAndProject: migrating ===============
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0004s
-- add_index(:labels, :title, {:algorithm=>:concurrently})
-> 0.0123s
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0003s
-- add_index(:labels, :project_id, {:algorithm=>:concurrently})
-> 0.0097s
== 20170210062829 AddIndexToLabelsForTitleAndProject: migrated (0.0232s) ======
== 20170210075922 AddIndexToCiTriggerRequestsForCommitId: migrating ===========
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0006s
-- add_index(:ci_trigger_requests, :commit_id, {:algorithm=>:concurrently})
-> 0.0205s
== 20170210075922 AddIndexToCiTriggerRequestsForCommitId: migrated (0.0214s) ==
== 20170210103609 AddIndexToUserAgentDetail: migrating ========================
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0005s
-- add_index(:user_agent_details, [:subject_id, :subject_type], {:algorithm=>:concurrently})
-> 0.0673s
== 20170210103609 AddIndexToUserAgentDetail: migrated (0.0681s) ===============
== 20170211073944 DisableInvalidServiceTemplates: migrating ===================
================================================================================
Error executing action `run` on resource 'bash[migrate gitlab-rails database]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20170301-13404-1nblo70" ----
STDOUT: rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
The single-table inheritance mechanism failed to locate the subclass: 'GitlabCiService'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Service.inheritance_column to use another column for that information./opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20170211073944_disable_invalid_service_templates.rb:11:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'GitlabCiService'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Service.inheritance_column to use another column for that information.
/opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20170211073944_disable_invalid_service_templates.rb:11:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
NameError: uninitialized constant GitlabCiService
/opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20170211073944_disable_invalid_service_templates.rb:11:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
== 20151215132013 AddPagesSizeToApplicationSettings: migrating ================
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0005s
-- transaction()
-- add_column(:application_settings, :max_pages_size, :integer, {:default=>nil})
-> 0.1542s
-- change_column_default(:application_settings, :max_pages_size, 100)
-> 0.2231s
-> 0.4036s
-- exec_query("SELECT COUNT(*) AS count FROM \"application_settings\"")
-> 0.0014s
-- exec_query("SELECT \"application_settings\".\"id\" FROM \"application_settings\" ORDER BY \"application_settings\".\"id\" ASC LIMIT 1")
-> 0.0008s
-- exec_query("SELECT \"application_settings\".\"id\" FROM \"application_settings\" WHERE \"application_settings\".\"id\" >= 1 ORDER BY \"application_settings\".\"id\" ASC LIMIT 1 OFFSET 1")
-> 0.0009s
-- execute("UPDATE \"application_settings\" SET \"max_pages_size\" = 100 WHERE \"application_settings\".\"id\" >= 1")
-> 0.0030s
-- change_column_null(:application_settings, :max_pages_size, false)
-> 0.0018s
== 20151215132013 AddPagesSizeToApplicationSettings: migrated (0.4203s) =======
== 20160210105555 CreatePagesDomain: migrating ================================
-- create_table(:pages_domains)
-> 0.5399s
-- add_index(:pages_domains, :domain, {:unique=>true})
-> 0.0089s
== 20160210105555 CreatePagesDomain: migrated (0.5491s) =======================
== 20161114024742 AddCoverageRegexToBuilds: migrating =========================
-- add_column(:ci_builds, :coverage_regex, :string)
-> 0.0309s
== 20161114024742 AddCoverageRegexToBuilds: migrated (0.0310s) ================
== 20170104150317 RequeuePendingDeleteProjects: migrating =====================
== 20170104150317 RequeuePendingDeleteProjects: migrated (0.4077s) ============
== 20170124174637 AddForeignKeysToTimelogs: migrating =========================
-- change_table(:timelogs)
-> 0.0061s
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0004s
-- add_index(:timelogs, :issue_id, {:algorithm=>:concurrently})
-> 0.0113s
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0003s
-- add_index(:timelogs, :merge_request_id, {:algorithm=>:concurrently})
-> 0.0094s
-- execute(" ALTER TABLE timelogs ADD CONSTRAINT \"fk_timelogs_issues_issue_id\" FOREIGN KEY (issue_id) REFERENCES \"issues\" (id) ON DELETE CASCADE NOT VALID;\n ALTER TABLE timelogs ADD CONSTRAINT \"fk_timelogs_merge_requests_merge_request_id\" FOREIGN KEY (merge_request_id) REFERENCES \"merge_requests\" (id) ON DELETE CASCADE NOT VALID;\n")
-> 0.1383s
== 20170124174637 AddForeignKeysToTimelogs: migrated (0.2389s) ================
== 20170126174819 AddTerminalMaxSessionTimeToApplicationSettings: migrating ===
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0004s
-- transaction()
-- add_column(:application_settings, :terminal_max_session_time, :integer, {:default=>nil})
-> 0.0018s
-- change_column_default(:application_settings, :terminal_max_session_time, 0)
-> 0.0054s
-> 0.0093s
-- exec_query("SELECT COUNT(*) AS count FROM \"application_settings\"")
-> 0.0009s
-- exec_query("SELECT \"application_settings\".\"id\" FROM \"application_settings\" ORDER BY \"application_settings\".\"id\" ASC LIMIT 1")
-> 0.0006s
-- exec_query("SELECT \"application_settings\".\"id\" FROM \"application_settings\" WHERE \"application_settings\".\"id\" >= 1 ORDER BY \"application_settings\".\"id\" ASC LIMIT 1 OFFSET 1")
-> 0.0007s
-- execute("UPDATE \"application_settings\" SET \"terminal_max_session_time\" = 0 WHERE \"application_settings\".\"id\" >= 1")
-> 0.0018s
-- change_column_null(:application_settings, :terminal_max_session_time, false)
-> 0.0017s
== 20170126174819 AddTerminalMaxSessionTimeToApplicationSettings: migrated (0.0173s)
== 20170127032550 RemoveBacklogListsFromBoards: migrating =====================
-- execute(" DELETE FROM lists WHERE list_type = 0;\n")
-> 0.0229s
== 20170127032550 RemoveBacklogListsFromBoards: migrated (0.0230s) ============
== 20170204181513 AddIndexToLabelsForTypeAndProject: migrating ================
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0004s
-- add_index(:labels, [:type, :project_id], {:algorithm=>:concurrently})
-> 0.0476s
== 20170204181513 AddIndexToLabelsForTypeAndProject: migrated (0.0483s) =======
== 20170206071414 AddRecaptchaVerifiedToSpamLogs: migrating ===================
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0003s
-- transaction()
-- add_column(:spam_logs, :recaptcha_verified, :boolean, {:default=>nil})
-> 0.0339s
-- change_column_default(:spam_logs, :recaptcha_verified, false)
-> 0.0344s
-> 0.0708s
-- exec_query("SELECT COUNT(*) AS count FROM \"spam_logs\"")
-> 0.0012s
-- change_column_null(:spam_logs, :recaptcha_verified, false)
-> 0.0019s
== 20170206071414 AddRecaptchaVerifiedToSpamLogs: migrated (0.0751s) ==========
== 20170206101007 RemoveTrackableColumnsFromTimelogs: migrating ===============
-- remove_columns(:timelogs, :trackable_id, :trackable_type)
-> 0.0548s
== 20170206101007 RemoveTrackableColumnsFromTimelogs: migrated (0.0549s) ======
== 20170206101030 ValidateForeignKeysOnTimelogs: migrating ====================
-- execute(" ALTER TABLE timelogs VALIDATE CONSTRAINT \"fk_timelogs_issues_issue_id\";\n ALTER TABLE timelogs VALIDATE CONSTRAINT \"fk_timelogs_merge_requests_merge_request_id\";\n")
-> 0.0220s
== 20170206101030 ValidateForeignKeysOnTimelogs: migrated (0.0221s) ===========
== 20170210062829 AddIndexToLabelsForTitleAndProject: migrating ===============
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0004s
-- add_index(:labels, :title, {:algorithm=>:concurrently})
-> 0.0123s
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0003s
-- add_index(:labels, :project_id, {:algorithm=>:concurrently})
-> 0.0097s
== 20170210062829 AddIndexToLabelsForTitleAndProject: migrated (0.0232s) ======
== 20170210075922 AddIndexToCiTriggerRequestsForCommitId: migrating ===========
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0006s
-- add_index(:ci_trigger_requests, :commit_id, {:algorithm=>:concurrently})
-> 0.0205s
== 20170210075922 AddIndexToCiTriggerRequestsForCommitId: migrated (0.0214s) ==
== 20170210103609 AddIndexToUserAgentDetail: migrating ========================
-- transaction_open?()
-> 0.0000s
-- execute("SET statement_timeout TO 0")
-> 0.0005s
-- add_index(:user_agent_details, [:subject_id, :subject_type], {:algorithm=>:concurrently})
-> 0.0673s
== 20170210103609 AddIndexToUserAgentDetail: migrated (0.0681s) ===============
== 20170211073944 DisableInvalidServiceTemplates: migrating ===================
STDERR:
---- End output of "bash" "/tmp/chef-script20170301-13404-1nblo70" ----
Ran "bash" "/tmp/chef-script20170301-13404-1nblo70" returned 1
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/database_migrations.rb
51: bash "migrate gitlab-rails database" do
52: code <<-EOH
53: set -e
54: log_file="#{node['gitlab']['gitlab-rails']['log_directory']}/gitlab-rails-db-migrate-$(date +%Y-%m-%d-%H-%M-%S).log"
55: umask 077
56: /opt/gitlab/bin/gitlab-rake gitlab:db:configure 2>& 1 | tee ${log_file}
57: STATUS=${PIPESTATUS[0]}
58: echo $STATUS > #{db_migrate_status_file}
59: exit $STATUS
60: EOH
61: environment env_variables unless env_variables.empty?
62: notifies :run, 'execute[enable pg_trgm extension]', :before unless omnibus_helper.not_listening?("postgresql") || !node['gitlab']['postgresql']['enable']
63: notifies :run, "execute[clear the gitlab-rails cache]", :immediately unless omnibus_helper.not_listening?("redis") || !node['gitlab']['gitlab-rails']['rake_cache_clear']
64: dependent_services.each do |svc|
65: notifies :restart, svc, :immediately
66: end
67: not_if "(test -f #{db_migrate_status_file}) && (cat #{db_migrate_status_file} | grep -Fx 0)"
68: only_if { node['gitlab']['gitlab-rails']['auto_migrate'] }
69: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/database_migrations.rb:51:in `from_file'
bash("migrate gitlab-rails database") do
action [:run]
updated true
retries 0
retry_delay 2
default_guard_interpreter :default
command "migrate gitlab-rails database"
backup 5
returns 0
code " set -e\n log_file=\"/var/log/gitlab/gitlab-rails/gitlab-rails-db-migrate-$(date +%Y-%m-%d-%H-%M-%S).log\"\n umask 077\n /opt/gitlab/bin/gitlab-rake gitlab:db:configure 2>& 1 | tee ${log_file}\n STATUS=${PIPESTATUS[0]}\n echo $STATUS > /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-8943e22\n exit $STATUS\n"
interpreter "bash"
declared_type :bash
cookbook_name "gitlab"
recipe_name "database_migrations"
not_if "(test -f /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-8943e22) && (cat /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-8943e22 | grep -Fx 0)"
only_if { #code block }
end
Platform:
---------
x86_64-linux
Recipe: gitlab::gitlab-rails
* execute[clear the gitlab-rails cache] action run
- execute /opt/gitlab/bin/gitlab-rake cache:clear
Recipe: gitlab::unicorn
* service[unicorn] action restart
- restart service service[unicorn]
Recipe: gitlab::sidekiq
* service[sidekiq] action restart
- restart service service[sidekiq]
Running handlers:
Running handlers complete
Chef Client failed. 21 resources updated in 01 minutes 35 seconds
dpkg: error processing package gitlab-ce (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
gitlab-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)
(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)
(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)
(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)