Update to 17.0.0 on Centos 7 failed
On a Centos 7 system with Omnibus installation the upgrade to 17.0.0 failed in gitlab-ctl reconfigure.
RuntimeError
------------
Execution of the command `/opt/gitlab/embedded/bin/gitlab-kas --version` failed with a non-zero exit code (2)
stdout:
stderr: panic: failed to parse "2024-05-15T09:09:49+0000" into RFC3339 compliant time object, because: parsing time "2024-05-15T09:09:49+0000" as "2006-01-02T15:04:05Z07:00": cannot parse "+0000" as "Z07:00". Fix the build process.
goroutine 1 [running]:
gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.init.0()
/var/cache/omnibus/src/gitlab-kas/cmd/build_info.go:18 +0xf3
Cookbook Trace: (most recent call first)
----------------------------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/version_helper.rb:16:in `version'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/version_file.rb:32:in `block (2 levels) in class_from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/version_file.rb:31:in `block in class_from_file'
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-kas/recipes/enable.rb
67: version_file 'Create version file for Gitlab KAS' do
68: version_file_path File.join(working_dir, 'VERSION')
69: version_check_cmd '/opt/gitlab/embedded/bin/gitlab-kas --version'
70: notifies :restart, 'runit_service[gitlab-kas]' if omnibus_helper.should_notify?('gitlab-kas')
71: end
72:
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-kas/recipes/enable.rb:67:in `from_file'
version_file("Create version file for Gitlab KAS") do
action [:create]
default_guard_interpreter :default
declared_type :version_file
cookbook_name "gitlab-kas"
recipe_name "enable"
version_file_path "/var/opt/gitlab/gitlab-kas/VERSION"
version_check_cmd "/opt/gitlab/embedded/bin/gitlab-kas --version"
end
System Info:
------------
chef_version=18.3.0
platform=centos
platform_version=7.9.2009
ruby=ruby 3.1.5p253 (2024-04-023 revision 1945f8dc0e) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/cinc-client
executable=/opt/gitlab/embedded/bin/cinc-client
The problem is reproduceable by running gitlab-kas --version:
# /opt/gitlab/embedded/bin/gitlab-kas --version
panic: failed to parse "2024-05-15T09:09:49+0000" into RFC3339 compliant time object, because: parsing time "2024-05-15T09:09:49+0000" as "2006-01-02T15:04:05Z07:00": cannot parse "+0000" as "Z07:00". Fix the build process.
goroutine 1 [running]:
gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.init.0() /var/cache/omnibus/src/gitlab-kas/cmd/build_info.go:18 +0xf3