Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.63k stars 5.05k forks source link

[BUG] System Center Virtual Machine Manager Inventory Items List API cannot immediately return a list of Inventory Items after System Center Virtual Machine Manager Server is created #28022

Open neil-yechenwei opened 7 months ago

neil-yechenwei commented 7 months ago

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/scvmm.json#L1986

API Spec version

2023-10-07

Describe the bug

After tested, I found Inventory Items List API wouldn't immediately return a list of inventory items after SCVMM Server is created. But I can get the list after SCVMM Server is created and then wait for a while like 1 minute. Seems it's a bug. Please fix it asap. Thanks.

Expected behavior

System Center Virtual Machine Manager Inventory Items List API can immediately return a list of Inventory Items after System Center Virtual Machine Manager Server is created.

Actual behavior

Inventory Items List API wouldn't immediately return a list of inventory items after SCVMM Server is created. But I can get the list after SCVMM Server is created and then wait for a while like 1 minute.

Reproduction Steps

  1. Create a resource group
  2. Create a System Center Virtual Machine Manager Server
  3. Invoke Inventory Items List API to get a list of System Center Virtual Machine Manager Inventory Items

Environment

Production

zzhxiaofeng commented 7 months ago

@hsurana06 Please help have a look, thank you.

hsurana06 commented 7 months ago

After a successful PUT VMM Server, CRs (Custom Resources using CR Definition) corresponding to all the resources (ResourceType - Cloud, Virtual Network, Virtual Machine, Virtual Machine Template) present on the on-Premises SCVMM Server are created in the Operator. Post that corresponding to all these CRs, Operator syncs it with RPaaS and creates the ARM SCVMM InventoryItem resource.

This is by design that it takes some time to have InventoryItem resources in ARM and this delay depends upon the number of inventory items discovered on the SCVMM server.

FYI: For the synthetics job that we have for internal testing we have developed a polling mechanism for the InventoryItem resources with a timeout of 9 minutes. Generally, it takes less than 2 minutes, but this is again dependent on the number of inventory items discovered.

@zzhxiaofeng @neil-yechenwei