parsec-cloud / Parsec-Cloud-Preparation-Tool

Launch Parsec enabled cloud computers via your own cloud provider account.
931 stars 172 forks source link

AccessDeniedAccess denied.Anonymous caller does not have storage.objects.list #101

Open oloflarsson opened 1 year ago

oloflarsson commented 1 year ago
Screenshot 2022-12-31 at 09 43 39

Loading...
invoke-webrequest : AccessDeniedAccess denied.Anonymous caller does not have storage.objects.list access to the Google
Cloud Storage bucket. Permission 'storage.objects.list' denied on resource (or it may not exist).
At C:\ProgramData\ParsecLoader\GPUUpdaterTool.ps1:264 char:38
+ ... ver =([xml](invoke-webrequest -uri https://storage.googleapis.com/nvi ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
You cannot call a method on a null-valued expression.
At C:\ProgramData\ParsecLoader\GPUUpdaterTool.ps1:265 char:9
+         $googlestoragedriver.split('/')[2].split('_')[0]
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

This GPU (NVIDIA Tesla T4) requires a private driver downloaded from the Google Support Site
invoke-webrequest : AccessDeniedAccess denied.Anonymous caller does not have storage.objects.list access to the Google
Cloud Storage bucket. Permission 'storage.objects.list' denied on resource (or it may not exist).
At C:\ProgramData\ParsecLoader\GPUUpdaterTool.ps1:264 char:38
+ ... ver =([xml](invoke-webrequest -uri https://storage.googleapis.com/nvi ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
You cannot call a method on a null-valued expression.
At C:\ProgramData\ParsecLoader\GPUUpdaterTool.ps1:265 char:9
+         $googlestoragedriver.split('/')[2].split('_')[0]
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
oloflarsson commented 1 year ago

I did some digging and it seems that this is the line triggering the error:

$googlestoragedriver =([xml](invoke-webrequest -uri https://storage.googleapis.com/nvidia-drivers-us-public).content).listbucketresult.contents.key  -like  "*GRID1*server2016*.exe" | select -Last 1

Maybe they removed the possibility to list this google storage bucket? Opening the url https://storage.googleapis.com/nvidia-drivers-us-public manually in the browser indicates that's the case.

Looking here provides some insight: https://cloud.google.com/compute/docs/gpus/grid-drivers-table#windows_drivers

It seems that this is the latest version with server2016 support: https://storage.googleapis.com/nvidia-drivers-us-public/GRID/vGPU14.1/512.78_grid_win10_win11_server2016_server2019_server2022_64bit_international.exe

So we could just hardcode to that url? It would be the result of -like "*GRID1*server2016*.exe" | select -Last 1 anyways, am I right?

But at the same time it seems sad to hardcode like that. If the user is on a more recent version like server2019 they could benefit from more recent drivers?