Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.26k stars 3.86k forks source link

Update-AzDatabricksWorkspace fails to encrypt DBFS if workspace has already other CMK enabled #22898

Closed satishraj777 closed 10 months ago

satishraj777 commented 1 year ago

Description

Steps to reproduce

1) Create a premium workspace with prepare encryption false.

2) Update workspace with CMK on Managed Services by running the below command

**Update-AzDatabricksWorkspace -SubscriptionId <subid> -ResourceGroupName <resourceGroup> -Name <nameofWorkspace> -ManagedServicesKeyVaultPropertiesKeyName '<keyname>' -ManagedServicesKeyVaultPropertiesKeyVaultUri '<keyvaultURI>' -ManagedServicesKeyVaultPropertiesKeyVersion '<keyversion>'**

 

Result: CMK on managed services should be configured successfully

3) Now, update workspace with CMK on DBFS or try to update CMK with prepareEncryption == true using below commands

Update-AzDatabricksWorkspace -ResourceGroupName <resourceGroup> -Name <nameofWorkspace> -EncryptionKeySource Microsoft.Keyvault -EncryptionKeyName <keyname> -EncryptionKeyVersion <keyversion>-EncryptionKeyVaultUri <keyvaultURI>

 

Update-AzDatabricksWorkspace -SubscriptionId <subid> -ResourceGroupName <resourceGroup> -Name <nameofWorkspace> -PrepareEncryption

 

Expected Result: 

 

1) Workspace should be updated with prepareEncryption true 

2) DBFS encryption should fail with either two validations: 

 

 

 

According to the traces trim correlation result, from the request payload we see that managedDisk is being called while we are only trying to update prepareEncryption or DBFS encryption. 


Issue script & Debug output

DEBUG: [CmdletBeginProcessing]: Starting command
DEBUG: CmdletBeginProcessing: 
DEBUG: CmdletProcessRecordStart: 
DEBUG: CmdletGetPipeline: 
DEBUG: CmdletBeforeAPICall: 
DEBUG: URLCreated: /subscriptions/7a9974b4-6ef3-490d-a02d-b9b3a07332f6/resourceGroups/UC-sanitytest-102/providers/Microsoft.Databricks/workspaces/bug-test-repro?api-version=2023
-02-01
DEBUG: RequestCreated: /subscriptions/7a9974b4-6ef3-490d-a02d-b9b3a07332f6/resourceGroups/UC-sanitytest-102/providers/Microsoft.Databricks/workspaces/bug-test-repro?api-version=
2023-02-01
DEBUG: HeaderParametersAdded: 
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/7a9974b4-6ef3-490d-a02d-b9b3a07332f6/resourceGroups/UC-sanitytest-102/providers/Microsoft.Databricks/workspaces/bug-test-repro?api-ver
sion=2023-02-01

Headers:
x-ms-unique-id                : 37
x-ms-client-request-id        : 43ebf095-c34c-4682-92ab-343556748db9
CommandName                   : Get-AzDatabricksWorkspace
FullCommandName               : Get-AzDatabricksWorkspace_Get
ParameterSetName              : __AllParameterSets
User-Agent                    : AzurePowershell/v0.0.0,PSVersion/v5.1.22621.1778,Az.Databricks/1.2.0

Body:

DEBUG: BeforeCall: 
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-resource-requests: 1799
x-ms-request-id               : westcentralus:eccaa374-1269-4f89-a799-b702d9ad7982
x-ms-correlation-request-id   : 00ed6480-8126-48a6-a006-7e32eb1867f2
x-ms-routing-request-id       : SOUTHCENTRALUS:20231003T183637Z:00ed6480-8126-48a6-a006-7e32eb1867f2
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
X-Cache                       : CONFIG_NOCACHE
X-MSEdge-Ref                  : Ref A: 2B45EA40B1A34447B5D083B02A8195B8 Ref B: SN4AA2022303051 Ref C: 2023-10-03T18:36:37Z
Cache-Control                 : no-cache
Date                          : Tue, 03 Oct 2023 18:36:37 GMT

Body:
{
  "properties": {
    "encryption": {
      "entities": {
        "managedServices": {
          "keySource": "Microsoft.Keyvault",
          "keyVaultProperties": {
            "keyVaultUri": "https://keyvaultbash1.vault.azure.net/",
            "keyName": "keysanitytest1-non",
            "keyVersion": "d5d792fb9e5c4f948ec72bec3737b35e"
          }
        }
      }
    },
    "managedResourceGroupId": "/subscriptions/7a9974b4-6ef3-490d-a02d-b9b3a07332f6/resourceGroups/databricks-rg-bug-test-repro-ep6yiwpnlg76e",
    "parameters": {
      "enableFedRampCertification": {
        "type": "Bool",
        "value": false
      },
      "enableNoPublicIp": {
        "type": "Bool",
        "value": false
      },
      "prepareEncryption": {
        "type": "Bool",
        "value": false
      },
      "publicIpName": {
        "type": "String",
        "value": "nat-gw-public-ip"
      },
      "requireInfrastructureEncryption": {
        "type": "Bool",
        "value": false
      },
      "resourceTags": {
        "type": "Object",
        "value": {
          "application": "databricks",
          "databricks-environment": "true"
        }
      },
      "storageAccountName": {
        "type": "String",
        "value": "dbstoragec224jpzlpejto"
      },
      "storageAccountSkuName": {
        "type": "String",
        "value": "Standard_GRS"
      },
      "vnetAddressPrefix": {
        "type": "String",
        "value": "10.139"
      }
    },
    "provisioningState": "Succeeded",
    "authorizations": [
      {
        "principalId": "9a74af6f-d153-4348-988a-e2672920bee9",
        "roleDefinitionId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
      }
    ],
    "createdBy": {
      "oid": "a693f96e-bf44-45cb-b4d2-22e1b2797f35",
      "puid": "100320013AAC417E",
      "applicationId": "c44b4083-3bb0-49c1-b47d-974e53cbdf3c"
    },
    "updatedBy": {
      "oid": "a693f96e-bf44-45cb-b4d2-22e1b2797f35",
      "puid": "100320013AAC417E",
      "applicationId": "1950a258-227b-4e31-a9cf-717495945fc2"
    },
    "workspaceId": "8088316196837333",
    "workspaceUrl": "adb-8088316196837333.13.azuredatabricks.net",
    "createdDateTime": "2023-10-03T18:26:59.6343974Z"
  },
  "id": "/subscriptions/7a9974b4-6ef3-490d-a02d-b9b3a07332f6/resourceGroups/UC-sanitytest-102/providers/Microsoft.Databricks/workspaces/bug-test-repro",
  "name": "bug-test-repro",
  "type": "Microsoft.Databricks/workspaces",
  "sku": {
    "name": "premium"
  },
  "location": "westcentralus",
  "tags": {}
}

DEBUG: ResponseCreated: 
DEBUG: BeforeResponseDispatch: 
DEBUG: Finally: 
DEBUG: CmdletAfterAPICall: 
DEBUG: [CmdletProcessRecordAsyncEnd]: Finish HTTP process
DEBUG: CmdletProcessRecordAsyncEnd: 
DEBUG: CmdletProcessRecordEnd: 
DEBUG: [CmdletBeginProcessing]: Starting command
DEBUG: CmdletBeginProcessing: 
DEBUG: CmdletProcessRecordStart: 
DEBUG: CmdletGetPipeline: 
DEBUG: CmdletBeforeAPICall: 
DEBUG: URLCreated: /subscriptions/7a9974b4-6ef3-490d-a02d-b9b3a07332f6/resourceGroups/UC-sanitytest-102/providers/Microsoft.Databricks/workspaces/bug-test-repro?api-version=2023
-02-01
DEBUG: RequestCreated: /subscriptions/7a9974b4-6ef3-490d-a02d-b9b3a07332f6/resourceGroups/UC-sanitytest-102/providers/Microsoft.Databricks/workspaces/bug-test-repro?api-version=
2023-02-01
DEBUG: HeaderParametersAdded: 
DEBUG: BodyContentSet: 
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/7a9974b4-6ef3-490d-a02d-b9b3a07332f6/resourceGroups/UC-sanitytest-102/providers/Microsoft.Databricks/workspaces/bug-test-repro?api-ver
sion=2023-02-01

Headers:
x-ms-unique-id                : 38
x-ms-client-request-id        : 5a3061bd-2a0f-43a6-9702-830d3dd13a1f
CommandName                   : Az.Databricks.private\New-AzDatabricksWorkspace_CreateViaIdentity
FullCommandName               : New-AzDatabricksWorkspace_CreateViaIdentity
ParameterSetName              : __AllParameterSets
User-Agent                    : AzurePowershell/v0.0.0,PSVersion/v5.1.22621.1778,Az.Databricks/1.2.0

Body:
{
  "location": "westcentralus",
  "properties": {
    "parameters": {
      "enableNoPublicIp": {
        "value": false
      },
      "publicIpName": {
        "value": "nat-gw-public-ip"
      },
      "prepareEncryption": {
        "value": true
      },
      "requireInfrastructureEncryption": {
        "value": false
      },
      "storageAccountName": {
        "value": "dbstoragec224jpzlpejto"
      },
      "storageAccountSkuName": {
        "value": "Standard_GRS"
      },
      "vnetAddressPrefix": {
        "value": "10.139"
      }
    },
    "encryption": {
      "entities": {
        "managedServices": {
          "keyVaultProperties": {
            "keyVaultUri": "https://keyvaultbash1.vault.azure.net/",
            "keyName": "keysanitytest1-non",
            "keyVersion": "d5d792fb9e5c4f948ec72bec3737b35e"
          },
          "keySource": "Microsoft.Keyvault"
        },
        "managedDisk": {
          "keySource": "Microsoft.Keyvault"
        }
      }
    },
    "managedResourceGroupId": "/subscriptions/7a9974b4-6ef3-490d-a02d-b9b3a07332f6/resourceGroups/databricks-rg-bug-test-repro-ep6yiwpnlg76e",
    "authorizations": [
      {
        "principalId": "9a74af6f-d153-4348-988a-e2672920bee9",
        "roleDefinitionId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
      }
    ]
  },
  "sku": {
    "name": "premium"
  }
}

DEBUG: BeforeCall: 
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-resource-requests: 149
x-ms-request-id               : westcentralus:d438f95e-a54a-4609-b851-0f6bb56184e5
x-ms-correlation-request-id   : f2a3fb6e-8666-401d-bdb8-a5e18f182e1a
x-ms-routing-request-id       : SOUTHCENTRALUS:20231003T183640Z:f2a3fb6e-8666-401d-bdb8-a5e18f182e1a
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
X-Cache                       : CONFIG_NOCACHE
X-MSEdge-Ref                  : Ref A: 454C4C7AB7184763891443ED22259BD2 Ref B: SN4AA2022303051 Ref C: 2023-10-03T18:36:38Z
Cache-Control                 : no-cache
Date                          : Tue, 03 Oct 2023 18:36:39 GMT

Body:
{
  "error": {
    "code": "InvalidEncryptionEntitiesKeyVaultValue",
    "message": "The keysource is specified as keyvault but keyvault details are not correctly provided."
  }
}

DEBUG: ResponseCreated: 
DEBUG: BeforeResponseDispatch: 
Az.Databricks.private\New-AzDatabricksWorkspace_CreateViaIdentity : The keysource is specified as keyvault but keyvault details are not correctly provided.
At C:\Users\v-sgandamuni\OneDrive - Microsoft\Documents\WindowsPowerShell\Modules\Az.Databricks\1.2.0\custom\Update-AzDatabricksWorkspace.ps1:391 char:17
+ ...             Az.Databricks.private\New-AzDatabricksWorkspace_CreateVia ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: ({ body = {
  "...mium"
  }
} }:<>f__AnonymousType7`1) [New-AzDatabrick...eateViaIdentity], Exception
    + FullyQualifiedErrorId : InvalidEncryptionEntitiesKeyVaultValue,Microsoft.Azure.PowerShell.Cmdlets.Databricks.Cmdlets.NewAzDatabricksWorkspace_CreateViaIdentity
DEBUG: [Finally]: Getting exception 'Microsoft.Azure.Commands.Common.Exceptions.AzPSCloudException: InternalException' from response
DEBUG: Finally: 
DEBUG: CmdletAfterAPICall: 
DEBUG: [CmdletProcessRecordAsyncEnd]: Finish HTTP process
DEBUG: CmdletProcessRecordAsyncEnd: 
DEBUG: CmdletProcessRecordEnd: 
DEBUG: AzureQoSEvent: Module: Az.Databricks:1.2.0; CommandName: Update-AzDatabricksWorkspace; PSVersion: 5.1.22621.1778; IsSuccess: False; Duration: 00:00:03.1613358; Exception:
 InternalException;

Environment data

Name                           Value                                                                                                                                            
----                           -----                                                                                                                                            
PSVersion                      5.1.22621.1778                                                                                                                                   
PSEdition                      Desktop                                                                                                                                          
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                          
BuildVersion                   10.0.22621.1778                                                                                                                                  
CLRVersion                     4.0.30319.42000                                                                                                                                  
WSManStackVersion              3.0                                                                                                                                              
PSRemotingProtocolVersion      2.3                                                                                                                                              
SerializationVersion           1.1.0.1

Module versions

ModuleType Version    Name                                ExportedCommands                                                                                                      
---------- -------    ----                                ----------------                                                                                                      
Script     2.7.6      Az.Accounts                         {Add-AzEnvironment, Clear-AzContext, Clear-AzDefault, Connect-AzAccount...}                                           
Script     1.2.0      Az.Databricks                       {Get-AzDatabricksAccessConnector, Get-AzDatabricksOutboundNetworkDependenciesEndpoint, Get-AzDatabricksVNetPeering,...

Error output

DEBUG: 11:38:12 AM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 11:38:12 AM - using account id 'v-sgandamuni@microsoft.com'...
WARNING: Upcoming breaking changes in the cmdlet 'Resolve-AzError' :
The `Resolve-Error` alias will be removed in a future release.  Please change any scripts that use this alias to use `Resolve-AzError` instead.
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.

   HistoryId: 11

Message        : [InvalidEncryptionEntitiesKeyVaultValue] : The keysource is specified as keyvault but keyvault details are not correctly provided.
StackTrace     : 
Exception      : System.Exception
InvocationInfo : {New-AzDatabricksWorkspace_CreateViaIdentity}
Line           :                 Az.Databricks.private\New-AzDatabricksWorkspace_CreateViaIdentity -InputObject $workspace -Parameter $workspace @PSBoundParameters

Position       : At C:\Users\v-sgandamuni\OneDrive - Microsoft\Documents\WindowsPowerShell\Modules\Az.Databricks\1.2.0\custom\Update-AzDatabricksWorkspace.ps1:391 char:17
                 + ...             Az.Databricks.private\New-AzDatabricksWorkspace_CreateVia ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 11

   HistoryId: 9

Message        : Unable to perform update operation for the workspace : 
                 '/subscriptions/7a9974b4-6ef3-490d-a02d-b9b3a07332f6/resourceGroups/UC-sanitytest-102/providers/Microsoft.Databricks/workspaces/bug-test-repro' failed : 
                 'PERMISSION_DENIED: Invalid permissions on the specified KeyVault https://keyvaultbash1.vault.azure.net/. Please give Databricks the following access 
                 permissions to the given KeyVault: [Get, Wrap, Unwrap]. Wrapped Message: Status code 403, {"error":{"code":"Forbidden","message":"The user, group or 
                 application 'name=AzureDatabricks;appid=2ff814a6-3304-4ab8-85cb-cd0e6f879c1d;oid=fe597bb2-377c-44f1-8515-82c8a1a62e3d;numgroups=119;iss=https://sts.windows.net
                 /72f988bf-86f1-41af-91ab-2d7cd011db47/' does not have keys get permission on key vault 'keyvaultbash1;location=westcentralus'. For help resolving this issue, 
                 please see https://go.microsoft.com/fwlink/?linkid=2125287","innererror":{"code":"AccessDenied"}}}'.
StackTrace     :    at Microsoft.Azure.PowerShell.Cmdlets.Databricks.Databricks.<WorkspacesCreateOrUpdate_Call>d__74.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at Microsoft.Azure.PowerShell.Cmdlets.Databricks.Databricks.<WorkspacesCreateOrUpdate_Call>d__74.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
                    at Microsoft.Azure.PowerShell.Cmdlets.Databricks.Databricks.<WorkspacesCreateOrUpdateViaIdentity>d__73.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
                    at Microsoft.Azure.PowerShell.Cmdlets.Databricks.Cmdlets.NewAzDatabricksWorkspace_CreateViaIdentity.<ProcessRecordAsync>d__69.MoveNext()
Exception      : Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.UndeclaredResponseException
InvocationInfo : {New-AzDatabricksWorkspace_CreateViaIdentity}
Line           :                 Az.Databricks.private\New-AzDatabricksWorkspace_CreateViaIdentity -InputObject $workspace -Parameter $workspace @PSBoundParameters

Position       : At C:\Users\v-sgandamuni\OneDrive - Microsoft\Documents\WindowsPowerShell\Modules\Az.Databricks\1.2.0\custom\Update-AzDatabricksWorkspace.ps1:391 char:17
                 + ...             Az.Databricks.private\New-AzDatabricksWorkspace_CreateVia ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 9

   HistoryId: -1

Message        : The property 'PrepareEncryption' cannot be found on this object. Verify that the property exists and can be set.
StackTrace     :    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
                    at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                    at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
                    at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           :                 $workspace.PrepareEncryption = $PrepareEncryption

Position       : At C:\Users\v-sgandamuni\OneDrive - Microsoft\Documents\WindowsPowerShell\Modules\Az.Databricks\1.2.0\custom\Update-AzDatabricksWorkspace.ps1:317 char:17
                 +                 $workspace.PrepareEncryption = $PrepareEncryption
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

   HistoryId: 7

Message        : An error occurred while sending the request.
StackTrace     :    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Commands.Common.ContextAdapter.<AuthenticationHelper>d__13.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass14_0.<<SendHandler>b__0>d.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
                    at Microsoft.Azure.PowerShell.Cmdlets.Databricks.Databricks.<WorkspacesGet_Call>d__82.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at Microsoft.Azure.PowerShell.Cmdlets.Databricks.Databricks.<WorkspacesGet_Call>d__82.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
                    at Microsoft.Azure.PowerShell.Cmdlets.Databricks.Databricks.<WorkspacesGet>d__80.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
                    at Microsoft.Azure.PowerShell.Cmdlets.Databricks.Cmdlets.GetAzDatabricksWorkspace_Get.<ProcessRecordAsync>d__64.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at Microsoft.Azure.PowerShell.Cmdlets.Databricks.Cmdlets.GetAzDatabricksWorkspace_Get.<ProcessRecordAsync>d__64.MoveNext()
Exception      : System.Net.Http.HttpRequestException
InvocationInfo : {Get-AzDatabricksWorkspace_Get}
Line           :             $workspace = Get-AzDatabricksWorkspace @PSBoundParameters

Position       : At C:\Users\v-sgandamuni\OneDrive - Microsoft\Documents\WindowsPowerShell\Modules\Az.Databricks\1.2.0\custom\Update-AzDatabricksWorkspace.ps1:309 char:13
                 +             $workspace = Get-AzDatabricksWorkspace @PSBoundParameters
                 +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 7

Message        : The underlying connection was closed: An unexpected error occurred on a send.
StackTrace     :    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
                    at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
Exception      : System.Net.WebException
InvocationInfo : {Get-AzDatabricksWorkspace_Get}
Line           :             $workspace = Get-AzDatabricksWorkspace @PSBoundParameters

Position       : At C:\Users\v-sgandamuni\OneDrive - Microsoft\Documents\WindowsPowerShell\Modules\Az.Databricks\1.2.0\custom\Update-AzDatabricksWorkspace.ps1:309 char:13
                 +             $workspace = Get-AzDatabricksWorkspace @PSBoundParameters
                 +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 7

Message        : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
StackTrace     :    at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
                    at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
Exception      : System.IO.IOException
InvocationInfo : {Get-AzDatabricksWorkspace_Get}
Line           :             $workspace = Get-AzDatabricksWorkspace @PSBoundParameters

Position       : At C:\Users\v-sgandamuni\OneDrive - Microsoft\Documents\WindowsPowerShell\Modules\Az.Databricks\1.2.0\custom\Update-AzDatabricksWorkspace.ps1:309 char:13
                 +             $workspace = Get-AzDatabricksWorkspace @PSBoundParameters
                 +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 7

Message        : An existing connection was forcibly closed by the remote host
StackTrace     :    at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
                    at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
Exception      : System.Net.Sockets.SocketException
InvocationInfo : {Get-AzDatabricksWorkspace_Get}
Line           :             $workspace = Get-AzDatabricksWorkspace @PSBoundParameters

Position       : At C:\Users\v-sgandamuni\OneDrive - Microsoft\Documents\WindowsPowerShell\Modules\Az.Databricks\1.2.0\custom\Update-AzDatabricksWorkspace.ps1:309 char:13
                 +             $workspace = Get-AzDatabricksWorkspace @PSBoundParameters
                 +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 7

   HistoryId: 1

Message        : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
StackTrace     :    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
                    at System.Reflection.RuntimeModule.GetTypes()
                    at System.Reflection.Assembly.GetTypes()
                    at Microsoft.PowerShell.Commands.AddTypeCommand.LoadAssemblyFromPathOrName(List`1 generatedTypes)
                    at Microsoft.PowerShell.Commands.AddTypeCommand.EndProcessing()
                    at System.Management.Automation.CommandProcessorBase.Complete()
Exception      : System.Reflection.ReflectionTypeLoadException
InvocationInfo : {Add-Type}
Line           :                     Add-Type -Path $_.FullName -ErrorAction Ignore | Out-Null

Position       : At C:\Users\v-sgandamuni\OneDrive - Microsoft\Documents\WindowsPowerShell\Modules\Az.Accounts\2.7.6\Az.Accounts.psm1:39 char:21
                 + ...                Add-Type -Path $_.FullName -ErrorAction Ignore | Out-N ...
                 +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 1

The Azure PowerShell team is listening, please let us know how we are doing: https://aka.ms/azpssurvey?Q_CHL=ERROR.

DEBUG: AzureQoSEvent: Module: Az.Accounts:2.7.6; CommandName: Resolve-AzError; PSVersion: 5.1.22621.1778; IsSuccess: True; Duration: 00:00:01.0859940
DEBUG: Finish sending metric.
DEBUG: 11:38:14 AM - ResolveError end processing.
isra-fel commented 1 year ago

Thanks for reporting! @lijinpei2008 please look into this issue and let's discuss this week.

satishraj777 commented 1 year ago

Hello @isra-fel and @lijinpei2008 Any update on this ticket? Our customer is expecting a fix on this and is not willing to close the ticket at our end. Please prioritize this and help us with any update.

isra-fel commented 1 year ago

The fix was merged and will be available in the next release on Nov. 15th.

isra-fel commented 10 months ago

Closing as fixed.