CHEF-26888 - Fix gather-logs openssl gem version conflict#4127
Merged
Conversation
👷 Deploy Preview for chef-server processing.
|
talktovikas
approved these changes
Dec 4, 2025
e8787a7 to
ad0d4da
Compare
jashaik
approved these changes
Dec 8, 2025
Fix chef-server-ctl gather-logs command failure caused by OpenSSL gem version conflict. The ohai binstub has hardcoded gem version requirements (openssl 3.2.0) that conflict with already-loaded gems (openssl 3.3.0). Changes: - Modified gather-logs script to invoke ohai through embedded ruby directly - Bypasses the binstub's strict gem version requirements - Added fallback to original method for safety - Includes proper error handling and warning messages This resolves the Gem::LoadError that prevented gather-logs from completing in Chef Server 15.10.66 and later versions. Fixes: CHEF-26888 Signed-off-by: talktovikas <[email protected]>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Summary
Fix chef-server-ctl gather-logs command failure caused by OpenSSL gem version conflict in Chef Server 15.10.66 and later versions.Jira Ticket
CHEF-26888 - This work was completed with AI assistance following Progress AI policies.Problem
The gather-logs command was failing with error:The issue occurred because the ohai binstub (/opt/opscode/bin/ohai) was generated with hardcoded gem version requirements for openssl 3.2.0, but when gather-logs runs, chef has already loaded openssl 3.3.0.
Changes Made
- Modifiedomnibus/files/private-chef-scripts/gather-logsto invoke ohai through embedded ruby directly - Bypasses the binstub's strict gem version requirements by usingruby -rohai -e- Added fallback to the original ohai binstub method for safety - Includes proper error handling and warning messagesTesting
The fix allows Ruby's gem system to naturally resolve gem versions instead of enforcing the binstub's hardcoded requirements. This approach: - Avoids the version conflict error - Maintains backward compatibility with fallback - Preserves all ohai functionalityhttps://progresssoftware.atlassian.net/browse/CHEF-26888
AI Assistance
This work was completed with AI assistance following Progress AI policies.