Could not find Azure WebSite (the resource group name is empty)

cloud
(Yasir Ahmed) #1

G’day!

We are having a strange “Could not find Azure Website” issue with a deploy an “Azure App template” process step. When we investigated the issue by going through source code, we noticed it is not able to retrieve the resource group name belong to the app.

The Octopus source code, as accessible by the following link, that is used to retrieve the list of web apps retrieves a list of Site objects (https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.websites.models.site?view=azure-dotnet) that does not have resource group field populated.

You may find some helpful information below:

  • Octopus Server Version: 2018.7.14
  • Raw Task Log (Partial):

10:35:27 Verbose | Looking up site pshcm-idp-octopustest-sandbox in resourceGroup PeopleStreme-Hcm-Tenant-octopustest-sandbox
10:36:14 Verbose | Found sites:
10:36:14 Verbose | / ps-scorm-prd
10:36:14 Verbose | / pshcm-api-prd
10:36:14 Verbose | / pshcm-idp-prd
10:36:14 Error | Could not find Azure WebSite ‘pshcm-idp-octopustest-sandbox’ in resource group ‘PeopleStreme-Hcm-Tenant-octopustest-sandbox’ and subscription ‘54e78d6a-dd8b-4c0f-9dd4-9885fe0f56b7’
10:36:14 Verbose | / pshcm-api-cefc-sandbox
10:36:14 Verbose | / pshcm-idp-cefc-sandbox
10:36:14 Verbose | / ps-scorm-cefc-sandbox
10:36:14 Verbose | / pshcm-idp-westfund
10:36:14 Verbose | / pshcm-api-westfund
10:36:14 Verbose | / ps-scorm-westfund
10:36:14 Verbose | / pshcm-idp-octopustest-sandbox
10:36:14 Error | Running rollback conventions…
10:36:14 Error | Could not find Azure WebSite ‘pshcm-idp-octopustest-sandbox’ in resource group ‘PeopleStreme-Hcm-Tenant-octopustest-sandbox’ and subscription ‘54e78d6a-dd8b-4c0f-9dd4-9885fe0f56b7’

Feel free to inform if you have any query or require further information.

(Yasir Ahmed) #2

Would like to share an update that the issue was found with the new versions of the Octopus that we updated to from 2018.2.1 and the older version seems working fine.

We tried removing resource group name from the template step and we started having exactly the same issue as discussed in the thread, as per link below:

(Mark Siedle) #4

Hi Yasir,

Thanks for getting in touch.

Unfortunately when we switched to the new Azure libraries, the call you mentioned there webSiteClient.WebApps.List() is a bit flakey and some customers have reported that the resource groups do not come back in that call (the same error you’ve experienced).

We’ve created a GitHub issue here that you can track to be notified when a fix is available.

So far we’ve been unable to reproduce this, but we’re going to investigate retry-logic to try and make this more robust. If this fails to return resource groups every time, we’ll have to raise an issue with Azure and see if this is something they can help with.

Sorry for the bad news.

Cheers
Mark

(Yasir Ahmed) #5

Hi Mark,

Thanks for your email and confirming the issue.

In this case, we would prefer staying on the older version until the fix is released.

Cheers,

Yasir.

(Pb) #7

I have this issue too.
Is there any news regarding a solution?
What is the latest version without this problem?

(Frank Nyamusamba) #8

may you please point me to the correct version where this is fixed. i have the same problem