Skip to content

ConflictError: The extension ID xxx-PaasDiagnostics-Production-Ext-0 is already in use for this deployment #193

Closed
@wangzq

Description

@wangzq

Where "xxx" is the role name. Repro steps:

  1. Create a new cloud service.
  2. Deploy a web role to Production slot or first deploy to Staging then swap.
  3. Enable diagnostics extension using Set-AzureServiceDiagnosticsExtension in Production slot.
  4. Deploy to Staging slot without enabling diagnostics extension.
  5. Swap, notice now the Staging has diagnostics enabled while Production doesn't have it enabled.
  6. Now if I use Set-AzureServiceDiagnosticsExtension to enable it again in Production slot, I will get the error in title.

Analysis so far:
I believe it is because the cmdlet is using following code to generate the extension id, therefore it will generate the same id when I enable the extension for Production slot the second time, since the same id is actually now used by Staging slot, thus the conflict:

public string GetExtensionId(string extensionName, string slot, int index)
{
    return string.Format(ExtensionIdTemplate, PrefixName, extensionName, slot, index);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions