Refactor internal client config machinery#2723
Conversation
WalkthroughThis pull request updates TLS certificate verification across the BOSH monitor and NATS sync components. SSL connections now use Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
ragaskar
left a comment
There was a problem hiding this comment.
Aram and I looked through this changeset together on zoom.
We agreed that there could be some consul plugin breakage, and this likely should be solved by folks relying on this behavior adding any needed certs to the director trust store.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/bosh-nats-sync/lib/nats_sync/users_sync.rb`:
- Around line 118-120: The TLS peer verification can raise
OpenSSL::SSL::SSLError which isn't included in the current retry/fallback set
and isn't rescued by execute_users_sync; update the failure handling so SSL
errors trigger the degraded/retry path: add OpenSSL::SSL::SSLError to
DIRECTOR_CONNECTION_ERRORS (or the equivalent error list/constant) so
wait_for_director_connection and query_all_running_vms treat it like other
transient director connection errors, and expand the rescue in
execute_users_sync to also catch OpenSSL::SSL::SSLError (alongside RuntimeError)
to ensure TLS handshake failures fall back to degraded mode rather than bubbling
up.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 47479891-201e-4498-b744-578b6d6f681d
📒 Files selected for processing (13)
src/bosh-monitor/lib/bosh/monitor/director.rbsrc/bosh-monitor/lib/bosh/monitor/plugins/consul_event_forwarder.rbsrc/bosh-monitor/lib/bosh/monitor/plugins/event_logger.rbsrc/bosh-monitor/lib/bosh/monitor/plugins/http_request_helper.rbsrc/bosh-monitor/lib/bosh/monitor/plugins/pagerduty.rbsrc/bosh-monitor/lib/bosh/monitor/plugins/resurrector.rbsrc/bosh-monitor/spec/unit/bosh/monitor/director_spec.rbsrc/bosh-monitor/spec/unit/bosh/monitor/plugins/consul_event_forwarder_spec.rbsrc/bosh-monitor/spec/unit/bosh/monitor/plugins/event_logger_spec.rbsrc/bosh-monitor/spec/unit/bosh/monitor/plugins/http_request_helper_spec.rbsrc/bosh-monitor/spec/unit/bosh/monitor/plugins/pagerduty_spec.rbsrc/bosh-monitor/spec/unit/bosh/monitor/plugins/resurrector_spec.rbsrc/bosh-nats-sync/lib/nats_sync/users_sync.rb
|
One-off integration build: https://bosh.ci.cloudfoundry.org/builds/349753046 |
No description provided.