Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find Web space when creating app service plan #667

Closed
lstolyarov opened this issue Jun 25, 2017 · 11 comments
Closed

Cannot find Web space when creating app service plan #667

lstolyarov opened this issue Jun 25, 2017 · 11 comments
Assignees

Comments

@lstolyarov
Copy link

Hello,

I am trying to create an app service plan using the go sdk. The request is:

PUT /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-212/providers/Microsoft.Web/serverfarms/acctestAppServicePlan-test?api-version=2016-09-01 HTTP/1.1
Host: management.azure.com
User-Agent: HashiCorp-Terraform-v0.9.8
Content-Length: 91
Content-Type: application/json
Accept-Encoding: gzip

{
	"location": "westeurope",
	"properties": {},
	"sku": {
		"name": "S0",
		"tier": "Standard",
		"size": "S0"
	}
}

gets the following response:

HTTP/1.1 404 Not Found
Content-Length: 667
...

{
	"Code": "NotFound",
	"Message": "Cannot find Web space acctestRG-212-WestEuropewebspace for subscription 00000000-0000-0000-0000-000000000000.",
	"Target": null,
	"Details": [{
		"Message": "Cannot find Web space acctestRG-212-WestEuropewebspace for subscription 00000000-0000-0000-0000-000000000000."
	}, {
		"Code": "NotFound"
	}, {
		"ErrorEntity": {
			"ExtendedCode": "03005",
			"MessageTemplate": "Cannot find Web space {0} for subscription {1}.",
			"Parameters": ["acctestRG-212-WestEuropewebspace", "00000000-0000-0000-0000-000000000000"],
			"Code": "NotFound",
			"Message": "Cannot find Web space acctestRG-212-WestEuropewebspace for subscription 00000000-0000-0000-0000-000000000000."
		}
	}],
	"Innererror": null
}

I am using the v10.0.2-beta version of the sdk.

@marstr
Copy link
Member

marstr commented Jun 26, 2017

Howdy @lstolyarov,

We're happy to take a look, but are going to need a bunch more information to get started on this. First: It looks like you're using the Azure SDK for Go via HashiCorp's Terraform. Do you have any existing open issues in their repository with more context on what you're experiencing? Second: Have you stripped out your subscription ID for the sake of anonymity? If not, you may look into that first, it looks like your client is being initialized with an empty UUID. Third: Is this a broader problem, where you always receive 404s when you try to create an App Service Plan, or is it scoped down?

Sorry that I have so many follow up questions! Just trying to play detective.

-Martin

@lstolyarov
Copy link
Author

Hi @marstr,

Sure!

To give you more context, I am writing a terraform provider to provision some azure resources. This issue relates specifically to the App Service Plan. You can see the App Service Plan pull request here (hashicorp/terraform-provider-azurerm#1).

The subscription is stripped out for anonymity.

I am not quite sure what you mean by a scoped down problem. I see this error always when calling the CreateOrUpdate method of the AppServicePlansClient.

Hope this helps.

Thanks,
Leo

@marstr
Copy link
Member

marstr commented Jun 26, 2017

Thanks! This definitely helps get the ball rolling. We'll get this triaged at our next team meeting.

@marstr
Copy link
Member

marstr commented Jun 29, 2017

Hey @mcardosos! @salameer and I just finished triaging this. Mind making this the first bug you look at today?

@lstolyarov
Copy link
Author

Hi @marstr,

Do you know if there is an update on this issue?

After doing a bit more investigation it seems to be a problem with app service plan of size S0 only. Other app service plans, (S1, S2) are being provisioned ok.

There is, however, another issue. After the service plan has been created, I am not able to delete it for around the next 5 minutes. The ProvisioningState returns 'Succeeded' and the error I get is

{
  "Code": "Conflict",
  "Message": "Cannot modify this web hosting plan because another operation is in progress. Details: Id: 096c1fa1-b248-4e67-98c5-f0e018b1b261, OperationName: Create, CreatedTime: 7/18/2017 5:42:06 PM, RequestId: 09e22889-8fb2-40f0-8446-2739e820f135, EntityType: 9",
  "Target": null,
  "Details": [
    {
      "Message": "Cannot modify this web hosting plan because another operation is in progress. Details: Id: 096c1fa1-b248-4e67-98c5-f0e018b1b261, OperationName: Create, CreatedTime: 7/18/2017 5:42:06 PM, RequestId: 09e22889-8fb2-40f0-8446-2739e820f135, EntityType: 9"
    },
    {
      "Code": "Conflict"
    },
    {
      "ErrorEntity": {
        "ExtendedCode": "59205",
        "MessageTemplate": "Cannot modify this web hosting plan because another operation is in progress. Details: {0}",
        "Parameters": [
          "Id: 096c1fa1-b248-4e67-98c5-f0e018b1b261, OperationName: Create, CreatedTime: 7/18/2017 5:42:06 PM, RequestId: 09e22889-8fb2-40f0-8446-2739e820f135, EntityType: 9"
        ],
        "Code": "Conflict",
        "Message": "Cannot modify this web hosting plan because another operation is in progress. Details: Id: 096c1fa1-b248-4e67-98c5-f0e018b1b261, OperationName: Create, CreatedTime: 7/18/2017 5:42:06 PM, RequestId: 09e22889-8fb2-40f0-8446-2739e820f135, EntityType: 9"
      }
    }
  ],
  "Innererror": null
}

Are you able to help with this?

Thanks,
Leo

@marstr
Copy link
Member

marstr commented Jul 19, 2017

Hey @lstolyarov, sorry that this fell off the table while I was away on vacation. I'm going to pick up this bug personally and make sure it gets handled. I'm building a repro now to make sure that this issue isn't something to do with your environment. I'll report back shortly.

In terms of the timing error, I suspect there's not much I can do about that directly. However, I'll pass it on to the right people even if I can't fix it.

@marstr marstr assigned marstr and unassigned mcardosos Jul 19, 2017
@georgeedwards
Copy link

@marstr I am just getting up to speed (having seen the links from the terraform issues), any news?

@marstr
Copy link
Member

marstr commented Aug 8, 2017

Howdy @georgeedwards and @istolyarov, sorry for the delay. Digging a little bit into the Swagger for this service I see that the Tier is just a string. That led me to look for some documenation of what valid tier names would be. So far, this is the best page that I've found: App Service Pricing. On that page, I see a bunch of options including S1 through S3. Are you sure that S0 is a valid tier? If not, it would explain why it can't be provisioned. Feel free to tell me I'm crazy and there's something I'm missing.

@georgeedwards
Copy link

@marstr Thanks for looking at this! That certainly looks to get the case (I thought in my head that S0 was a valid tier, but it certainly doesn't seem to appear in any documentation - possibly discontinued?).

Anyway, I believe the biggest issue blocking the Terraform PR is the issue about deleting the resource after the ProvisioningState has returned.

@marstr
Copy link
Member

marstr commented Aug 9, 2017

I spent some real time this morning diving into this, and validated that the Swagger is correctly deeming this a long running operation(LRO), and that we generate the expected code: appserviceplan.go#L53@0b09de

Digging into the PR from above it looks like you're using our SDK correctly. I also see that there is another MSFT contact looking into this from the service side. For now, I'm going to close this issue and reach out to @echuvyrov internally to understand more about what has been done for this problem internally. If there is anything that can be updated to help in our SDK, I'll be happy to spin up a new issue to track that work.

@marstr marstr closed this as completed Aug 9, 2017
@Anmolgan81
Copy link

Can I change the webspace if I want to change the app service plan to another app service

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants