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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
dcnm_vrf is leaking the following resource: TOP_DOWN_VRF_VLAN when a VRF is created and then deleted.
This appears to happen ONLY when the fabric contains switches to which the created VRF was NOT attached.
For example, it the attached playbook is run, and if the ONLY switch in the fabric is 10.1.1.2, the issue is not seen.
If we add a second switch, say 10.1.1.3, which is not in the playbook's attach list, and then run the playbook, a TOP_DOWN_VRF_VLAN resource associated with switch 10.1.1.3 remains after the VRF is deleted.
Adding a sleep in the playbook, and then monitoring in the NDFC GUI, the stale resource is created during the VRF deleted task.
When deleting a VRF, all associated resources should be released.
Actual Behavior
When deleting a VRF, a TOP_DOWN_VRF_VLAN resource (one per VRF per switch X present in the fabric -- where switch X is NOT in the attach list for the VRF merged task) remains after the VRF is deleted. In the NDFC GUI, these resources are displayed as being Allocated to its associated (and now deleted) VRF (Fabric Detail -> Resources, filter on Resource Type == TOP_DOWN_VRF_VLAN).
Steps to Reproduce
Run the attached playbook with two or more switches in the fabric. A TOP_DOWN_VRF_VLAN resource will remain for every switch in the fabric that is not in the playbook's attach list.
References
The text was updated successfully, but these errors were encountered:
1. Fix case where previous commit in this PR broke undeploy.
2. Fix for issue #356
2. Update unit tests to align with changes in this commit
3. Some simplifications, including
- Add a method send_to_controller() to aggregate POST, PUT, DELETE verb handling. This method calls dcnm_send() and then calls the response handler, etc. This removes duplicated code throughout the module.
- Refactor vrf_lite handlng out of update_attach_params() and into new method update_attach_params_extension_values()
- Never noticed this, but it appears we don't have to use inspect() with the new logging system, except in cases where fail_json() is called. Removed inspect() from all methods that do not call fail_json()
- New method is_border_switch() to remove this code from push_diff_attach() and for future consolidation into a shared library.
- Move dcnm_vrf_paths dictionary out of the class. These endpoints will later be moved to common/api/ep/.
- in __init__(), add self.sn_ip, built from self.ip_sn. There were several case where the module wanted a serial_number given an ip_address. Added two methods that leverage self.sn_ip and self.ip_sn:
- self.serial_number_to_ip()
- self.ip_to_serial_number()
Replaced all instances where duplicated code was performing these functions.
Community Note
dcnm_vrf
is leaking the following resource:TOP_DOWN_VRF_VLAN
when a VRF is created and then deleted.This appears to happen ONLY when the fabric contains switches to which the created VRF was NOT attached.
For example, it the attached playbook is run, and if the ONLY switch in the fabric is 10.1.1.2, the issue is not seen.
If we add a second switch, say 10.1.1.3, which is not in the playbook's attach list, and then run the playbook, a
TOP_DOWN_VRF_VLAN
resource associated with switch 10.1.1.3 remains after the VRF is deleted.Adding a sleep in the playbook, and then monitoring in the NDFC GUI, the stale resource is created during the VRF
deleted
task.Ansible Version and collection version
DCNM version
ND/NDFC version
3.2.1e / 12.2.2.238
Affected module(s)
Ansible Playbook
Debug Output
Expected Behavior
When deleting a VRF, all associated resources should be released.
Actual Behavior
When deleting a VRF, a
TOP_DOWN_VRF_VLAN
resource (one per VRF per switch X present in the fabric -- where switch X is NOT in the attach list for the VRF merged task) remains after the VRF is deleted. In the NDFC GUI, these resources are displayed as being Allocated to its associated (and now deleted) VRF (Fabric Detail -> Resources, filter onResource Type == TOP_DOWN_VRF_VLAN
).Steps to Reproduce
Run the attached playbook with two or more switches in the fabric. A
TOP_DOWN_VRF_VLAN
resource will remain for every switch in the fabric that is not in the playbook's attach list.References
The text was updated successfully, but these errors were encountered: