Skip to content
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

resource "catalystcenter_virtual_network_to_fabric_site" "nvName" #171

Open
tali1974 opened this issue Jan 27, 2025 · 2 comments
Open

resource "catalystcenter_virtual_network_to_fabric_site" "nvName" #171

tali1974 opened this issue Jan 27, 2025 · 2 comments

Comments

@tali1974
Copy link

tali1974 commented Jan 27, 2025

Hi. iam using
dnac Version 2.3.7.7-70047
terrfarom verion v1.9.6

catalystcenter = {
source = "CiscoDevNet/catalystcenter"
version = "0.1.19"
}
I try to add 9 VN ( one of the VN is an INFRA_NV)
with this code
resource "catalystcenter_virtual_network_to_fabric_site" "nvName" {
.....
depends_on = [
catalystcenter_fabric_site.CreateFabric
]
}

terraform apply

do start adding the VNs to the fabric.. after 3-5 vn are added I get this error...

│ Error: Client Error

│ with module.site_mm_fabric_labsma1.catalystcenter_virtual_network_to_fabric_site.name_vn,
│ on ../modules/Mod_fabricOnBoardingV1/Fabric.tf line 2, in resource "catalystcenter_virtual_network_to_fabric_site" "name_vn":
│ 2: resource "catalystcenter_virtual_network_to_fabric_site" "name_vn" {

│ Failed to configure object (POST), got error: HTTP Request failed: StatusCode 429, {
│ "error" : "Rate Limit exceeded; BapiName: Add VN in fabric, RateLimit config details: RateLimitContext{rate=50, windowUnit='minute', windowDuration=1, maxConcurrentExecutionsPermitted=1}",
│ "bapiExtendedStatusCode" : "REJECTED_ABOVE_MAX_CONCURRENCY_LIMIT",
│ "bapiExtendedStatusDescription" : "For BAPI: Add VN in fabric, DNACP Runtime is at maximum allowed concurrent BAPI executions: 1"
│ }

But it I run terraform apply -parallelism=1 then it works fine..

@Mrhailaf
Copy link

#Getting Site ID
data "catalystcenter_site" "xx" {
  name_hierarchy   = "Global/xx"
}

#Getting Fabric Site ID
data "catalystcenter_fabric_site" "xxx" {
  site_id = data.catalystcenter_site.xx.id
}

#Creating a Virtual Network within the fabric Site (xxx)
resource "catalystcenter_fabric_l3_virtual_network" "MDI_TERRAFORM_VN" {
  for_each = local.range
  virtual_network_name = "abc${each.key}_VN"
  fabric_ids           = [data.catalystcenter_fabric_site.xxx.id]
}

im using this ressource to create VN within a fabric site, but im getting this error.

Warning

Failed to configure object (POST), got error: task '0194b403-d099-7946-b359-b431193bd158' failed: TASK_MODIFY_PUT, NCSP11051: Error occurred while processing the 'modify' request. A different
│ version of the same user intent already exists in the database. Additional info for support: taskId: '0194b403-d099-7946-b359-b431193bd158'. Name: 'Global/INGOLSTADT_ING_SDA_LAB'. Incoming
│ resourceVersion: '492'. resourceVersion in the database: '493'.,
│ {"response":{"endTime":1738186952502,"progress":"TASK_MODIFY_PUT","version":1738186952502,"startTime":1738186936473,"errorCode":"NCSP11051","data":"workflow_id=50b355b9-a8ad-4e70-9a73-410d19ee8656;cfs_id=0;rollback_status=not_supported;rollback_taskid=0;failure_task=Validation
│ of business intent:775e57ac-9c9e-4d62-81b3-cb87f0889a9a;processcfs_complete=false","lastUpdate":1738186952484,"serviceType":"NCSP","failureReason":"NCSP11051: Error occurred while processing
│ the 'modify' request. A different version of the same user intent already exists in the database. Additional info for support: taskId: '0194b403-d099-7946-b359-b431193bd158'. Name:
│ 'Global/INGOLSTADT_ING_SDA_LAB'. Incoming resourceVersion: '492'. resourceVersion in the database:
│ '493'.","isError":true,"instanceTenantId":"6139c63e6938076084691bb2","id":"0194b403-d099-7946-b359-b431193bd158"},"version":"1.0"}

i think, that CC doesnt support parallel Creation of VNs from the same user at the same time. that is why for solving the problem i used -parallelism=1.

@kuba-mazurkiewicz
Copy link
Collaborator

@tali1974 The Catalyst Center API for creating Layer 3 Virtual Networks is designed to be executed sequentially. Each API request must be completed before initiating the next one. Concurrent execution may result in conflicts or unexpected behavior. As @Mrhailaf mentioned you can use terraform apply with --parallelims=1 option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants