oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
760 stars 683 forks source link

Oracle Database Service - we hit error on polling work request that exists - no identifier found for workId #2227

Open SteveDevOps opened 1 month ago

SteveDevOps commented 1 month ago

affected_resources = oci_database_db_system

When affecting a change for our oci oracle db service with provider 6.14 we hit an error at end of apply that states it finds the workid but no identifier found.. (ocids were xxxx masked but relevant/current)

Error: Work Request error │ Provider version: 6.14.0, released on 2024-10-20. │ Service: Database Db System │ Error Message: work request succeeded but no identifier was found, workId: ocid1.coreservicesworkrequest.oc1.phx.abyhqljrc5xt4ml3mush6ym2nofkgbv6soc73v6ybyht2br2xxxxxxxxx, entity: database, action: UPDATED │ Resource OCID: │ Suggestion: Please retry or contact support for help with service: Database Db System

we can however interrogate the workid ocid manually via oci cli:

oci work-requests work-request get --work-request-id ocid1.coreservicesworkrequest.oc1.phx.abyhqljrc5xt4ml3mush6ym2nofkgbv6soc73v6ybyht2bxxxxxxxx{ "data": { "compartment-id": "ocid1.compartment.oc1..aaaaaaaadnprmg4tptb3d62luenlddn2vfvwyklqjeia3vpkolxxxxxxxxxxx", "id": "ocid1.coreservicesworkrequest.oc1.phx.abyhqljrc5xt4ml3mush6ym2nofkgbv6soc73v6ybyht2br2xxxxxxxxxxxx", "operation-type": "Update DB System", "percent-complete": 100.0, "resources": [ { "action-type": "UPDATED", "entity-type": "dbSystem", "entity-uri": "/20160918/dbSystems/ocid1.dbsystem.oc1.phx.anyhqljrwv37w4aaxrr5mn5pmw76om45nq2v5cvmomhh5hxxxxxxxxxx", "identifier": "ocid1.dbsystem.oc1.phx.anyhqljrwv37w4aaxrr5mn5pmw76om45nq2v5cvmomhh5hbxxxxxxxx" } ], "status": "SUCCEEDED", "time-accepted": "2024-10-21T14:11:23.041000+00:00", "time-finished": "2024-10-21T14:12:05.795000+00:00", "time-started": "2024-10-21T14:11:29.398000+00:00" }}

tf-oci-pub commented 1 month ago

Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format. Example: affected_resources = oci_core_instance , oci_core_instances

If it's not related to any particular resource then mention affected resource as terraform. Example: affected_resources = terraform

As this works through automation, request you to follow exact syntax.

SteveDevOps commented 1 month ago

affected_resources = oci_database_db_system

mikealbert commented 5 days ago

@SteveDevOps Did you ever find a workaround for this? I think I'm running into the same issue in our OCI environment. Apply fails with an error like this:

│ Provider version: 5.47.0, released on 2024-06-19. This provider is 22 Update(s) behind to current.
│ Service: Database Db System
│ Error Message: work request succeeded but no identifier was found, workId: ocid1.coreservicesworkrequest.oc1.us-chicago-1.abxxeljr6mqaedxwh6pekqltuha3tvixmuqk23yncstbbjxfigbritlsihka, entity: database, action: UPDATED
│ Resource OCID:
│ Suggestion: Please retry or contact support for help with service: Database Db System

But the same work request shows a status of SUCCEEDED.

mike@DPS-AlbertMMac ~  $ oci work-requests work-request get --work-request-id ocid1.coreservicesworkrequest.oc1.us-chicago-1.abxxeljr6mqaedxwh6pekqltuha3tvixmuqk23yncstbbjxfigbritlsihka --region us-chicago-1
{
  "data": {
    "compartment-id": "REMOVED",
    "id": "ocid1.coreservicesworkrequest.oc1.us-chicago-1.abxxeljr6mqaedxwh6pekqltuha3tvixmuqk23yncstbbjxfigbritlsihka",
    "operation-type": "Update DB System",
    "percent-complete": 100.0,
    "resources": [
      {
        "action-type": "UPDATED",
        "entity-type": "dbSystem",
        "entity-uri": "REMOVED",
        "identifier": "REMOVED"
      }
    ],
    "status": "SUCCEEDED",
    "time-accepted": "2024-11-20T13:18:45.850000+00:00",
    "time-finished": "2024-11-20T13:20:52.605000+00:00",
    "time-started": "2024-11-20T13:19:37.487000+00:00"
  }
}