Skip to content

Boolean for MCP action (access policies) when set to false not clearing the flag #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexanderdeca opened this issue Nov 26, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@alexanderdeca
Copy link

MCP action boolean when set to false, the expectation is that the flag is cleared on the APIC controller.
Setting the boolean to true is setting correctly the flag on the APIC controller.

mcp:
action: false
admin_state: true
key: password
frequency_sec: 5
initial_delay: 300
loop_detection: 5
per_vlan: true

@guilinyan
Copy link
Contributor

guilinyan commented Dec 9, 2023

Hi,
if you could provide test environment information like APIC version, terraform-aci-nac-aci version, that would be very helpful.
Tested with latest terraform-aci-nac-aci on APIC v6.0(2h) and APIC v5.2(7f), MCP action boolean when set to false, the flag is cleared on the APIC controller.

@guilinyan
Copy link
Contributor

Enabling MisCabling Protocol (MCP) is a best practice, and it should be enabled globally and on all interfaces, regardless of the end device.

https://www.cisco.com/c/dam/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/aci-guide-using-mcp-mis-cabling-protocol.pdf

@alexanderdeca
Copy link
Author

alexanderdeca commented Dec 10, 2023 via email

@alexanderdeca
Copy link
Author

alexanderdeca commented Dec 10, 2023 via email

@alexanderdeca
Copy link
Author

alexanderdeca commented Dec 10, 2023 via email

@danischm
Copy link
Member

This is a known issue with the current implementation of the ACI provider, which relies on the SDKv2. The provider cannot differentiate between a null (non-existent) value and an empty string. In this case when disabling the "action" the nac-aci module will set the loopProtectAct attribute to an empty string (

loopProtectAct = var.disable_port_action == true ? "port-disable" : ""
), where the provider assumes it is now set to null and will therefore not include it in the payload. This issue should be resolved once the ACI provider has been migrated to the new Terraform Plugin Framework. Existing issues: CiscoDevNet/terraform-provider-aci#806, CiscoDevNet/terraform-provider-aci#202

@guilinyan
Copy link
Contributor

Thank you very much for the clarification, Daniel!

@alexanderdeca
Copy link
Author

alexanderdeca commented Dec 15, 2023 via email

@andbyrne
Copy link
Contributor

Follow-up question what is the timeframe to migrate to the new Terraform Plugin Framework?

It is now available. Please update terraform-aci-nac-aci module to 0.8.1 and also run terraform init -upgrade to ensure the ACI provider is upgraded.

@danischm
Copy link
Member

@alexanderdeca , can this be closed now?

@danischm danischm added the bug Something isn't working label Mar 20, 2024
@alexanderdeca
Copy link
Author

alexanderdeca commented Mar 20, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants