Azure / azure-cli

Azure Command-Line Interface
MIT License
4.04k stars 3.01k forks source link

'az backup recoverypoint show' doesn't return disk configuration #28492

Open andlr opened 9 months ago

andlr commented 9 months ago

Describe the bug

I am trying to use az backup recoverypoint show/list commands to get information about a recovery point(s) of IaaS VM. Documentation states:

Each recovery point has the information of the included and excluded disks

But for each recovery point, command returns "recoveryPointDiskConfiguration": null, even though each recovery point contains 1 OS disk and 1 data disk.

Related command

az backup recoverypoint show --vault-name {vaultname} --resource-group {resourcegroup} -c {vmname} -i {vmname} --backup-management-type AzureIaasVM -n {recoverypointID}

Errors

Not an error, but missing information:

"recoveryPointDiskConfiguration": null

Issue script & Debug output

az backup recoverypoint show --vault-name --resource-group -c -i --backup-management-type AzureIaasVM -n --debug cli.knack.cli: Command arguments: ['backup', 'recoverypoint', 'show', '--vault-name', '', '--resource-group', '', '-c', '', '-i', '', '--backup-management-type', 'AzureIaasVM', '-n', '', '--debug' ] cli.knack.cli: init debug log: Enable color in terminal. cli.knack.cli: Event: Cli.PreExecute [] cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7fc73a019440>, <function OutputProducer.on_global_arguments at 0x7fc739fb9e40>, <function CLIQuery.on_global_arguments at 0x7fc739ff3920> ] cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] cli.azure.cli.core: Modules found from index for 'backup': ['azure.cli.command_modules.backup' ] cli.azure.cli.core: Loading command modules: cli.azure.cli.core: Name Load Time Groups Commands cli.azure.cli.core: backup 0.002 16 60 cli.azure.cli.core: Total (1) 0.002 16 60 cli.azure.cli.core: Loaded 16 groups, 60 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : backup recoverypoint show cli.azure.cli.core: Command table: backup recoverypoint show cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fc739114fe0> ] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/user/.azure/commands/2024-03-01.15-25-47.backup_recoverypoint_show.18577.log'. az_command_data_logger: command args: backup recoverypoint show --vault-name {} --resource-group {} -c {} -i {} --backup-management-type {} -n {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fc738ed34c0> ] cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fc738f311c0>, <function register_cache_arguments..add_cache_arguments at 0x7fc738f31300> ] cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fc739fb9ee0>, <function CLIQuery.handle_query_parameter at 0x7fc739ff39c0>, <function register_ids_argument..parse_ids_arguments at 0x7fc738f31260> ] cli.azure.cli.core.commands.client_factory: Getting management service client client_type=RecoveryServicesBackupClient cli.azure.cli.core.auth.persistence: build_persistence: location='/home/user/.azure/msal_token_cache.json', encrypt=False cli.azure.cli.core.auth.binary_cache: load: /home/user/.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: openid_config = {'token_endpoint': 'https: //login.microsoftonline.com/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/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/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/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/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/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? False cli.azure.cli.core.commands.client_factory: Getting management service client client_type=RecoveryServicesBackupClient urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None) msal.authority: openid_config = {'token_endpoint': 'https: //login.microsoftonline.com/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/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/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/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/e46ee348-ff75-4a03-b9de-fbdc822c3ef4/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? False cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https: //management.core.windows.net//.default',), kwargs={} cli.azure.cli.core.auth.msal_authentication: 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: e97700ea-dde3-4965-835e-3e15b0e085c0 cli.azure.cli.core.sdk.policies: Request URL: 'https: //management.azure.com/subscriptions//resourceGroups//providers/Microsoft.RecoveryServices/vaults//backupProtectedItems?api-version=2023-04-01&%24filter=backupManagementType+eq+%27AzureIaasVM%27' cli.azure.cli.core.sdk.policies: Request method: 'GET' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '3732c8b9-d7cf-11ee-a6b6-fb70e5eb54bb' cli.azure.cli.core.sdk.policies: 'CommandName': 'backup recoverypoint show' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--vault-name --resource-group -c -i --backup-management-type -n --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.56.0 (DEB) azsdk-python-mgmt-recoveryservicesbackup/7.0.0 Python/3.11.5 (Linux-6.5.0-15-generic-x86_64-with-glibc2.35)' cli.azure.cli.core.sdk.policies: 'Authorization': '' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: This request has no body urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com: 443 urllib3.connectionpool: https: //management.azure.com:443 "GET /subscriptions//resourceGroups//providers/Microsoft.RecoveryServices/vaults//backupProtectedItems?api-version=2023-04-01&%24filter=backupManagementType+eq+%27AzureIaasVM%27 HTTP/1.1" 200 1853 cli.azure.cli.core.sdk.policies: Response status: 200 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': '1853' 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-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '37654618-802d-40b0-8290-fec7422af500' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '3732c8b9-d7cf-11ee-a6b6-fb70e5eb54bb' cli.azure.cli.core.sdk.policies: 'Server': 'Kestrel' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-resource-requests': '149' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '37654618-802d-40b0-8290-fec7422af500' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'POLANDCENTRAL: 20240301T132549Z: 37654618-802d-40b0-8290-fec7422af500' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'Date': 'Fri, 01 Mar 2024 13: 25: 49 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: { "value": [ { "id": "/subscriptions//resourceGroups//providers/Microsoft.RecoveryServices/vaults//backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;;/protectedItems/VM;iaasvmcontainerv2;;", "name": "VM;iaasvmcontainerv2;;", "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", "properties": { "friendlyName": "", "virtualMachineId": "/subscriptions//resourceGroups//providers/Microsoft.Compute/virtualMachines/", "protectionStatus": "Healthy", "protectionState": "Protected", "healthStatus": "Passed", "healthDetails": [ { "code": 400239, "title": "IaasVmHealthGreenDefault", "message": "Backup pre-check status of this virtual machine is OK.", "recommendations": [] } ], "lastBackupStatus": "Completed", "lastBackupTime": "2024-03-01T12:19:49.9016915Z", "protectedItemDataId": "933564538049343641", "extendedProperties": { "linuxVmApplicationName": "" }, "protectedItemType": "Microsoft.Compute/virtualMachines", "backupManagementType": "AzureIaasVM", "workloadType": "VM", "containerName": "iaasvmcontainerv2;;", "sourceResourceId": "/subscriptions//resourceGroups//providers/Microsoft.Compute/virtualMachines/", "policyId": "/subscriptions//resourceGroups//providers/Microsoft.RecoveryServices/vaults//backupPolicies/", "policyName": "", "lastRecoveryPoint": "2024-03-01T12:19:54.6703191Z", "vaultId": "https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.RecoveryServices/vaults/", "isArchiveEnabled": false, "softDeleteRetentionPeriod": 0 } } ] } cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https: //management.core.windows.net//.default',), kwargs={} cli.azure.cli.core.auth.msal_authentication: 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: aeb956a7-e748-4516-955c-cc05dbda4f06 cli.azure.cli.core.sdk.policies: Request URL: 'https: //management.azure.com/subscriptions//resourceGroups//providers/Microsoft.RecoveryServices/vaults//backupFabrics/Azure/protectionContainers/IaasVMContainer%3Biaasvmcontainerv2%3B%3B/protectedItems/VM%3Biaasvmcontainerv2%3B%3B/recoveryPoints/?api-version=2023-04-01' cli.azure.cli.core.sdk.policies: Request method: 'GET' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '3732c8b9-d7cf-11ee-a6b6-fb70e5eb54bb' cli.azure.cli.core.sdk.policies: 'CommandName': 'backup recoverypoint show' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--vault-name --resource-group -c -i --backup-management-type -n --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.56.0 (DEB) azsdk-python-mgmt-recoveryservicesbackup/7.0.0 Python/3.11.5 (Linux-6.5.0-15-generic-x86_64-with-glibc2.35)' cli.azure.cli.core.sdk.policies: 'Authorization': '' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: This request has no body urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com: 443 urllib3.connectionpool: https: //management.azure.com:443 "GET /subscriptions//resourceGroups//providers/Microsoft.RecoveryServices/vaults//backupFabrics/Azure/protectionContainers/IaasVMContainer%3Biaasvmcontainerv2%3B%3B/protectedItems/VM%3Biaasvmcontainerv2%3B%3B/recoveryPoints/?api-version=2023-04-01 HTTP/1.1" 200 1484 cli.azure.cli.core.sdk.policies: Response status: 200 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': '1484' 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-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '3cb12fe4-dee3-4b76-b8e3-4a674ab25a7b' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '3732c8b9-d7cf-11ee-a6b6-fb70e5eb54bb' cli.azure.cli.core.sdk.policies: 'Server': 'Kestrel' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-resource-requests': '148' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '3cb12fe4-dee3-4b76-b8e3-4a674ab25a7b' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'POLANDCENTRAL: 20240301T132549Z: 3cb12fe4-dee3-4b76-b8e3-4a674ab25a7b' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'Date': 'Fri, 01 Mar 2024 13: 25: 49 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: { "id": "/subscriptions//resourceGroups//providers/Microsoft.RecoveryServices/vaults//backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;;/protectedItems/VM;iaasvmcontainerv2;;/recoveryPoints/", "name": "", "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints", "properties": { "objectType": "IaasVMRecoveryPoint", "recoveryPointType": "CrashConsistent", "recoveryPointTime": "2024-02-15T18:26:21.6978586Z", "recoveryPointAdditionalInfo": "", "sourceVMStorageType": "PremiumVMOnPartialPremiumStorage", "isSourceVMEncrypted": false, "isInstantIlrSessionActive": false, "recoveryPointTierDetails": [ { "type": "InstantRP", "status": "Deleted" }, { "type": "HardenedRP", "status": "Valid" } ], "isManagedVirtualMachine": true, "virtualMachineSize": "Standard_D4s_v3", "originalStorageAccountOption": false, "osType": "Linux", "zones": [ "1" ], "recoveryPointMoveReadinessInfo": { "ArchivedRP": { "isReadyForMove": false, "additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again." } }, "securityType": "None", "recoveryPointProperties": { "expiryTime": "2024-03-16T18:26:09.0000000", "ruleName": "On-Demand", "isSoftDeleted": false }, "isPrivateAccessEnabledOnAnyDisk": false, "createdWithPolicyType": "V2" } } cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7fc738f0e3e0>, <function _x509_from_base64_to_hex_transform at 0x7fc738f0e480> ] cli.knack.cli: Event: CommandInvoker.OnFilterResult [] { "eTag": null, "id": "/subscriptions//resourceGroups//providers/Microsoft.RecoveryServices/vaults//backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;;/protectedItems/VM;iaasvmcontainerv2;;/recoveryPoints/", "location": null, "name": "", "properties": { "createdWithPolicyType": "V2", "isInstantIlrSessionActive": false, "isManagedVirtualMachine": true, "isPrivateAccessEnabledOnAnyDisk": false, "isSourceVmEncrypted": false, "keyAndSecret": null, "objectType": "IaasVMRecoveryPoint", "originalStorageAccountOption": false, "osType": "Linux", "recoveryPointAdditionalInfo": "", "recoveryPointDiskConfiguration": null, "recoveryPointMoveReadinessInfo": { "ArchivedRP": { "additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again.", "isReadyForMove": false } }, "recoveryPointProperties": { "expiryTime": "2024-03-16T18:26:09.0000000", "isSoftDeleted": false, "ruleName": "On-Demand" }, "recoveryPointTierDetails": [ { "extendedInfo": null, "status": "Deleted", "type": "InstantRP" }, { "extendedInfo": null, "status": "Valid", "type": "HardenedRP" } ], "recoveryPointTime": "2024-02-15T18:26:21.697858+00:00", "recoveryPointType": "CrashConsistent", "securityType": "None", "sourceVmStorageType": "PremiumVMOnPartialPremiumStorage", "virtualMachineSize": "Standard_D4s_v3", "zones": [ "1" ] }, "resourceGroup": "", "tags": null, "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints" } cli.knack.cli: Event: Cli.SuccessfulExecute [] cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fc739115260> ] az_command_data_logger: exit code: 0 cli.main: Command ran in 2.106 seconds (init: 0.106, invoke: 2.000) 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 3499 in cache telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.11/site-packages/azure/cli/telemetry/init.py /home/user/.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.

Expected behavior

Recovery point information with disk configuration (recoveryPointDiskConfiguration).

Environment Summary

azure-cli 2.56.0 *

core 2.56.0 * telemetry 1.1.0

Dependencies: msal 1.24.0b2 azure-mgmt-resource 23.1.0b2

Python location '/opt/az/bin/python3' Extensions directory '/home/anshox/.azure/cliextensions'

Python (Linux) 3.11.5 (main, Jan 8 2024, 09:08:13) [GCC 11.4.0]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

No response

azure-client-tools-bot-prd[bot] commented 9 months ago

Hi @andlr,

2.56.0 is not the latest Azure CLI(2.57.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

yonzhan commented 9 months ago

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

microsoft-github-policy-service[bot] commented 9 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @pvrk, @adityabalaji-msft.

andlr commented 9 months ago

2.56.0 is not the latest Azure CLI(2.57.0). If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following

Problem exists on 2.57.0 as well