Skip to content

Omnibus fails to upgrade the Redis node from 14.9 to 14.10

Summary

We have got a customer who's running into an issue when attempting to upgrade their Omnibus Redis node from 14.9 to 14.10. It’s happening at the Removes the geo database settings from database.yml and create a symlink to Rails root step, so we are assuming this was introduced in !5962 (merged). Their Redis node doesn’t have a /var/opt/gitlab/gitlab-rails/etc directory, and therefore they get a EnclosingDirectoryDoesNotExist error.

Relevant logs

* templatesymlink[Removes the geo database settings from database.yml and create a symlink to Rails root] action create
* template[/var/opt/gitlab/gitlab-rails/etc/database.yml] action create
* Parent directory /var/opt/gitlab/gitlab-rails/etc does not exist.
================================================================================
Error executing action `create` on resource 'template[/var/opt/gitlab/gitlab-rails/etc/database.yml]'
================================================================================
Chef::Exceptions::EnclosingDirectoryDoesNotExist
------------------------------------------------
Parent directory /var/opt/gitlab/gitlab-rails/etc does not exist.
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/templatesymlink.rb
34: template new_resource.link_to do
35: source new_resource.source
36: owner new_resource.owner
37: group new_resource.group
38: mode new_resource.mode
39: cookbook new_resource.cookbook if new_resource.cookbook
40: variables new_resource.variables
41: helpers new_resource.helpers
42: sensitive new_resource.sensitive
43: action :create
44: end
45:
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/templatesymlink.rb:34:in `block in class_from_file'
template("/var/opt/gitlab/gitlab-rails/etc/database.yml") do
action [:create]
default_guard_interpreter :default
source "database.yml.erb"
helper_modules [OutputHelper]
declared_type :template
cookbook_name "gitlab-ee"
mode "0640"
System Info:
------------
chef_version=15.17.4
platform=ubuntu
platform_version=20.04
ruby=ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
Recipe: monitoring::redis-exporter
* runit_service[redis-exporter] action restart (up to date)
Running handlers:
There was an error running gitlab-ctl reconfigure:
templatesymlink[Removes the geo database settings from database.yml and create a symlink to Rails root] (gitlab-ee::geo-secondary_disable line 34) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: template[/var/opt/gitlab/gitlab-rails/etc/database.yml] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/templatesymlink.rb line 34) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /var/opt/gitlab/gitlab-rails/etc does not exist.