apache / apache/cloudstack

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

Ouverte
#13,752 2 commentaires 0 réactions 0 personnes assignées Réclamée par @Dogface2k Voir sur GitHub
component:vmware component:vpc Severity:Major type:bug
Langage dominant
Java
Étoiles
3.1k
Forks
1.4k
Merge moyen
6 j 19 h
PR mergées (30 j)
32

Description

### 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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez dans HypervisorHostHelper.prepareNetwork et suivez le chemin existant de waitForDvPortGroupReady utilisé pendant PlugNicCommand. Ajoutez le test de régression décrit dans l’issue pour une première recherche vCenter vide suivie d’une recherche réussie, et vérifiez que le délai d’attente borné gère toujours un port group qui n’apparaît jamais.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
infrastructure, networking
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.