Azure Account errors after upgrade to 2018.7.8

After upgrading, we saw widespread failures for all deployments to targets that use Azure Accounts (tied to a Service Principal). Good news is that we are back up & running properly after downgrading back to 2018.7.7

This was taking place for Azure Cloud Services (classic), Azure Functions, Azure App services (Web Apps & Web Jobs).

An example of the error we got was: The azureserviceprincipal-gov-elc-dev-agcy-xxxxx account does not belong to this environment and this project cannot be deployed. Either add the account to the environment or resolve a different account.

Also, we have a step that creates/updates the target with New-OctopusAzureWebAppTarget, and it got this error:

ELC-DEV-XXXXX-AF-TX-01(Machines-245) is unable to be contacted. Error running AzureWebAppCreateTargetServiceMessageHandler for create-azurewebapptarget: Health check failed: ELC-DEV-PECOS-AF-TX-01(Machines-245) is unable to be contacted.

We suspect it is a scope related error, as we got this on a health check - even when we changed the scope of the account to include ALL environments:

The azureserviceprincipal-gov-elc-dev-agcy-???-wg-eng account does not belong to this environment and this project cannot be deployed. Either add the account to the environment or resolve a different account

What is odd about this last items is thhat the “-wg-eng” is NOT part of the azure account name/variable we are using and that shows up only for failures.

Hope this help identify & warn other users of this issue.

Hi Bryce,

Thanks for getting in touch and that is indeed a bug in 2018.7.8. We’ve done some testing and can reproduce it if there are environment restrictions on the account the target is using.

There is a GitHub issue you can track, we have a fix in testing at the moment and will get a patch out as soon as we can.

Apologies for the inconvenience caused.

Regards
Shannon

We have same problem

We’ve just released a fix for this in 2018.7.10, please let us know if you have any further issues.

Works great, Thanks