vmware / vmware/pyvmomi

Requests are getting stuck during network connection drops

Open
#992 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

I've observed that, specifically in scenarios where there is network instability and traffic cannot be routed for some amount of time, instead of receiving an exception, requests appear to get stuck. On the other hand, when I forcefully shut down a vCSA VM (for instance), I receive a proper exception that can be handled within our code, something along the lines of a ConnectionError.

Reproduction steps
  1. Establish a connection with the vCSA VM using SmartConnect
  2. Call any API in an infinite loop
  3. Intentionally cause a break in the network without actually bringing down either the client or the server
  4. The API call seems to get stuck, and does not resume even once the connection has been restored
Expected behavior

As is occurring with the shut down of the vCSA VM, in this scenario I would expect an exception to be thrown and for the request session to be closed.

Additional context

If this is either a known issue or if there's some kind of exception handling that I'm overlooking, please do let me know.

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 SmartConnect entry point and reproduce the reported API call while interrupting network traffic without stopping either endpoint. Trace the request and session handling during the interruption; done means the call raises a handled connection exception and the request session is closed rather than remaining stuck.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.