question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG]Resource Processor error running porter install when creating Base Workspace

See original GitHub issue

Fresh TRE deploy from commit a23b19ca4300183e2ffa5664e5da4240ac17c00b

Describe the bug After deploying TRE, and publishing and registering the included base workspace bundle, attempting to create a workspace from the base bundle fails. The API says the deployment failed, and returns this error:

e51bc50c-7b3f-453a-bcec-30a3266982e8: Error context message = Error: could not save the pending action's status, the bundle was not executed:could not read storage schema document:Failed to login with Azure CLI:Error parsing Token Expiration Date \"\":Error parsing expiration date \"\".  

CloudShell Error: parsing time \"\" as \"2006-01-02T15:04:05Z07:00\": cannot parse \"\" as \"2006\"

CLI Error: parsing time \"\" as \"2006-01-02 15:04:05.999999\": cannot parse \"\" as \"2006\"

azureconfig.Config{EnvConnectionString:\"\", StorageAccount:\"treprotostorage\", StorageAccountResourceGroup:\"it-treproto-tst-rg\", StorageAccountSubscriptionId:\"\", EnvAzurePrefix:\"\", Vault:\"\"}

az login --identity -u df...94
&& az acr login --name treprotoacr
&& porter install \"e51bc50c-7b3f-453a-bcec-30a3266982e8\"  --reference treprotoacr.azurecr.io/tre-workspace-base:v0.1.5
	--param address_space=\"10.1.4.0/24\" --param arm_use_msi=\"true\" --param azure_location=\"canadacentral\" --param id=\"e51bc50c-7b3f-453a-bcec-30a3266982e8\"
	--param tfstate_container_name=\"tfstate\" --param tfstate_resource_group_name=\"it-treproto-tst-rg\" --param tfstate_storage_account_name=\"treprotostorage\"
	--param tre_id=\"treproto\" --cred ./vmss_porter/azure.json --allow-docker-host-access --force 
&& porter show e51bc50c-7b3f-453a-bcec-30a3266982e8"

I have run the commands listed in the error individually from the resource processor container, and it is the porter install that yields this error.

For what it’s worth, here’s the JSON used to register the bundle:

{
  "name": "tre-workspace-base",
  "description": "A base Azure TRE workspace",
  "version": "0.1.5",
  "porterVersion": "v0.38.7",
  "parameters": [
    {
      "name": "address_space",
      "type": "string",
      "default": null,
      "applyTo": "All Actions",
      "description": "VNet address space for the workspace services",
      "required": true
    },
    {
      "name": "arm_use_msi",
      "type": "string",
      "default": false,
      "applyTo": "All Actions",
      "description": "",
      "required": false
    },
    {
      "name": "azure_location",
      "type": "string",
      "default": null,
      "applyTo": "All Actions",
      "description": "Azure location (region) to deploy to",
      "required": true
    },
    {
      "name": "id",
      "type": "string",
      "default": null,
      "applyTo": "All Actions",
      "description": "the resource ID for this installation",
      "required": true
    },
    {
      "name": "tfstate_container_name",
      "type": "string",
      "default": "tfstate",
      "applyTo": "All Actions",
      "description": "The name of the Terraform state storage container",
      "required": false
    },
    {
      "name": "tfstate_resource_group_name",
      "type": "string",
      "default": null,
      "applyTo": "All Actions",
      "description": "Resource group containing the Terraform state storage account",
      "required": true
    },
    {
      "name": "tfstate_storage_account_name",
      "type": "string",
      "default": null,
      "applyTo": "All Actions",
      "description": "The name of the Terraform state storage account",
      "required": true
    },
    {
      "name": "tre_id",
      "type": "string",
      "default": null,
      "applyTo": "All Actions",
      "description": "The ID of the parent TRE instance e.g., mytre-dev-3142",
      "required": true
    }
  ],
  "credentials": [
    {
      "name": "azure_client_id",
      "description": "",
      "required": true,
      "applyTo": "All Actions"
    },
    {
      "name": "azure_client_secret",
      "description": "",
      "required": true,
      "applyTo": "All Actions"
    },
    {
      "name": "azure_subscription_id",
      "description": "",
      "required": true,
      "applyTo": "All Actions"
    },
    {
      "name": "azure_tenant_id",
      "description": "",
      "required": true,
      "applyTo": "All Actions"
    }
  ],
  "json_schema": {
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://github.com/microsoft/AzureTRE/templates/workspaces/base/template_schema.json",
    "type": "object",
    "title": "Base Workspace",
    "description": "This workspace template is the foundation for TRE workspaces and workspace services.",
    "required": [],
    "properties": {}
  },
  "resourceType": "workspace",
  "current": "true"
}

Steps to reproduce Follow the “installing-base-workspace” guide in the docs: https://github.com/microsoft/AzureTRE/blob/main/docs/tre-admins/setup-instructions/installing-base-workspace.md

To reproduce in the resource processor container, connect via Bastion to the Resource Processor VMSS instance, exec into the container, and run the commands the error states individually. Note that you’ll need to fudge an environment variable in the container as runner.py does (ln 303) when using MSI auth: export ARM_CLIENT_SECRET=""

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
squillacecommented, Nov 5, 2021

The issue is in the azure cli: https://github.com/Azure/azure-cli/issues/20211#issuecomment-961579500. There is already a PR to fix it: https://github.com/Azure/azure-cli/pull/20219. I would pin, as you’ve suggested, until the CLI fix rolls in.

1reaction
AidenQueensUcommented, Nov 4, 2021

Confirmed working with the CLI downgrade 👍 Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

`az account get-access-token` returns `expiresOn` as `null` for ...
[BUG]Resource Processor error running porter install when creating Base Workspace microsoft/AzureTRE#1067. e51bc50c-7b3f-453a-bcec-30a3266982e8: ...
Read more >
Azure Access Token Expiration - Vela Cloud
Then run the following commands to set an access token lifetime: Sign in to ... 2021 [BUG]Resource Processor error running porter install when...
Read more >
Untitled
Then run the following commands to set an access token lifetime: Sign in to ... 2021 [BUG]Resource Processor error running porter install when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found