Reconfigure Consul command fails with NoMethodError: undefined method `split' for nil:NilClass
Summary
During upgrading 10k performance environment to the latest nightly image, Consul failed to reconfigure. Related to 734b156d
Steps to reproduce
Upgrading 10k from 10461e23b3e
to the latest nightly. - https://gitlab.com/gitlab-org/quality/gitlab-environment-toolkit-configs/quality/-/jobs/5658968909#L1770
What is the current bug behavior?
Reconfigure Consul command fails
Error log
fatal: [gitlab-qa-10k-consul-1]: FAILED! => changed=true
attempts: 3
cmd:
- gitlab-ctl
- reconfigure
delta: '0:00:13.799661'
end: '2023-12-01 04:30:58.688690'
msg: non-zero return code
rc: 1
start: '2023-12-01 04:30:44.889029'
stderr: |-
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/selinux_distro_helper.rb:2: warning: already initialized constant SELinuxDistroHelper::REDHAT_RELEASE_FILE
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/selinux_distro_helper.rb:2: warning: previous definition of REDHAT_RELEASE_FILE was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/selinux_distro_helper.rb:3: warning: already initialized constant SELinuxDistroHelper::OS_RELEASE_FILE
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/selinux_distro_helper.rb:3: warning: previous definition of OS_RELEASE_FILE was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/gitlab_cluster.rb:16: warning: already initialized constant GitlabCluster::CONFIG_PATH
/opt/gitlab/embedded/cookbooks/package/libraries/gitlab_cluster.rb:16: warning: previous definition of CONFIG_PATH was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/gitlab_cluster.rb:17: warning: already initialized constant GitlabCluster::JSON_FILE
/opt/gitlab/embedded/cookbooks/package/libraries/gitlab_cluster.rb:17: warning: previous definition of JSON_FILE was here
Top level ::CompositeIO is deprecated, require 'multipart/post' and use `Multipart::Post::CompositeReadIO` instead!
Top level ::Parts is deprecated, require 'multipart/post' and use `Multipart::Post::Parts` instead!
There was an error running gitlab-ctl reconfigure:
ruby_block[warn consul version mismatch] (consul::enable_daemon line 62) had an error: NoMethodError: undefined method `split' for nil:NilClass
major_installed, minor_installed = installed_version.split('.')[0..1]
^^^^^^
stderr_lines: <omitted>
stdout: |-
[2023-12-01T04:30:48+00:00] INFO: Started Cinc Zero at chefzero://localhost:1 with repository at /opt/gitlab/embedded (One version per cookbook)
Cinc Client, version 17.10.0
Patents: https://www.chef.io/patents
Infra Phase starting
[2023-12-01T04:30:48+00:00] INFO: *** Cinc Client 17.10.0 ***
[2023-12-01T04:30:48+00:00] INFO: Platform: x86_64-linux
What is the expected correct behavior?
Reconfigure passes
Relevant logs
Relevant logs
Environment details
- Operating System: Ubuntu 20.04
- Installation Target, remove incorrect values:
- VM: GCP
Edited by Nailia Iskhakova