After update from gitlab-ce-16.9.6 to 16.9.7 uninitialized constant parser::AST::Processor::Mixin (fixed)

Problem to solve

Describe your question in as much detail as possible:

  • After update from gitlab-ce-16.9.6 to 16.9.7 uninitialized constant parser::AST::Processor::Mixin
ERROR: Running exception handlers
There was an error running gitlab-ctl reconfigure:

uninitialized constant Parser::AST::Processor::Mixin

        include Parser::AST::Processor::Mixin
                                      ^^^^^^^
Did you mean?  Mixlib

Running handlers complete
[2024-05-08T19:34:57+03:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 06 seconds
[2024-05-08T19:34:57+03:00] FATAL: NameError: uninitialized constant Parser::AST::Processor::Mixin

        include Parser::AST::Processor::Mixin
                                      ^^^^^^^
Did you mean?  Mixlib

Steps to reproduce

update from gitlab-ce-16.9.6 to 16.9.7

Configuration

centos 7
gitlab-omnibus

Versions

Please select whether options apply, and add the version information.

  • [ x] Self-managed

Versions

  • GitLab gitlab-ce 16.9.7
grep -r 'Parser::AST::Processor::Mixin' /opt/gitlab/embedded/
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/inspec-core-6.6.0/lib/inspec/utils/profile_ast_helpers.rb:        include Parser::AST::Processor::Mixin

Fixed

Found a commit that fixes the bug.

Edited /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/inspec-core-6.6.0/lib/inspec/utils/profile_ast_helpers.rb

Everything works now

4 Likes

Thanks very much for posting this! I had exactly the same problem upgrading from 16.9.6 to 16.9.7 and appreciated finding the fix you found.

Unfortunately this doesn’t help those of us using the official container images.

This is affecting gitlab-ee also.

Yes, adding that this issue is present for the self-hosted GitLab Premium upgrade path, ver. 16.9.6 to ver. 16.9.7.

e.g.

apt-get install gitlab-ee=16.9.7-ee.0

For others finding this post, modifying the single code file as described in the link above and then re-running the install command:

apt-get install gitlab-ee=16.9.7-ee.0

allowed the configuration step of the GitLab 16.9.7 install to successfully complete.

1 Like

Issue is being tracked here: Failure when upgrading to 16.9.7 (CE and EE editions) (#8532) · Issues · GitLab.org / omnibus-gitlab · GitLab

GitLab is releasing 16.9.8 to fix the issue. In the meantime 16.9.6 isn’t affected. Also upgrading to 16.10.5 or 16.11.2 is an option since they aren’t affected by this issue.

16.9.8 is out: GitLab Patch Release: 16.9.8 | GitLab