Error in upgrade from 17.0.8 to 17.1.[0-2]

Hello,

We are running self managed version of gitlab running on docker.
Trying to upgrade Image from 17.0.8 to 17.1.0 or 17.1.1 or 17.1.2 we get an error related to grafana:

There was an error running gitlab-ctl reconfigure:

Reading unsupported config value grafana.

System Info:
------------
chef_version=18.3.0
platform=ubuntu
platform_version=22.04
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


Running handlers:
[2024-09-30T12:56:34+00:00] ERROR: Running exception handlers
Running handlers complete
[2024-09-30T12:56:34+00:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 04 seconds
[2024-09-30T12:56:34+00:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2024-09-30T12:56:34+00:00] FATAL: ---------------------------------------------------------------------------------------
[2024-09-30T12:56:34+00:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2024-09-30T12:56:34+00:00] FATAL: ---------------------------------------------------------------------------------------
[2024-09-30T12:56:34+00:00] FATAL: Mixlib::Config::UnknownConfigOptionError: Reading unsupported config value grafana

As I did research and according to some posted issue the grafana parameter has been disabled

[root@oodc-gitlab ~]# docker exec 049cfaa95edb cat /etc/gitlab/gitlab.rb | grep grafana
        ##! Docs: https://docs.gitlab.com/ee/administration/monitoring/prometheus/#prometheus-as-a-grafana-data-source
        grafana['enable'] = false
        # grafana['log_directory'] = '/var/log/gitlab/grafana'
        # grafana['home'] = '/var/opt/gitlab/grafana'
        # grafana['admin_password'] = 'xxxxxxxxxxxx'
        # grafana['allow_user_sign_up'] = false
        # grafana['basic_auth_enabled'] = false
        # grafana['disable_login_form'] = true
        # grafana['gitlab_application_id'] = 'GITLAB_APPLICATION_ID'
        # grafana['gitlab_secret'] = 'GITLAB_SECRET'
        # grafana['env_directory'] = '/opt/gitlab/etc/grafana/env'
        # grafana['allowed_groups'] = []
        # grafana['gitlab_auth_sign_up'] = true
        # grafana['env'] = {
        # grafana['metrics_enabled'] = false
        # grafana['metrics_basic_auth_username'] = 'grafana_metrics' # default: nil
        # grafana['metrics_basic_auth_password'] = 'please_set_a_unique_password' # default: nil
        # grafana['alerting_enabled'] = false
        # See: http://docs.grafana.org/administration/configuration/#smtp
        # grafana['smtp'] = {
        #   'from_address' => 'admin@grafana.localhost',
        # grafana['reporting_enabled'] = true
        # See: http://docs.grafana.org/administration/provisioning/#dashboards
        # grafana['dashboards'] = [
        #       'path' => '/opt/gitlab/embedded/service/grafana-dashboards',
        # See: http://docs.grafana.org/administration/provisioning/#example-datasource-config-file
        # grafana['datasources'] = [
        # grafana['http_addr'] = 'localhost'
        # grafana['http_port'] = 3000

After changing the config parameter I executed gitlab-ctl start / gitlab-ctl reconfigure and it didnt’ help showing the same error.

Generated at 2024-09-30 13:18:35 +0000
Mixlib::Config::UnknownConfigOptionError: Reading unsupported config value grafana.
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/mixlib-config-3.0.27/lib/mixlib/config.rb:642:in `internal_get'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:125:in `internal_get'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/mixlib-config-3.0.27/lib/mixlib/config.rb:656:in `internal_get_or_set'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/mixlib-config-3.0.27/lib/mixlib/config.rb:557:in `method_missing'
(eval):81:in `from_file'
/assets/gitlab.rb:34:in `eval'
/assets/gitlab.rb:34:in `from_file'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/mixlib-config-3.0.27/lib/mixlib/config.rb:63:in `instance_eval'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/mixlib-config-3.0.27/lib/mixlib/config.rb:63:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:105:in `block in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/config_mash.rb:35:in `auto_vivify'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:105:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:28:in `from_file'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/mixin/from_file.rb:34:in `instance_eval'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/mixin/from_file.rb:34:in `from_file'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/cookbook_version.rb:233:in `load_ruby_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/cookbook_version.rb:203:in `load_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context.rb:429:in `load_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context.rb:385:in `block in include_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context.rb:384:in `each'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context.rb:384:in `include_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.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.1.0/gems/chef-18.3.0/lib/chef/mixin/from_file.rb:34:in `instance_eval'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/mixin/from_file.rb:34:in `from_file'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/cookbook_version.rb:233:in `load_ruby_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/cookbook_version.rb:203:in `load_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context.rb:429:in `load_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context.rb:385:in `block in include_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context.rb:384:in `each'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context.rb:384:in `include_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/dsl/include_recipe.rb:26:in `include_recipe'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/default.rb:22:in `from_file'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/mixin/from_file.rb:34:in `instance_eval'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/mixin/from_file.rb:34:in `from_file'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/cookbook_version.rb:233:in `load_ruby_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/cookbook_version.rb:203:in `load_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context.rb:429:in `load_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context/cookbook_compiler.rb:228:in `block in compile_recipes'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context/cookbook_compiler.rb:225:in `each'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context/cookbook_compiler.rb:225:in `compile_recipes'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context/cookbook_compiler.rb:109:in `compile'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/run_context.rb:259:in `load'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/policy_builder/expand_node_object.rb:103:in `setup_run_context'
/opt/gitlab/embedded/lib/ruby/3.1.0/forwardable.rb:238:in `setup_run_context'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/client.rb:499:in `setup_run_context'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/client.rb:294:in `run'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/application.rb:305:in `run_with_graceful_exit_option'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/application.rb:281:in `block in run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/local_mode.rb:42:in `with_server_connectivity'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/application.rb:264:in `run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/application/base.rb:354:in `run_application'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib/chef/application.rb:67:in `run'
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/chef-bin-18.3.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 `<main>'

Could you please advice me which steps are missing here ? What should be changed here or should I go to higher version ?

Regards

See Upgrade error while upgrading from 17.1.0 to 17.1.1 - #3 by dnsmichi

1 Like

Hello dnsmichi,
Thank you. I did exacly the steps mentioned in that post but it didnt’ solved this case

The “grafana” paramteters are delete form config and only those are commented out:

[root@oodc-gitlab ~]# docker exec -it 2d788f5d0962 cat /etc/gitlab/gitlab.rb | grep grafana
        ##! Docs: https://docs.gitlab.com/ee/administration/monitoring/prometheus/#prometheus-as-a-grafana-data-source
        # See: http://docs.grafana.org/administration/configuration/#smtp
        # grafana['smtp'] = {
        #   'from_address' => 'admin@grafana.localhost',
        # grafana['reporting_enabled'] = true
        # See: http://docs.grafana.org/administration/provisioning/#dashboards
        # grafana['dashboards'] = [
        #       'path' => '/opt/gitlab/embedded/service/grafana-dashboards',
        # See: http://docs.grafana.org/administration/provisioning/#example-datasource-config-file
        # grafana['datasources'] = [
        # grafana['http_addr'] = 'localhost'
        # grafana['http_port'] = 3000

After deleteing the “grafana lines”

[root@oodc-gitlab ~]# docker exec -it 2d788f5d0962 gitlab-ctl reconfigure
ffi-libarchive could not be loaded, libarchive is probably not installed on system, archive_file will not be available
[2024-10-01T06:47:28+00:00] INFO: Started Cinc Zero at chefzero://localhost:1 with repository at /opt/gitlab/embedded (One version per cookbook)
Cinc Client, version 18.3.0
Patents: https://www.chef.io/patents
Infra Phase starting
[2024-10-01T06:47:28+00:00] INFO: *** Cinc Client 18.3.0 ***
[2024-10-01T06:47:28+00:00] INFO: Platform: x86_64-linux
[2024-10-01T06:47:28+00:00] INFO: Cinc-client pid: 40
[2024-10-01T06:47:29+00:00] INFO: Setting the run_list to ["recipe[gitlab-ee]"] from CLI options
[2024-10-01T06:47:29+00:00] INFO: Run List is [recipe[gitlab-ee]]
[2024-10-01T06:47:29+00:00] INFO: Run List expands to [gitlab-ee]
[2024-10-01T06:47:29+00:00] INFO: Starting Cinc Client Run for gitlab
[2024-10-01T06:47:29+00:00] INFO: Running start handlers
[2024-10-01T06:47:29+00:00] INFO: Start handlers complete.
Resolving cookbooks for run list: ["gitlab-ee"]
[2024-10-01T06:47:31+00:00] INFO: Loading cookbooks [gitlab-ee@0.0.1, package@0.1.0, gitlab@0.0.1, consul@0.1.0, patroni@0.1.0, pgbouncer@0.1.0, spamcheck@0.1.0, runit@5.1.7, logrotate@0.1.0, postgresql@0.1.0, redis@0.1.0, monitoring@0.1.0, registry@0.1.0, mattermost@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, acme@4.1.6, crond@0.1.0]
Synchronizing cookbooks:
  - gitlab-ee (0.0.1)
  - package (0.1.0)
  - gitlab (0.0.1)
  - spamcheck (0.1.0)
  - patroni (0.1.0)
  - consul (0.1.0)
  - postgresql (0.1.0)
  - monitoring (0.1.0)
  - redis (0.1.0)
  - pgbouncer (0.1.0)
  - mattermost (0.1.0)
  - gitaly (0.1.0)
  - runit (5.1.7)
  - logrotate (0.1.0)
  - registry (0.1.0)
  - praefect (0.1.0)
  - nginx (0.1.0)
  - gitlab-kas (0.1.0)
  - gitlab-pages (0.1.0)
  - letsencrypt (0.1.0)
  - acme (4.1.6)
  - crond (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/helpers/secrets_helper.rb:4: warning: already initialized constant SecretsHelper::SECRETS_FILE
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/secrets_helper.rb:4: warning: previous definition of SECRETS_FILE was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/secrets_helper.rb:5: warning: already initialized constant SecretsHelper::SECRETS_FILE_CHEF_ATTR
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/secrets_helper.rb:5: warning: previous definition of SECRETS_FILE_CHEF_ATTR was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/secrets_helper.rb:6: warning: already initialized constant SecretsHelper::SKIP_GENERATE_SECRETS_CHEF_ATTR
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/secrets_helper.rb:6: warning: previous definition of SKIP_GENERATE_SECRETS_CHEF_ATTR 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
Loading Cinc Auditor profile files:
Loading Cinc Auditor input files:
Loading Cinc Auditor waiver files:

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

Mixlib::Config::UnknownConfigOptionError
----------------------------------------
Reading unsupported config value grafana.

Cookbook Trace: (most recent call first)
----------------------------------------
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:125:in `internal_get'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:105:in `block in from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/config_mash.rb:35:in `auto_vivify'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:105:in `from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:28:in `from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:27:in `from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/default.rb:22:in `from_file'

Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:

118:    end
119:
120:    # Enhance get so strict mode errors aren't thrown as long as the setting is witin our defined config
121:    def internal_get(symbol)
122:      if configuration.key?(symbol)
123:        configuration[symbol]
124:      else
125>>       super
126:      end
127:    end
128:
129:    def sanitized_config
130:      results = { "gitlab" => {}, "roles" => {}, "monitoring" => {} }
131:
132:      # Add the settings to the results
133:      sorted_settings.each do |key, value|
134:        raise "Attribute parent value invalid for key: #{key} (#{value})" if value[:parent] && !results.key?(value[:parent])

System Info:
------------
chef_version=18.3.0
platform=ubuntu
platform_version=22.04
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


Running handlers:
[2024-10-01T06:47:33+00:00] ERROR: Running exception handlers
There was an error running gitlab-ctl reconfigure:

Reading unsupported config value grafana.

Running handlers complete
[2024-10-01T06:47:33+00:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 04 seconds
[2024-10-01T06:47:33+00:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2024-10-01T06:47:33+00:00] FATAL: ---------------------------------------------------------------------------------------
[2024-10-01T06:47:33+00:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2024-10-01T06:47:33+00:00] FATAL: ---------------------------------------------------------------------------------------
[2024-10-01T06:47:33+00:00] FATAL: Mixlib::Config::UnknownConfigOptionError: Reading unsupported config value grafana.

Maybe there are additional grafana entries in the same file.

I have tryied with empty file /etc/gitlab/gitlab.rb and the same error occures:

Thank you for using GitLab Docker Image!
Current version: gitlab-ee=17.1.0-ee.0

Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:

  docker exec -it gitlab editor /etc/gitlab/gitlab.rb
  docker restart gitlab

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

If this container fails to start due to permission problems try to fix it by executing:

  docker exec -it gitlab update-permissions
  docker restart gitlab

Cleaning stale PIDs & sockets
Preparing services...
Starting services...
Configuring GitLab...
/opt/gitlab/embedded/bin/runsvdir-start: line 24: ulimit: pending signals: cannot modify limit: Operation not permitted
/opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system
ffi-libarchive could not be loaded, libarchive is probably not installed on system, archive_file will not be available
[2024-10-01T12:33:25+00:00] INFO: Started Cinc Zero at chefzero://localhost:1 with repository at /opt/gitlab/embedded (One version per cookbook)
Cinc Client, version 18.3.0
Patents: https://www.chef.io/patents
Infra Phase starting
[2024-10-01T12:33:25+00:00] INFO: *** Cinc Client 18.3.0 ***
[2024-10-01T12:33:25+00:00] INFO: Platform: x86_64-linux
[2024-10-01T12:33:25+00:00] INFO: Cinc-client pid: 36
[2024-10-01T12:33:26+00:00] INFO: Setting the run_list to ["recipe[gitlab-ee]"] from CLI options
[2024-10-01T12:33:26+00:00] INFO: Run List is [recipe[gitlab-ee]]
[2024-10-01T12:33:26+00:00] INFO: Run List expands to [gitlab-ee]
[2024-10-01T12:33:26+00:00] INFO: Starting Cinc Client Run for gitlab
[2024-10-01T12:33:26+00:00] INFO: Running start handlers
[2024-10-01T12:33:26+00:00] INFO: Start handlers complete.
Resolving cookbooks for run list: ["gitlab-ee"]
...

[2024-10-01T12:33:29+00:00] INFO: Storing updated cookbooks/crond/templates/default/sv-crond-run.erb in the cache.
  - crond (0.1.0)
  - acme (4.1.6)
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/helpers/secrets_helper.rb:4: warning: already initialized constant SecretsHelper::SECRETS_FILE
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/secrets_helper.rb:4: warning: previous definition of SECRETS_FILE was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/secrets_helper.rb:5: warning: already initialized constant SecretsHelper::SECRETS_FILE_CHEF_ATTR
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/secrets_helper.rb:5: warning: previous definition of SECRETS_FILE_CHEF_ATTR was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/secrets_helper.rb:6: warning: already initialized constant SecretsHelper::SKIP_GENERATE_SECRETS_CHEF_ATTR
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/secrets_helper.rb:6: warning: previous definition of SKIP_GENERATE_SECRETS_CHEF_ATTR 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
Loading Cinc Auditor profile files:
Loading Cinc Auditor input files:
Loading Cinc Auditor waiver files:

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

Mixlib::Config::UnknownConfigOptionError
----------------------------------------
Reading unsupported config value grafana.

Cookbook Trace: (most recent call first)
----------------------------------------
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:125:in `internal_get'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:105:in `block in from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/config_mash.rb:35:in `auto_vivify'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:105:in `from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:28:in `from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:27:in `from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/default.rb:22:in `from_file'

Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:

118:    end
119:
120:    # Enhance get so strict mode errors aren't thrown as long as the setting is witin our defined config
121:    def internal_get(symbol)
122:      if configuration.key?(symbol)
123:        configuration[symbol]
124:      else
125>>       super
126:      end
127:    end
128:
129:    def sanitized_config
130:      results = { "gitlab" => {}, "roles" => {}, "monitoring" => {} }
131:
132:      # Add the settings to the results
133:      sorted_settings.each do |key, value|
134:        raise "Attribute parent value invalid for key: #{key} (#{value})" if value[:parent] && !results.key?(value[:parent])

System Info:
------------
chef_version=18.3.0
platform=ubuntu
platform_version=22.04
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


Running handlers:
[2024-10-01T12:33:31+00:00] ERROR: Running exception handlers
There was an error running gitlab-ctl reconfigure:

Reading unsupported config value grafana.

Running handlers complete
[2024-10-01T12:33:31+00:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 06 seconds
[2024-10-01T12:33:31+00:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2024-10-01T12:33:31+00:00] FATAL: ---------------------------------------------------------------------------------------
[2024-10-01T12:33:31+00:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2024-10-01T12:33:31+00:00] FATAL: ---------------------------------------------------------------------------------------
[2024-10-01T12:33:31+00:00] FATAL: Mixlib::Config::UnknownConfigOptionError: Reading unsupported config value grafana.

Is there some other config file which point to other dependencies ?
Maybe I have skipped some depricated config … but where ?

Maybe the docker container is preconfigured with an environment variable GITLAB_OMNIBUS_CONFIG that contains the removed settings. A full restart with cleaned options could help.

As suggested:

[root@oodc-gitlab ~]# docker exec -it 4d21d347aa28 printenv | grep -i omnibus
GITLAB_OMNIBUS_CONFIG=external_url "https://gitlab.our-domain-xxx.com"
# https://docs.gitlab.com/omnibus/settings/smtp.html

[root@oodc-gitlab ~]# docker exec -it 4d21d347aa28 printenv | grep -i grafana
grafana['enable'] = false

Does some of this variable impact the config ?

The entry has a live-loaded environment variable which provides the grafana key.

I’d suggest stopping the container, modifying the startup command (either docker CLI, maybe also docker compose yml), remove the dangling configuration keys, and then start the container again.

The case was in the playbook - this parameter was hardcoded. After remove it all goes smooth.
Thank you for help !!
Best regards
m

1 Like