Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
384 stars 1.25k forks source link

azure-cli-extensions/src /standbypool #8304

Open mharris4-eqr opened 3 days ago

mharris4-eqr commented 3 days ago

Describe the bug

Expect to create standby container pool but getting api error

Related command

'standby-container-group-pool', 'create', '--resource-group', 'dev-Atlas-rg', '--name', 'test-prefect-worker-pool', '--subscription', [REDACTED]', '--container-profile-id', 'REDACTED', '--profile-revision', '1', '--subnet-ids', '[0].id=REDACTED', '--refill-policy', 'always', '--max-ready-capacity', '1', '--location', 'centralus',

Errors

cli.azure.cli.core.azclierror: (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'. Code: InvalidResourceType Message: The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'. az_command_data_logger: (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'. Code: InvalidResourceType Message: The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'.

Issue script & Debug output

li.knack.cli: Command arguments: ['standby-container-group-pool', 'create', '--resource-group', 'dev-Atlas-rg', '--name', 'test-prefect-worker-pool', '--subscription', [REDACTED]', '--container-profile-id', 'REDACTED', '--profile-revision', '1', '--subnet-ids', '[0].id=REDACTED', '--refill-policy', 'always', '--max-ready-capacity', '1', '--location', 'centralus', '--debug'] cli.knack.cli: init debug log: Enable color in terminal. Enable VT mode. cli.knack.cli: Event: Cli.PreExecute [] cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000002109FAE72E0>, <function OutputProducer.on_global_arguments at 0x000002109FE8C040>, <function CLIQuery.on_global_arguments at 0x000002109FEB1440>] cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] cli.azure.cli.core: Modules found from index for 'standby-container-group-pool': ['azext_standbypool'] cli.azure.cli.core: Loading command modules: cli.azure.cli.core: Name Load Time Groups Commands cli.azure.cli.core: Total (0) 0.000 0 0 cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next'] cli.azure.cli.core: Loading extensions: cli.azure.cli.core: Name Load Time Groups Commands Directory cli.azure.cli.core: standbypool 0.480 2 8 C:\Users\mharris4.azure\cliextensions\standbypool cli.azure.cli.core: Total (1) 0.480 2 8 cli.azure.cli.core: Loaded 2 groups, 8 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : standby-container-group-pool create cli.azure.cli.core: Command table: standby-container-group-pool create cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x00000210A2099C60>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\mharris4.azure\commands\2024-11-21.23-54-47.standby-container-group-pool_create.27736.log'. az_command_data_logger: command args: standby-container-group-pool create --resource-group {} --name {} --subscription {} --container-profile-id {} --profile-revision {} --subnet-ids {} --refill-policy {} --max-ready-capacity {} --location {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x00000210A20DF2E0>] cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x00000210A21556C0>, <function register_cache_arguments..add_cache_arguments at 0x00000210A2155800>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x00000210A21558A0>] cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000002109FE8C0E0>, <function CLIQuery.handle_query_parameter at 0x000002109FEB14E0>, <function register_ids_argument..parse_ids_arguments at 0x00000210A2155760>] az_command_data_logger: extension name: standbypool az_command_data_logger: extension version: 1.0.0 cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\mharris4\.azure\msal_token_cache.bin', encrypt=True cli.azure.cli.core.auth.binary_cache: load: C:\Users\mharris4.azure\msal_http_cache.bin urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None) msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/6a427418-1716-4253-8733-cb17bba26e83 msal.authority: openid_config("https://login.microsoftonline.com/6a427418-1716-4253-8733-cb17bba26e83/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/6a427418-1716-4253-8733-cb17bba26e83/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/6a427418-1716-4253-8733-cb17bba26e83/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/REDACTED/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/REDACTED/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/REDACTED/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/REDACTED/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/REDACTED/kerberos', 'tenant_region_scope': 'NA', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'} msal.application: Broker enabled? True cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={} cli.azure.cli.core.auth.msal_credentials: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={} msal.application: Cache hit an AT msal.telemetry: Generate or reuse correlation_id: 8ae5c69e-0fcc-416c-98f8-a4d1d5ee34aa cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/bea1a780-98e8-4df8-9721-bf08d69ce0f3/resourceGroups/dev-Atlas-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/test-prefect-worker-pool?api-version=2024-03-01' cli.azure.cli.core.sdk.policies: Request method: 'PUT' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json' cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'Content-Length': '619' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '476fbcbc-a896-11ef-a784-c85ea9ed132b' cli.azure.cli.core.sdk.policies: 'CommandName': 'standby-container-group-pool create' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--resource-group --name --subscription --container-profile-id --profile-revision --subnet-ids --refill-policy --max-ready-capacity --location --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.67.0 (MSI) azsdk-python-core/1.31.0 Python/3.12.7 (Windows-11-10.0.22621-SP0)' cli.azure.cli.core.sdk.policies: 'Authorization': '*****' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: {"location": "centralus", "properties": {"containerGroupProperties": {"containerGroupProfile": {"id": "/subscriptions/bea1a780-98e8-4df8-9721-bf08d69ce0f3/resourceGroups/dev-Atlas-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/test-prefect1-worker-aciprofile", "revision": 1}, "subnetIds": [{"id": "/subscriptions/bea1a780-98e8-4df8-9721-bf08d69ce0f3/resourceGroups/EQR-Data-Analytics-Network/providers/Microsoft.Network/virtualNetworks/EQR-SUBSCRBR-dev-atlas-agents-aci-vnet/subnets/EQR-SUBSCRBR-dev-atlas-agents-aci-subnet"}]}, "elasticityProfile": {"maxReadyCapacity": 1, "refillPolicy": "always"}}} urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443 urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/bea1a780-98e8-4df8-9721-bf08d69ce0f3/resourceGroups/dev-Atlas-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/test-prefect-worker-pool?api-version=2024-03-01 HTTP/1.1" 404 160 cli.azure.cli.core.sdk.policies: Response status: 404 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' cli.azure.cli.core.sdk.policies: 'Content-Length': '160' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'gateway' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'cdd8a313-efa5-4033-8294-59907323a1d4' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'cdd8a313-efa5-4033-8294-59907323a1d4' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'NORTHCENTRALUS:20241122T055448Z:cdd8a313-efa5-4033-8294-59907323a1d4' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE' cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 9FD4C181A5A2416B992BF4FA5D88EF3B Ref B: CH1AA2020620049 Ref C: 2024-11-22T05:54:47Z' cli.azure.cli.core.sdk.policies: 'Date': 'Fri, 22 Nov 2024 05:54:47 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'."}} cli.azure.cli.core.azclierror: Traceback (most recent call last): File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 666, in execute File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 733, in _run_jobs_serially File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 714, in _run_job File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 1075, in call File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 1062, in call File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_poller.py", line 108, in result File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 94, in wrapper_use_tracer File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_poller.py", line 130, in wait File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_poller.py", line 83, in _start File "C:\Users\mharris4.azure\cliextensions\standbypool\azext_standbypool\aaz\latest\standby_container_group_pool_create.py", line 136, in _execute_operations yield self.StandbyContainerGroupPoolsCreateOrUpdate(ctx=self.ctx)() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\mharris4.azure\cliextensions\standbypool\azext_standbypool\aaz\latest\standby_container_group_pool_create.py", line 176, in call return self.on_error(session.http_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_operation.py", line 329, in on_error azure.core.exceptions.ResourceNotFoundError: (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'. Code: InvalidResourceType Message: The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'.

cli.azure.cli.core.azclierror: (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'. Code: InvalidResourceType Message: The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'. az_command_data_logger: (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'. Code: InvalidResourceType Message: The resource type could not be found in the namespace 'Microsoft.StandbyPool' for api version '2024-03-01'. cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x00000210A2099EE0>] az_command_data_logger: exit code: 3 cli.main: Command ran in 2.005 seconds (init: 0.344, invoke: 1.661) telemetry.main: Begin splitting cli events and extra events, total events: 1 telemetry.client: Accumulated 0 events. Flush the clients. telemetry.main: Finish splitting cli events and extra events, cli events: 1 telemetry.save: Save telemetry record of length 4322 in cache file under C:\Users\mharris4.azure\telemetry\20241121235448620 telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry__init__.pyc C:\Users\mharris4.azure C:\Users\mharris4.azure\telemetry\20241121235448620" telemetry.process: Return from creating process 30280 telemetry.main: Finish creating telemetry upload process.

Expected behavior

Expect to create standby cotnainer pool but getting api error

Environment Summary

{ "azure-cli": "2.67.0", "azure-cli-core": "2.67.0", "azure-cli-telemetry": "1.1.0", "extensions": { "containerapp": "0.3.50", "ssh": "2.0.3", "standbypool": "1.0.0", "virtual-network-manager": "1.0.1" } }

Additional context

No response

yonzhan commented 3 days ago

Thank you for opening this issue, we will look into it.

microsoft-github-policy-service[bot] commented 3 days ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @howang-ms, @Greedygre.