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

az storage account list is not listing all storage accounts #22465

Closed
shreyasHpandya opened this issue May 16, 2022 · 26 comments
Closed

az storage account list is not listing all storage accounts #22465

shreyasHpandya opened this issue May 16, 2022 · 26 comments
Assignees
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage
Milestone

Comments

@shreyasHpandya
Copy link

Command Name
az storage account list

this is not generating list of all the storage account, I can see the complete list in console (all 35). But in CLI output it only shows 9 results. All the storage accounts are in 35 different regions.

Environment Summary

macOS-12.3.1-x86_64-i386-64bit, Darwin 21.4.0
Python 3.10.4
Installer: HOMEBREW

azure-cli 2.36.0
@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage az storage labels May 16, 2022
@ghost ghost added this to the Backlog milestone May 16, 2022
@ghost ghost assigned evelyn-ys May 16, 2022
@ghost ghost added the Auto-Assign Auto assign by bot label May 16, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented May 16, 2022

storage

@evelyn-ys
Copy link
Member

Have you set default resource group before?
The command would try to read default resource group from environment variables and it turns out to be az storage account list -g your_default_rg:
image

@shreyasHpandya
Copy link
Author

All the Storage accounts are in the same resource group. and I am passing that RG in the argument explicitly. Following is the command I am running.

az storage account list -g <myrg> --query "[*].[name,location]" -o tsv

@evelyn-ys
Copy link
Member

Can you use az config get to check if you have default resource group? If you do have, please use az config unset to unset.

@shreyasHpandya
Copy link
Author

shreyasHpandya commented May 17, 2022

output of az config get

Command group 'config' is experimental and under development. Reference and support levels: 
https://aka.ms/CLI_refstatus
{
  "cloud": [
    {
      "name": "name",
      "source": "/Users/shreyas.pandya/.azure/config",
      "value": "AzureCloud"
    }
  ]
}

I don't think any default rg is set

@evelyn-ys
Copy link
Member

@jonie001 Can you help take a look if we will fetch default resource group from other settings?

@shreyasHpandya
Copy link
Author

Even if resource group is set somewhere, it should list all the storage accounts, since I have 35 storage accounts in the same resource group. it is listing only 9 storage account out of 35 in that resource group

@evelyn-ys evelyn-ys added the CXP Attention This issue is handled by CXP team. label May 17, 2022
@ghost
Copy link

ghost commented May 17, 2022

Thank you for your feedback. This has been routed to the support team for assistance.

@evelyn-ys
Copy link
Member

Need server side to check

@navba-MSFT navba-MSFT assigned navba-MSFT and unassigned evelyn-ys May 17, 2022
@navba-MSFT
Copy link
Contributor

@shreyasHpandya Thanks for reaching out to us and sharing this feedback. Could you please confirm if the same command works fine from the Azure Cloud Shell ?

If Yes, while running the same command could you please share the --debug output of the working and failing scenario so that we could compare it. Awaiting your reply.

@navba-MSFT navba-MSFT added the needs-author-feedback More information is needed from author to address the issue. label May 17, 2022
@shreyasHpandya
Copy link
Author

From cloud shell also it does not list all the storage accounts

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels May 17, 2022
@navba-MSFT
Copy link
Contributor

@shreyasHpandya Thanks for getting back. Please run the same above command with--debugswitch and share the output here.

@navba-MSFT navba-MSFT added the needs-author-feedback More information is needed from author to address the issue. label May 17, 2022
@shreyasHpandya
Copy link
Author

How can I share the output privately

@ghost ghost removed the needs-author-feedback More information is needed from author to address the issue. label May 17, 2022
@navba-MSFT
Copy link
Contributor

navba-MSFT commented May 17, 2022

@shreyasHpandya Please email the debug output to navba @ microsoft dot com

@navba-MSFT navba-MSFT added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels May 17, 2022
@shreyasHpandya
Copy link
Author

sent

@navba-MSFT
Copy link
Contributor

@shreyasHpandya Thanks for sharing the debug output. I tried to create (35) StorageAccounts under my subscription, under a single resourceGroup and I was able to list the Storage Accounts. See the below screenshot:

image

I tried with the same AzCLI version as yours ( 2.36.0). The only difference here being my resource location is the same.

Could you please run either of the below commands and check if that helps ?

Command # 1:

az rest --method GET --uri https://management.azure.com/subscriptions/MYSUBID/resourceGroups/MyRGName/providers/Microsoft.Storage/storageAccounts?api-version=2021-09-01 --query 'value[].{Account:name,Location:location}' --output table

Command # 2

az resource list -g MyRGName --query "[*].[name,location]" -o tsv

Awaiting your reply.

@navba-MSFT navba-MSFT added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels May 17, 2022
@shreyasHpandya
Copy link
Author

Sent both output in email

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels May 17, 2022
@navba-MSFT
Copy link
Contributor

navba-MSFT commented May 17, 2022

@shreyasHpandya Thanks for sharing the screenshots again. I see that the command # 2 seems to be working but not the Command # 1. How feasible it is for you to use Command # 2 as a workaround ?

Also if this is a high priority issue, Could you please open a support ticket so that our engineers can reach out to you and troubleshoot this further ?

PS: Edited. I found one more interesting information from your logs. The Storage Account names which are not listed are belonging to "xcloudXXXXXX". The Storage account name must be 3 to 24 characters long. These Storage account names seems to be exceeding this limit. May I know How are these accounts created ? Are they created to store logs as a part of some other Azure Resource ?

@navba-MSFT navba-MSFT added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels May 17, 2022
@shreyasHpandya
Copy link
Author

The command 2 and 1 both are listing same storage accounts, other extra resources listed by command 2 are not storage accounts (they are VPCS)

also all the storage account names are 3-24 characters (even the once not listed by these commands).

These storage accounts are created by terraform. Terraform internally uses this API.

I will open a support ticket for this

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels May 17, 2022
@navba-MSFT
Copy link
Contributor

@shreyasHpandya Thanks for getting back. Since the same command works fine at our end (for 35 storage accounts in same resource group). see this, Please go ahead and create a support ticket as it would require active troubleshooting over a live meeting session.

@navba-MSFT navba-MSFT removed the needs-team-attention This issue needs attention from Azure service team or SDK team label May 17, 2022
@shreyasHpandya
Copy link
Author

Where can I create support ticket for this, its not allowing me from my azure portal

@navba-MSFT
Copy link
Contributor

navba-MSFT commented May 17, 2022

@shreyasHpandya You need to have a minimum of Support Request Contributor permissions on your subscription to create support ticket. (only the Subscription Owner can grant you this permissions if you don't have it) Once you have the right permissions on the subscription, you can go to the Portal and create Support ticket as shown below:

image

Else you can check with your Subscription Administrator for that. He should be able to help you to create a ticket.

@navba-MSFT navba-MSFT added the needs-author-feedback More information is needed from author to address the issue. label May 18, 2022
@shreyasHpandya
Copy link
Author

Update:
I deleted all storage accounts and recreated. It started showing up now. Still don't know the root cause of original issue.

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels May 18, 2022
@navba-MSFT
Copy link
Contributor

@shreyasHpandya Thanks for the update. I am glad that the issue is now resolved. Were you able to create support ticket and work with our support professionals before you fixed the issue ?

@navba-MSFT navba-MSFT added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels May 18, 2022
@shreyasHpandya
Copy link
Author

I could not create support ticket, it requires paid support plan.

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels May 18, 2022
@navba-MSFT navba-MSFT removed the needs-team-attention This issue needs attention from Azure service team or SDK team label May 18, 2022
@navba-MSFT
Copy link
Contributor

@shreyasHpandya Thanks for getting back. As I mentioned before, I wasn't able to replicate this issue. I did check a few of our backend issue knowledge bases but couldn't find any such similar issues being faced. So determining the exact cause of this issue wouldn't be possible. Nonetheless, I am glad that the issue is now fixed. If you need any further assistance in future please feel free to report the issue and we would be happy to help.

@navba-MSFT navba-MSFT added the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage
Projects
None yet
Development

No branches or pull requests

4 participants