oracle / oracle/oci-cli

VCN delete reports connection timeout but operation actually succeeds in the background

Open
#1,112 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
669
Forks
236
Avg merge
1m
Merged PRs (30d)
4

Description

Description

oci network vcn delete intermittently returns a RequestException: The connection to endpoint timed out error, but the actual delete operation succeeds in the background. Naive retries then succeed immediately with "already deleted" rather than failing. This makes the timeout error misleading — it reports a failure when the operation actually completed.

Steps to Reproduce

  1. Create a VCN with no attached gateways.
  2. Delete the VCN:
oci network vcn delete --vcn-id $VCN_ID --force
  1. Observe intermittent timeout errors:
RequestException: The connection to endpoint timed out.
  1. Retry the same command:
oci network vcn delete --vcn-id $VCN_ID --force
# Succeeds immediately (resource already deleted)

Expected Behaviour

The CLI should distinguish between:

  1. Request timed out (the operation may have succeeded) — suggest the user verify state before retrying.
  2. Operation failed (the API returned an error) — the delete did not happen.

A clear message like:

Request timed out. The delete operation may have completed in the background.
Verify with: oci network vcn get --vcn-id $VCN_ID

Actual Behaviour

The error message The connection to endpoint timed out is identical to a real failure, leading users to:

  1. Retry naively (which succeeds immediately, wasting time on unnecessary retries).
  2. Or worse, assume the delete failed and take incorrect remediation steps.

Impact

During a large infrastructure teardown session, we saw this timeout repeatedly on vcn delete commands. Each time, the delete actually succeeded but we had to verify manually, adding unnecessary friction to the workflow.

Suggested Fix

  1. Distinguish "request timed out" from "operation failed" in the error output.
  2. When a timeout occurs on a delete/update operation, include guidance to verify state before retrying: "The request timed out. The operation may have completed. Verify with 'oci <resource> get' before retrying."
  3. Consider implementing a short post-timeout verification check (e.g., poll the resource state once after timeout) to give a definitive answer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the timeout handling exercised by oci network vcn delete --vcn-id $VCN_ID --force, and compare request-timeout errors with failures returned by the API. Done means timeout output explains that the operation may have completed and tells users to verify with the resource's get command before retrying, without changing the meaning of genuine operation failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.