Upgrade fail on pg-upgrade

On Ubuntu 16 with repo gitlab configured i do a apt-get upgrade. When i do pg-upgrade fail:

  • gitlab-ctl pg-upgrade
    Checking for an omnibus managed postgresql: OK
    Checking if we already upgraded: NOT OK
    Checking for a newer version of PostgreSQL to install: OK
    Upgrading PostgreSQL to 9.6.3
    Checking if PostgreSQL bin files are symlinked to the expected location: OK
    Toggling deploy page:cp /opt/gitlab/embedded/service/gitlab-rails/public/deploy.html /opt/gitlab/embedded/service/gitlab-rails/public/index.html
    Toggling deploy page: OK
    Toggling services:ok: down: logrotate: 0s, normally up
    ok: down: sidekiq: 0s, normally up
    Toggling services: OK
    Waiting 30 seconds to ensure tasks complete before PostgreSQL upgrade
    Please hit Ctrl-C now if you want to cancel the upgrade
    Stopping the database:ok: down: postgresql: 1s, normally up
    Stopping the database: OK
    Update the symlinks: OK
    Creating temporary data directory: OK
    Initializing the new database: OK
    Upgrading the data: OK
    Move the old data directory out of the way: OK
    Rename the new data directory: OK
    Upgrade is complete, doing post configuration steps
    Running reconfigure:Starting Chef Client, version 12.12.15
    resolving cookbooks for run list: [“gitlab”]
    Synchronizing Cookbooks:
    • package (0.0.0)
    • runit (0.14.2)
    • registry (0.1.0)
    • gitlab (0.0.1)
      Installing Cookbook Gems:
      Compiling Cookbooks…
      Recipe: gitlab::default
    • directory[/etc/gitlab] action create (up to date)
      /sbin/init: opción no reconocida «–version»
      -.mount loaded active mounted /
      Converging 451 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[/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 (up to date)
      • link[Link /opt/gitlab/embedded/service/gitlab-shell/config.yml to /var/opt/gitlab/gitlab-shell/config.yml] action create (up to date)
        (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
      • execute the ruby block directory resource: /var/opt/gitlab/gitlab-rails/shared
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/artifacts] action run (skipped due to not_if)
    • ruby_block[directory resource: true] action run
Error executing action `run` on resource 'ruby_block[directory resource: true]'
no implicit conversion of true into String
Cookbook Trace:
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/storage_directory_helper.rb:42:in `expand_path'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/storage_directory_helper.rb:42:in `ensure_directory_exists'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb:29:in `block (3 levels) in from_file'
Resource Declaration:
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb
 26:   ruby_block "directory resource: #{params[:path]}" do
 27:     block do
 28:       # Ensure the directory exists
 29:       storage_helper.ensure_directory_exists(params[:path])
 31:       # Ensure the permissions are set
 32:       storage_helper.ensure_permissions_set(params[:path])
 34:       # Error out if we have not achieved the target permissions
 35:       storage_helper.validate!(params[:path])
 36:     end
 37:     not_if { storage_helper.validate(params[:path]) }
 38:   end
 39: end
Compiled Resource:
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb:26:in `block in from_file'
ruby_block("directory resource: true") do
  params {:path=>true, :owner=>"git", :group=>nil, :mode=>"0700", :name=>true}
  action [:run]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  block_name "directory resource: true"
  declared_type :ruby_block
  cookbook_name "gitlab"
  recipe_name "gitlab-rails"
  block #<Proc:0x000000050b9938@/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb:27>
  not_if { #code block }

Running handlers:
Running handlers complete
Chef Client failed. 2 resources updated in 05 seconds
Running reconfigure: NOT OK
== Fatal error ==
Something went wrong during final reconfiguration, please check the output
== Reverting ==
ok: down: postgresql: 21s, normally up
ok: run: postgresql: (pid 18606) 0s
== Reverted ==
== Reverted to 9.2.18. Please check output for what went wrong ==
Toggling deploy page:rm -f /opt/gitlab/embedded/service/gitlab-rails/public/index.html
Toggling deploy page: OK
Toggling services:ok: run: logrotate: (pid 18620) 0s
ok: run: sidekiq: (pid 18626) 0s
Toggling services: OK

Seems like a bug and I see you reported it https://gitlab.com/gitlab-org/omnibus-gitlab/issues/2652. Wait for the devs for a response.