vmware / vmware/pyvmomi

Hit exception from "pyVpx/pyVim/task.py", line 121, in WaitForTask raise http.client.HTTPException: 408 Request Timeout

Open
#923 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I'm triggering host enter maintenance mode API -> waitForTask via pyvmomi, this task would complete in 24 hour in VC since the heavy load, but watiForTask always fail in 8 hours with below exception

xxx/lib/vsphere/task.py", line 24, in waitTask
    WaitForTask(task)
  File "/usr/lib/python3.7/site-packages/pyVpx/pyVim/task.py", line 121, in WaitForTask
    version, state = GetTaskStatus(task, version, pc)
  File "/usr/lib/python3.7/site-packages/pyVpx/pyVim/task.py", line 244, in GetTaskStatus
    update = pc.WaitForUpdates(version)
  File "/usr/lib/python3.7/site-packages/pyVpx/pyVmomi/VmomiSupport.py", line 556, in <lambda>
    self.f(*(self.args + (obj,) + args), **kwargs)
  File "/usr/lib/python3.7/site-packages/pyVpx/pyVmomi/VmomiSupport.py", line 368, in _InvokeMethod
    return self._stub.InvokeMethod(self, info, args)
  File "/usr/lib/python3.7/site-packages/pyVpx/pyVmomi/SoapAdapter.py", line 1484, in InvokeMethod
    raise six.moves.http_client.HTTPException("%d %s" % (resp.status, resp.reason))
http.client.HTTPException: 408 Request Timeout

Could you help provide some insight about this issue and how to fix it? Thanks.

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 pyVpx/pyVim/task.py at WaitForTask and GetTaskStatus, then trace the HTTPException raised by pyVmomi/SoapAdapter.py during pc.WaitForUpdates. Reproduce or characterize the eight-hour timeout for a maintenance-mode task; done would require a confirmed cause and an agreed fix, but the issue does not name a test or implementation target.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.