<fix>[sugonSdn]: sync tf ports after ping#4033
Conversation
Trigger TF port sync from TF controller ping success instead of MN startup. Keep the original one day interval and port cleanup algorithm, while scoping sync to the current controller. Resolves: ZSTAC-85281 Change-Id: I84a88a34135cd47fc79b3019d2f0fc2953f06ac9
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml) Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
总体概述该 PR 实现了 SDN 控制器的 ping 消息驱动端口同步机制。当控制器收到 ping 消息时,验证连接有效性后触发端口同步,同时新增 per-controller 的速率限制和并发防护,将之前的周期性后台同步改为按需触发。 变更内容Ping 消息驱动端口同步
🎯 3 (中等) | ⏱️ ~25 分钟
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Change-Id: If07dce918c4d7d9f62445184ff5984e30b83ce64
Root cause:
TfZstackPortSync was started from MN ready even when no TF controller exists. The task then built TfPortClient without a controller and getPortToDelete returned null after the fetch failure, leading to a secondary NPE.
Fix:
Trigger TF port sync from TF controller ping success, keep the original one day interval and existing cleanup algorithm, and scope sync/delete operations to the current controller uuid.
Verification:
Note:
Focused SugonSdnControllerCase was attempted locally before branch isolation, but the local test DB already existed during deploydb, so the case did not start.
sync from gitlab !9929