vmware / nsx-powerops

NSX-v Operationalization project. Automate Networking Documentation and HealthCheck.
Other
70 stars 34 forks source link

Host documentation incorrectly detects a host as not having VXLAN enabled. #29

Closed thisispuneet closed 6 years ago

thisispuneet commented 7 years ago

by Nick Bradford @nmbradford

The attempt to access $esxcli.network.vswitch.dvs.vmware.vxlan.list.invoke() fails due to the vxlan namespace not being present. This can occur on certain version of vSphere/NSX and requires a cycle of hostd to resolve ( was not available on host ssh either). This can lead to the documentation process to incorrectly claim that a host is not enabled for VXLAN when it actually is. An alternative would be to gather vmk information directly from network.ip.interface | ? { $_.netstack -match 'vxlan' } (vmk name, mtu and vds name are available in list.invoke(), ip and subnet in network.ip.interface.ipv4 and gateway is in network.ip.netstack)

Nick Bradford @nmbradford simpler alternative to refactor is to warn in the catch that the host may just need hostd recycled.

nmbradford commented 7 years ago

simpler, but not robust! :)

HammadAlam commented 6 years ago

PS F:\nsx-powerops-development> $esxcli.network.ip.interface.list.invoke() | ? { $_.netstackInstance -match 'vxlan' }

Enabled : true ExternalID : N/A MACAddress : 00:50:56:6c:05:2a MTU : 8800 Name : vmk1 NetstackInstance : vxlan OpaqueNetworkID : N/A OpaqueNetworkType : N/A PortID : 67108870 Portgroup : N/A Portset : DvsPortset-1 TSOMSS : 65535 VDSConnection : 1970763301 VDSName : 64-EW-vDS VDSPort : 11 VDSUUID : 50 11 8a d0 d3 cd da 29-7b a6 ea 61 32 8e 2e 12

Enabled : true ExternalID : N/A MACAddress : 00:50:56:6e:5e:6e MTU : 8800 Name : vmk2 NetstackInstance : vxlan OpaqueNetworkID : N/A OpaqueNetworkType : N/A PortID : 67108871 Portgroup : N/A Portset : DvsPortset-1 TSOMSS : 65535 VDSConnection : 1973258925 VDSName : 64-EW-vDS VDSPort : 7 VDSUUID : 50 11 8a d0 d3 cd da 29-7b a6 ea 61 32 8e 2e 12

HammadAlam commented 6 years ago

@thisispuneet - can you look at this. We discussed this and locked the commands that need update.