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

Missing Resources in MC_* when listing via az resource list -g <MC_* resource group name> #1964

Closed
aido123 opened this issue Nov 16, 2020 · 5 comments
Labels
resolution/answer-provided Provided answer to issue, question or feedback.

Comments

@aido123
Copy link

aido123 commented Nov 16, 2020

What happened:

As part of automation, trying to list all resources in the MC_* resource group but it's showing as empty. I can see all the resources successfully via the UI. I can also list resources successfully in other Resource Groups that are not the MC_* one.

What you expected to happen:

I would have expected to see all the resources in the MC_* resource group like I see in the UI.

How to reproduce it (as minimally and precisely as possible):

  • Create an AKS Cluster
  • List the resources in the MC_* resource group e.g.
    az resource list -g MC_adrian-group_cluster_westeurope
    []

Anything else we need to know?:

Resources start to appear slowly after a lengthy period i.e. + 18 minutes after cluster created. Reproduced on both EastUS2 and WestEurope

Environment:
azure-cli: 2.14.1
AKS Version: 1.17.13
Cluster Size: 1 Node
No workloads deployed yet

@ghost ghost added the triage label Nov 16, 2020
@ghost
Copy link

ghost commented Nov 16, 2020

Hi aido123, AKS bot here 👋
Thank you for posting on the AKS Repo, I'll do my best to get a kind human from the AKS team to assist you.

I might be just a bot, but I'm told my suggestions are normally quite good, as such:

  1. If this case is urgent, please open a Support Request so that our 24/7 support team may help you faster.
  2. Please abide by the AKS repo Guidelines and Code of Conduct.
  3. If you're having an issue, could it be described on the AKS Troubleshooting guides or AKS Diagnostics?
  4. Make sure your subscribed to the AKS Release Notes to keep up to date with all that's new on AKS.
  5. Make sure there isn't a duplicate of this issue already reported. If there is, feel free to close this one and '+1' the existing issue.
  6. If you have a question, do take a look at our AKS FAQ. We place the most common ones there!

@yangl900
Copy link

@aido123 CLI and portal actually hit the same API at the backend (but may hit different region). The /resources API is served from a regional cache from Azure Resource Manager, which is eventual consistent, and not real time.

To get real time /resources result, you would want to hit the endpoint where the resource group locate. I developed a tool called armclient, which allows you to make a request like:

armclient get https://westeurope.management.azure.com/subscriptions/{id}/resourcegroups/{group}/resources?api-version=2015-01-01

Note you can use westeurope.management.azure.com instead of management.azure.com. however, I don't think the regional endpoint is officially supported (because you won't get the automatic failover when needed). So consider do failover to the original endpoint from client side.

The other option is to list resources by type, which is always realtime. e.g. az vmss list, az vnet list etc.

@yangl900 yangl900 added the resolution/answer-provided Provided answer to issue, question or feedback. label Nov 17, 2020
@ghost ghost removed the triage label Nov 17, 2020
@aido123
Copy link
Author

aido123 commented Nov 17, 2020

Thanks for the info @yangl900, this is very useful.

I'll checkout both your tool and see if az vmss list will do the trick.

Best Regards,
Adrian

@aido123 aido123 closed this as completed Nov 17, 2020
@aido123
Copy link
Author

aido123 commented Nov 26, 2020

FYI, az vmss list --resource-group is NOT realtime

@yangl900
Copy link

yangl900 commented Dec 1, 2020

@aido123 you are right, but under a condition. I missed that earlier.

If the region had no other VMSS at all, meaning it is the first time deploying VMSS in a region, it is not realtime. But if the region already had some VMSS, the az vms list is realtime. Let me know if you see otherwise.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution/answer-provided Provided answer to issue, question or feedback.
Projects
None yet
Development

No branches or pull requests

2 participants