Skip to content

fix(nsx): preserve externally-created active LB monitors on pool patch#3

Open
vitaliyzahorenko wants to merge 1 commit into
feature/4.22.0.0-patchedfrom
fix/nsx-preserve-foreign-lb-monitors
Open

fix(nsx): preserve externally-created active LB monitors on pool patch#3
vitaliyzahorenko wants to merge 1 commit into
feature/4.22.0.0-patchedfrom
fix/nsx-preserve-foreign-lb-monitors

Conversation

@vitaliyzahorenko

Copy link
Copy Markdown

Description

createNsxLbServerPool() replaced LBPool.ActiveMonitorPaths entirely with a single, app-managed monitor path whenever the pool was patched (e.g. on a member list change). Any active monitor attached to the pool outside of this codebase (manually, or by another process) was silently detached on the next update.

Added mergeWithForeignActiveMonitorPaths(): keeps any existing monitor whose id does not contain the pool name (same ownership check already used in deleteNsxLbResources), plus the monitor managed by this codebase. Reuses the pool state already fetched for the member-diff check — no extra API call.

Verified on staging NSX: manually attached a foreign active monitor to an LB pool, then triggered a member-list update via CloudStack — the foreign monitor remained attached after the patch.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

How Has This Been Tested?

Verified manually on a staging NSX environment: attached a foreign active monitor to an LB pool via the NSX UI, then triggered a member-list update through CloudStack. Confirmed the foreign monitor remained attached to the pool after the patch, and the plugin-managed monitor was correctly refreshed.

createNsxLbServerPool() replaced LBPool.ActiveMonitorPaths entirely with a
single, app-managed monitor path whenever the pool was patched (e.g. on a
member list change). Any active monitor attached to the pool outside of
this codebase (manually, or by another process) was silently detached on
the next update.

The pool state already fetched for the member-diff check is now reused
to also merge active monitor paths: monitors whose id does not contain
the pool name are preserved, and only the app-owned monitor path is
added/refreshed.

Verified on staging NSX: a manually attached foreign monitor survives a
pool member list update.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7dd8c911-30ff-4c75-a518-3916a9653e1e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/nsx-preserve-foreign-lb-monitors

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant