without setting a timeout for wsman api. it will hang when idrac has issue with the connection

Bug #1738639 reported by Bonnie Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-dracclient
New
Undecided
Unassigned

Bug Description

When i use the api: is_idrac_ready() of class DRACClient to get the idrac status before i do some config or submit a config job. And encounter one issue: the api call just hang for very long and i need to manually killed the process sometimes. i don't know what happened to the dell device.
When i read the code, and found the actual wsman invoke will finally call python requests api to send the request to idrac without setting the timeout as following:

                resp = requests.post(
                    self.endpoint,
                    auth=requests.auth.HTTPBasicAuth(self.username,
                                                     self.password),
                    data=payload,
                    # TODO(ifarkas): enable cert verification
                    verify=False)

And from python requests website, http://docs.python-requests.org/en/master/user/advanced/ .
It claims that we'd better always specify the timeout when use it or it will hang for minutes or even more. So that if dell idrac can't response normally, it's better to pop out an error rather than just hang.

Bonnie Lin (bonnielin)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.