Skip to content

Conversation

@kalroy
Copy link
Contributor

@kalroy kalroy commented Dec 2, 2025

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:
/opt/opscode/embedded/lib/ruby/3.1.0/rubygems/specification.rb:2278:in `check_version_conflict': 
can't activate openssl-3.2.0, already activated openssl-3.3.0 (Gem::LoadError)

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

- Modified omnibus/files/private-chef-scripts/gather-logs to invoke ohai through embedded ruby directly - Bypasses the binstub's strict gem version requirements by using ruby -rohai -e - Added fallback to the original ohai binstub method for safety - Includes proper error handling and warning messages

Testing

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 functionality

https://progresssoftware.atlassian.net/browse/CHEF-26888

AI Assistance

This work was completed with AI assistance following Progress AI policies.

@kalroy kalroy requested review from a team as code owners December 2, 2025 13:22
@kalroy kalroy added the ai-assisted Work completed with AI assistance following Progress AI policies label Dec 2, 2025
@kalroy kalroy requested a review from a team as a code owner December 2, 2025 13:22
@netlify
Copy link

netlify bot commented Dec 2, 2025

👷 Deploy Preview for chef-server processing.

Name Link
🔨 Latest commit b990a0f
🔍 Latest deploy log https://app.netlify.com/projects/chef-server/deploys/6936c0c9a2cec000081d80e9

@kalroy
Copy link
Contributor Author

kalroy commented Dec 2, 2025

@talktovikas talktovikas self-requested a review December 4, 2025 12:07
@talktovikas talktovikas requested a review from a team as a code owner December 5, 2025 05:53
@jashaik
Copy link
Contributor

jashaik commented Dec 5, 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]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2025

@sonarqube-for-infrastructure-prod

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@jashaik jashaik merged commit ddd80c3 into main Dec 9, 2025
40 of 41 checks passed
@jashaik jashaik deleted the CHEF-26888 branch December 9, 2025 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Work completed with AI assistance following Progress AI policies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants