ceph / ceph/ceph-iscsi

gwcli can hang due to hang of rbd-target-api

Open
#131 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
68
Forks
58
PR merge metrics
No merged PRs in 30d

Description

I've seen rbd-target-api go into an uninterruptible sleep (a state very difficult to debug).
Starting gwcli in this circumstance leads it to completely hang on doing
```
api = APIRequest(endpoint + "/config")
api.get()
```
The hang in gwcli at least is avoidable. My quick fix for that was to add these lines to gwcli/utils.py APIRequest.__init__():
```
if 'verify' not in self.kwargs:
self.kwargs['verify'] = settings.config.api_ssl_verify
##### added this: #####
if 'timeout' not in self.kwargs:
self.kwargs['timeout'] = 20
```
(Though the error handling would also best be improved so that a timeout leads to an appropriate message rather than an "unknown error".)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in gwcli/utils.py at APIRequest.__init__(), then trace the api.get() call for the /config endpoint. Add the requested timeout behavior and improve timeout reporting so a hung rbd-target-api produces an appropriate message; verify the CLI no longer waits indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.