UNCLASSIFIED - NO CUI

Skip to content

Gitlab Mailroom fails to run due to missing dependency

While enabling incoming email using microsoft_graph for Gitlab, the mailroom pod is in CrashLoopBackOff because health_check is unable to start. This appears to be a problem since the upgrade to Ruby 3 several months ago. It is unable to find the webrick dependency. webrick was a standard library in Ruby 2, but removed for Ruby 3 and now requires it to be installed. Here are the error logs when starting the mailroom pod:

Begin parsing .erb templates from /etc
{"severity":"INFO","time":"2023-08-27T16:07:15.747+00:00","context":{"email":"redacted@redacted.onmicrosoft.com","name":"inbox"},"action":"Quitting connection..."}
{"severity":"INFO","time":"2023-08-27T16:07:15.748+00:00","context":{"email":"redacted@redacted.onmicrosoft.com","name":"inbox"},"action":"Terminating watching thread..."}
{"severity":"INFO","time":"2023-08-27T16:07:15.748+00:00","context":{"email":"redacted@redacted.onmicrosoft.com","name":"inbox"},"action":"Done with thread cleanup"}
<internal:/usr/lib64/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- webrick (LoadError)
        from <internal:/usr/lib64/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /usr/lib64/ruby/gems/3.0.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/health_check.rb:39:in `create_server'
        from /usr/lib64/ruby/gems/3.0.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/health_check.rb:15:in `run'
        from /usr/lib64/ruby/gems/3.0.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/coordinator.rb:21:in `run'
        from /usr/lib64/ruby/gems/3.0.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/cli.rb:58:in `start'
        from /usr/lib64/ruby/gems/3.0.0/gems/gitlab-mail_room-0.0.23/bin/mail_room:5:in `<top (required)>'
        from /usr/bin/mail_room:25:in `load'
        from /usr/bin/mail_room:25:in `<main>'