CHEF-26888 - Fix gather-logs openssl gem version conflict #4127
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.