You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to #1544
There are cases when vim.host.NetworkPolicy.NicFailureCriteria is set, but checkBeacon is unset.
For example, after portgroup creation or after:
In this case, failure_detection is reported as 'link_status_only' instead of 'No override'
Most probaly this can solve it (spec.policy.nicTeaming.failureCriteria.checkBeacon can be unset, true or false)
diff --git a/plugins/modules/vmware_portgroup_info.py b/plugins/modules/vmware_portgroup_info.py
index b94be38..08d7d51 100644
--- a/plugins/modules/vmware_portgroup_info.py
+++ b/plugins/modules/vmware_portgroup_info.py
@@ -162,7 +162,7 @@ class PortgroupInfoManager(PyVmomi):
else:
pg_info_dict['failover_active'] = spec.policy.nicTeaming.nicOrder.activeNic
pg_info_dict['failover_standby'] = spec.policy.nicTeaming.nicOrder.standbyNic
- if spec.policy.nicTeaming.failureCriteria is None:
+ if spec.policy.nicTeaming.failureCriteria is None or spec.policy.nicTeaming.failureCriteria.checkBeacon is None:
pg_info_dict['failure_detection'] = "No override"
else:
if spec.policy.nicTeaming.failureCriteria.checkBeacon:
ok: [localhost] => {
"pg_info.hosts_portgroup_info['esxi1.example.com'][0]": {
"failback": "No override",
"failover_active": "No override",
"failover_standby": "No override",
"failure_detection": "No override", <-------- this
"lb": "No override",
"notify": "No override",
"portgroup": "PORTGROUP-001",
"security": [
"No override",
"No override",
"No override"
],
"ts": "No override",
"vlan_id": 1111,
"vswitch": "vSwitch0"
}
}
ACTUAL RESULTS
ok: [localhost] => {
"pg_info.hosts_portgroup_info['esxi1.example.com'][0]": {
"failback": "No override",
"failover_active": "No override",
"failover_standby": "No override",
"failure_detection": "link_status_only", <-------- this
"lb": "No override",
"notify": "No override",
"portgroup": "PORTGROUP-001",
"security": [
"No override",
"No override",
"No override"
],
"ts": "No override",
"vlan_id": 1111,
"vswitch": "vSwitch0"
}
}
The text was updated successfully, but these errors were encountered:
andrei-marinache
changed the title
vmware_portgroup_info: failure_detection is reported as 'link_status_only' insted of 'No override'
vmware_portgroup_info: failure_detection is reported as 'link_status_only' instead of 'No override'
Oct 25, 2023
SUMMARY
This is related to #1544
There are cases when vim.host.NetworkPolicy.NicFailureCriteria is set, but checkBeacon is unset.
For example, after portgroup creation or after:
In this case, failure_detection is reported as 'link_status_only' instead of 'No override'
Most probaly this can solve it (spec.policy.nicTeaming.failureCriteria.checkBeacon can be unset, true or false)
ISSUE TYPE
COMPONENT NAME
community.vmware.vmware_portgroup_info
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
MacOS 13.5.2, vCenter 7.0U2
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: