apache / apache/cloudstack

VMware NSX network implementation can fail before backing DV port group is visible

未關閉
#13,752 2 則留言 0 個 reaction 已指派 0 人 已被 @Dogface2k 認領 在 GitHub 檢視
component:vmware component:vpc Severity:Major type:bug
主要語言
Java
星號
3.1k
分支
1.4k
平均合併
6 天 19 小時
30 天內合併 PR
32

描述

### Problem

On VMware environments using the NSX integration, implementing a guest network can fail during `PlugNicCommand` even though `CreateNsxSegmentCommand` has already succeeded.

The NSX segment is created outside vCenter. Its backing distributed virtual port group can therefore take a short time to become visible through the vCenter API. `HypervisorHostHelper.prepareNetwork` currently performs only one immediate lookup for NSX networks and returns failure when that first lookup is empty.

Sanitized management-server sequence:

```text
CreateNsxSegmentCommand ... NsxAnswer result=true
Prepare network on vmwaredvs
Failed to create guest network
PlugNicAnswer result=false
```

The failure rolls back the NIC attachment and prevents the persistent VPC guest network from being implemented.

### Versions

- Apache CloudStack 4.22.1.0
- VMware vSphere / vCenter 8.0.3
- CloudStack NSX integration

### Steps to reproduce

1. Configure a VMware zone with the CloudStack NSX integration.
2. Create an NSX-backed VPC guest network.
3. Allow the NSX segment command to complete while the backing DV port group is not yet visible through vCenter.
4. Observe the immediate DV port group lookup fail in `HypervisorHostHelper.prepareNetwork`, followed by a failed `PlugNicCommand`.

### Expected behavior

After successful NSX segment creation, CloudStack should use its existing bounded DV port group readiness wait before attempting to attach the NIC. If the port group never becomes visible, the existing timeout should still fail the operation cleanly.

### Proposed fix

Enable the existing `waitForDvPortGroupReady` path for NSX broadcast domains and add a regression test covering an empty first vCenter lookup followed by a successful lookup.

貢獻指南

開啟貢獻指南

研究方向

從 HypervisorHostHelper.prepareNetwork 開始,追蹤 PlugNicCommand 期間使用的現有 waitForDvPortGroupReady 路徑。為第一次 vCenter 查詢為空、隨後查詢成功的情況,新增 issue 中描述的回歸測試,並驗證有界逾時仍能處理永遠不會出現的 port group。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
infrastructure, networking
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
描述清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。