Gitlab-ctl reconfigure error after fresh installation on OEL8.7 - Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb

Hi there, new to GitLab and I need help due to the issues encountered after the installation. Below is the output after I’ve ran gitlab-ctl reconfigure as shown below

[root@host1~]# gitlab-ctl reconfigure
[2023-10-30T14:58:28-06: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: Patents | Chef
Infra Phase starting
[2023-10-30T14:58:28-06:00] INFO: *** Cinc Client 17.10.0 ***
[2023-10-30T14:58:28-06:00] INFO: Platform: x86_64-linux
[2023-10-30T14:58:28-06:00] INFO: Cinc-client pid: 26121
[2023-10-30T14:58:31-06:00] INFO: Setting the run_list to [“recipe[gitlab]”] from CLI options
[2023-10-30T14:58:31-06:00] INFO: Run List is [recipe[gitlab]]
[2023-10-30T14:58:31-06:00] INFO: Run List expands to [gitlab]
[2023-10-30T14:58:31-06:00] INFO: Starting Cinc Client Run for msatool3.msa.albertamsa.ca
[2023-10-30T14:58:31-06:00] INFO: Running start handlers
[2023-10-30T14:58:31-06:00] INFO: Start handlers complete.
Resolving cookbooks for run list: [“gitlab”]
[2023-10-30T14:58:32-06:00] INFO: Loading cookbooks [gitlab@0.0.1, package@0.1.0, logrotate@0.1.0, postgresql@0.1.0, redis@0.1.0, monitoring@0.1.0, registry@0.1.0, mattermost@0.1.0, consul@0.1.0, gitaly@0.1.0, praefect@0.1.0, gitlab-kas@0.1.0, gitlab-pages@0.1.0, letsencrypt@0.1.0, nginx@0.1.0, runit@5.1.7, acme@4.1.6, crond@0.1.0]
Synchronizing cookbooks:

  • package (0.1.0)
  • logrotate (0.1.0)
  • gitlab (0.0.1)
  • redis (0.1.0)
  • postgresql (0.1.0)
  • registry (0.1.0)
  • mattermost (0.1.0)
  • consul (0.1.0)
  • praefect (0.1.0)
  • gitaly (0.1.0)
  • letsencrypt (0.1.0)
  • monitoring (0.1.0)
  • acme (4.1.6)
  • nginx (0.1.0)
  • runit (5.1.7)
  • gitlab-pages (0.1.0)
  • crond (0.1.0)
  • gitlab-kas (0.1.0)
    Installing cookbook gem dependencies:
    Compiling cookbooks…
    /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!
    Loading Cinc Auditor profile files:
    Loading Cinc Auditor input files:
    Loading Cinc Auditor waiver files:
    [2023-10-30T14:58:33-06:00] WARN: Resource sysctl built into Cinc Client is being overridden by the resource from a cookbook. Please upgrade your cookbook or remove the cookbook from your run_list.
    [2023-10-30T14:58:33-06:00] INFO: Generating default secrets
    [2023-10-30T14:58:35-06:00] INFO: Generating gitlab-secrets.json file

================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb

NoMethodError

undefined method `set_enable’ for Services:Module

Cookbook Trace: (most recent call first)

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/prometheus.rb:45:in parse_exporter_enabled' /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/prometheus.rb:31:in parse_variables’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:199:in block in generate_config' /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:197:in each’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:197:in generate_config' /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:24:in from_file’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:27:in `from_file’

Relevant File Content:

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/prometheus.rb:

38: def parse_monitoring_enabled
39: # Disabled monitoring if it has been explicitly set to false
40: Services.disable_group(‘prometheus’, include_system: true) if Gitlab[‘prometheus_monitoring’][‘enable’] == false
41: end
42:
43: def parse_exporter_enabled
44: # Disable exporters by default if their service is not managed on this node
45>> Services.set_enable(‘postgres_exporter’, Postgresql.postgresql_managed?) if Gitlab[‘postgres_exporter’][‘enable’].nil?
46: Services.set_enable(‘redis_exporter’, Redis.redis_managed?) if Gitlab[‘redis_exporter’][‘enable’].nil?
47: end
48:
49: def parse_flags
50: parse_prometheus_flags
51: parse_alertmanager_flags
52: parse_node_exporter_flags
53: parse_postgres_exporter_flags
54: parse_redis_exporter_flags

System Info:

chef_version=17.10.0
platform=oracle
platform_version=8.7
ruby=ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/cinc-client
executable=/opt/gitlab/embedded/bin/cinc-client

Running handlers:
[2023-10-30T14:58:35-06:00] ERROR: Running exception handlers
There was an error running gitlab-ctl reconfigure:

undefined method `set_enable’ for Services:Module

Running handlers complete
[2023-10-30T14:58:35-06:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 07 seconds
[2023-10-30T14:58:35-06:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2023-10-30T14:58:35-06:00] FATAL: ---------------------------------------------------------------------------------------
[2023-10-30T14:58:35-06:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2023-10-30T14:58:35-06:00] FATAL: ---------------------------------------------------------------------------------------
[2023-10-30T14:58:35-06:00] FATAL: NoMethodError: undefined method `set_enable’ for Services:Module
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Please find below output from cinc-stacktrace.out for further reference as shown:

host1 ~]# cat /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
Generated at 2023-10-30 14:58:35 -0600
NoMethodError: undefined method set_enable' for Services:Module /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/prometheus.rb:45:in parse_exporter_enabled’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/prometheus.rb:31:in parse_variables' /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:199:in block in generate_config’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:197:in each' /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:197:in generate_config’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:24:in from_file' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/mixin/from_file.rb:34:in instance_eval’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/mixin/from_file.rb:34:in from_file' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/cookbook_version.rb:233:in load_ruby_recipe’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/cookbook_version.rb:203:in load_recipe' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:417:in load_recipe’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:373:in block in include_recipe' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:372:in each’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:372:in include_recipe' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/dsl/include_recipe.rb:26:in include_recipe’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:27:in from_file' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/mixin/from_file.rb:34:in instance_eval’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/mixin/from_file.rb:34:in from_file' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/cookbook_version.rb:233:in load_ruby_recipe’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/cookbook_version.rb:203:in load_recipe' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:417:in load_recipe’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context/cookbook_compiler.rb:228:in block in compile_recipes' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context/cookbook_compiler.rb:225:in each’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context/cookbook_compiler.rb:225:in compile_recipes' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context/cookbook_compiler.rb:109:in compile’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/run_context.rb:247:in load' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/policy_builder/expand_node_object.rb:103:in setup_run_context’
/opt/gitlab/embedded/lib/ruby/3.0.0/forwardable.rb:238:in setup_run_context' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/client.rb:501:in setup_run_context’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/client.rb:281:in run' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/application.rb:305:in run_with_graceful_exit_option’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/application.rb:281:in block in run_chef_client' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/local_mode.rb:42:in with_server_connectivity’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/application.rb:264:in run_chef_client' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/application/base.rb:352:in run_application’
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/application.rb:67:in run' /opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/chef-bin-17.10.0/bin/cinc-client:25:in <top (required)>’
/opt/gitlab/embedded/bin/cinc-client:25:in load' /opt/gitlab/embedded/bin/cinc-client:25:in

Thanks in advance for your help.

Regards,

J