terraform-provider-oci icon indicating copy to clipboard operation
terraform-provider-oci copied to clipboard

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

Open SteveDevOps opened this issue 1 year ago • 2 comments

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" }}

SteveDevOps avatar Oct 21 '24 15:10 SteveDevOps

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.

tf-oci-pub avatar Oct 21 '24 17:10 tf-oci-pub

affected_resources = oci_database_db_system

SteveDevOps avatar Oct 21 '24 21:10 SteveDevOps

@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"
  }
}

mikealbert avatar Nov 20 '24 13:11 mikealbert

Anyone know a workaround? This is critical for us. We have the same issue with oci_database_pluggable_database

affected_resources = oci_database_pluggable_database

patrijua avatar Dec 18 '24 07:12 patrijua

@patrijua Please add a thumbs up to this issue and issue # 2255.

Thank you!

hal9000jw avatar Dec 18 '24 17:12 hal9000jw

For everyone's knowledge, I have determined that the following commands can be used to rectify the situation.

terraform apply -refresh-only -target="oci_database_pluggable_database.<resource_name>"

terraform untaint oci_database_pluggable_database.<resource_name>

hal9000jw avatar Dec 18 '24 19:12 hal9000jw