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

[Time Series Insights] environment update: An operation is already in progress on the environment #9265

Closed
jiasli opened this issue Apr 29, 2020 · 4 comments
Assignees
Labels
Service Attention Workflow: This issue is responsible by Azure service team. TimeseriesInsights

Comments

@jiasli
Copy link
Member

jiasli commented Apr 29, 2020

Originally posted at #8758 (comment)

The first environment update operation succeeds with 200, without any indication this is a Long Running Operation. Note that "provisioningState": "Succeeded",

az timeseriesinsights environment longterm update --resource-group rg1 --name "env2" --data-retention 12 --debug

msrest.http_logger : Request URL: 'https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/rg1/providers/Microsoft.TimeSeriesInsights/environments/env2?api-version=2018-08-15-preview'
msrest.http_logger : Request method: 'PATCH'
msrest.http_logger : Request headers:
msrest.http_logger :     'Accept': 'application/json'
msrest.http_logger :     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger :     'accept-language': 'en-US'
msrest.http_logger :     'Content-Length': '69'
msrest.http_logger :     'User-Agent': 'python/3.8.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 azure-mgmt-timeseriesinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0 (PIP)'
msrest.http_logger : Request body:
msrest.http_logger : {"properties": {"warmStoreConfiguration": {"dataRetention": "P12D"}}}

msrest.http_logger : Response status: 200
msrest.http_logger : Response headers:
msrest.http_logger :     'Cache-Control': 'no-cache'
msrest.http_logger :     'Pragma': 'no-cache'
msrest.http_logger :     'Transfer-Encoding': 'chunked'
msrest.http_logger :     'Content-Type': 'application/json'
msrest.http_logger :     'Content-Encoding': 'gzip'
msrest.http_logger :     'Expires': '-1'
msrest.http_logger :     'Vary': 'Accept-Encoding'
msrest.http_logger :     'x-ms-ratelimit-remaining-subscription-writes': '1196'
msrest.http_logger :     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
msrest.http_logger :     'X-Content-Type-Options': 'nosniff'
msrest.http_logger :     'x-ms-request-id': '6dfebd67-dd7f-4798-87ee-9c35fa2f934f'
msrest.http_logger :     'Server': 'Microsoft-HTTPAPI/2.0'
msrest.http_logger :     'x-ms-correlation-request-id': 'e0d68eec-428d-40de-8849-24746a395303'
msrest.http_logger :     'x-ms-routing-request-id': 'SOUTHEASTASIA:20200423T080138Z:e0d68eec-428d-40de-8849-24746a395303'
msrest.http_logger :     'Date': 'Thu, 23 Apr 2020 08:01:37 GMT'
msrest.http_logger : Response content:
msrest.http_logger : 
{
    "sku": {
        "name": "L1",
        "capacity": 1
    },
    "kind": "LongTerm",
    "location": "WestUs",
    "tags": {},
    "properties": {
        "timeSeriesIdProperties": [
            {
                "name": "['DeviceId1']",
                "type": "String"
            }
        ],
        "storageConfiguration": {
            "accountName": "st0423"
        },
        "warmStoreConfiguration": {
            "dataRetention": "P12D"
        },
        "creationTime": "Thu, 23 Apr 2020 07:31:28 GMT",
        "provisioningState": "Succeeded",
        "requestApiVersion": "2018-08-15-preview",
        "dataAccessId": "7edc94e2-0d50-45ec-87f0-8581f9fdb896",
        "dataAccessFqdn": "7edc94e2-0d50-45ec-87f0-8581f9fdb896.env.timeseries.azure.com"
    },
    "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/rg1/providers/Microsoft.TimeSeriesInsights/environments/env2",
    "name": "env2",
    "type": "Microsoft.TimeSeriesInsights/Environments"
}

Then the following command fails because the previous operation hasn’t finished.

az timeseriesinsights environment longterm update --resource-group rg1 --name "env2" --data-retention 14 --debug

msrest.http_logger : Request URL: 'https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/rg1/providers/Microsoft.TimeSeriesInsights/environments/env2?api-version=2018-08-15-preview'
msrest.http_logger : Request method: 'PATCH'
msrest.http_logger : Response status: 409
msrest.http_logger : Response content:
msrest.http_logger : {"error":{"code":"EnvironmentOperationInProgress","message":"An operation is already in progress on the environment."}}

If the previous update operation hasn't finished, it should show "provisioningState": "Updating".

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 29, 2020
@jiasli jiasli assigned riserrad and unassigned markcowl Apr 29, 2020
@riserrad
Copy link
Contributor

Thanks @jiasli for opening the issue. We're going to look into this.

@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 1, 2020
@akning-ms akning-ms added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. Service Attention Workflow: This issue is responsible by Azure service team. labels May 1, 2020
@ghost
Copy link

ghost commented May 1, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Shipra1Mishra.

@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 1, 2020
@riserrad
Copy link
Contributor

Hi @jiasli ,

We could reproduce the issue and we're working on a fix.

Thank you

@k-rush
Copy link
Contributor

k-rush commented May 20, 2021

Hey @jiasli - I just got off a call with @riserrad and we were unable to repro this issue anymore, We see provisionig state Updating whenever we update the warm store configuration:

az tsi environment gen2 update --resource-group kyrush-devtest --name kyrush-devtest28 --warm-store-config data-retention=P18D
{
  "id": "/subscriptions/d431f80e-0a71-47c9-bb6a-2c0c65ae2afb/resourcegroups/kyrush-devtest/providers/Microsoft.TimeSeriesInsights/environments/kyrush-devtest28",
  "kind": "EnvironmentResource",
  "location": "westus2",
  "name": "kyrush-devtest28",
  "properties": {
    "creationTime": "2021-05-20T22:50:55.1871149Z",
    "dataAccessFqdn": "b38e4feb-ff07-452f-8eeb-1f799a7d19dc.env.crystal-dev.windows-int.net",
    "dataAccessId": "b38e4feb-ff07-452f-8eeb-1f799a7d19dc",
    "provisioningState": "Updating",
    "requestApiVersion": "2020-05-15",
    "storageConfiguration": {
      "accountName": "kyrushdevtest28"
    },
    "timeSeriesIdProperties": [
      {
        "name": "kyrush-devtest",
        "type": "string"
      }
    ],
    "warmStoreConfiguration": {
      "dataRetention": "P18D"
    }
  },
  "resourceGroup": "kyrush-devtest",
  "sku": {
    "capacity": 1,
    "name": "L1"
  },
  "tags": {},
  "type": "Microsoft.TimeSeriesInsights/Environments"
}

Please reopen this issue if it's reproduceable with the current CLI version.

@k-rush k-rush closed this as completed May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Service Attention Workflow: This issue is responsible by Azure service team. TimeseriesInsights
Projects
None yet
Development

No branches or pull requests

5 participants