Recipe Compile Error in /opt/gitlab/embedded/..../recipes/default.rb : Mixlib::Config::UnknownConfigOptionError
Hi, everyone, I hope this is the right place to ask for some assistance; the thing is, I may have bitten more than I can chew: I am trying to install Gitlab and use Azure AD for authentication; but, I don't know anything about authentication or gitlab administration, for that matter...I have only been a user, so far. I hope somebody can help me out.
I did see Issue #4664 (closed) last touched about 4 months ago, but I could not see any info that would help me solve my problem.
I will try to report my troubles, if something else is needed, please ask. Thanks.
- I installed Gitlab in a host running Linux Rocky 9
- It works
I don't remember which version I did install, but I don't think it was the latest; yet, it seems that I currently have 16.1.2 ....did it update itself?
- I added half a dozen repos
- I asked for assistance to use Azure AD for authentiation
- Registered Gitlab with Azure AD, got back client ID, secret, etc
- Someone from IT help me edit /etc/gitlab/gitlab.rb
- At present, the OmniAuth Settings section looks as follows:
### OmniAuth Settings
###! Docs: https://docs.gitlab.com/ee/integration/omniauth.html
gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = ['azure_activedirectory_v2']
# gitlab_rails['omniauth_sync_email_from_provider'] = 'saml'
# gitlab_rails['omniauth_sync_profile_from_provider'] = ['saml']
# gitlab_rails['omniauth_sync_profile_attributes'] = ['email']
# gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'saml'
# gitlab_rails['omniauth_block_auto_created_users'] = true
# gitlab_rails['omniauth_auto_link_ldap_user'] = false
# gitlab_rails['omniauth_auto_link_saml_user'] = false
# gitlab_rails['omniauth_auto_link_user'] = ['twitter']
# gitlab_rails['omniauth_external_providers'] = ['twitter', 'google_oauth2']
# gitlab_rails['omniauth_allow_bypass_two_factor'] = ['google_oauth2']
gitlab_rails['omniauth_providers'] = [
{
"name" => "openid_connect_2fa",
"label" => "Azure AD",
"args" => {
"name" => "azure_activedirectory_v2",
"strategy_class": "OmniAuth::Strategies::OpenIDConnect",
"scope" => ['openid', 'profile', 'email'],
"response_type" => "code",
"issuer" => "https://login.microsoftonline.com/<Directory (tenant) ID>/oauth2/v2.0",
"client_auth_method" => "query",
"uid_field" => "SCGID",
"client_options" => {
"identifier" => "<Application (client) ID>",
"secret" => "<Client ID (secret)>",
"authorization_endpoint" => "https://login.microsoftonline.com/<Directory (tenant) ID>/oauth2/v2.0/authorize",
"userinfo_endpoint" => "https://login.microsoftonline.com/common/openid/userinfo",
"token_endpoint" => "https://login.microsoftonline.com/<Directory (tenant) ID>/oauth2/v2.0/token",
"redirect_uri" => "https://gitlab.<company-name>.com/users/auth/azure_activedirectory_v2/callback"
}
}
}
]
While working our way towards the above settings, I had been able to execute gitlab-ctl reconfigure
several times; but, currently, I get the following error:
gitlab-ctl reconfigure
[2023-07-18T12:33:23-04: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-07-18T12:33:23-04:00] INFO: *** Cinc Client 17.10.0 ***
[2023-07-18T12:33:23-04:00] INFO: Platform: x86_64-linux
[2023-07-18T12:33:23-04:00] INFO: Cinc-client pid: 3631127
[2023-07-18T12:33:25-04:00] INFO: Setting the run_list to ["recipe[gitlab]"] from CLI options
[2023-07-18T12:33:25-04:00] INFO: Run List is [recipe[gitlab]]
[2023-07-18T12:33:25-04:00] INFO: Run List expands to [gitlab]
[2023-07-18T12:33:25-04:00] INFO: Starting Cinc Client Run for <host.company-name.com>
[2023-07-18T12:33:25-04:00] INFO: Running start handlers
[2023-07-18T12:33:25-04:00] INFO: Start handlers complete.
Resolving cookbooks for run list: ["gitlab"]
[2023-07-18T12:33:26-04: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)
- redis (0.1.0)
- gitlab (0.0.1)
- registry (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)
- nginx (0.1.0)
- runit (5.1.7)
- acme (4.1.6)
- crond (0.1.0)
- postgresql (0.1.0)
- mattermost (0.1.0)
- monitoring (0.1.0)
- logrotate (0.1.0)
- letsencrypt (0.1.0)
Installing cookbook gem dependencies:
Compiling cookbooks...
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:
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
Mixlib::Config::UnknownConfigOptionError
----------------------------------------
Reading unsupported config value number.
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:22: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/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=17.10.0
platform=rocky
platform_version=9.2
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-07-18T12:33:27-04:00] ERROR: Running exception handlers
There was an error running gitlab-ctl reconfigure:
Reading unsupported config value number.
Running handlers complete
[2023-07-18T12:33:27-04:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 03 seconds
[2023-07-18T12:33:27-04:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2023-07-18T12:33:27-04:00] FATAL: ---------------------------------------------------------------------------------------
[2023-07-18T12:33:27-04:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2023-07-18T12:33:27-04:00] FATAL: ---------------------------------------------------------------------------------------
[2023-07-18T12:33:27-04:00] FATAL: Mixlib::Config::UnknownConfigOptionError: Reading unsupported config value number.
Gitlab-Runner@<host> (/etc/gitlab)-1430>
Being that the settings_dsl.rb
file is under cache...could it just be blown away and let it be re-generated?
Otherwise, what could the issue now be?