Comment 0 for bug 1738639

Revision history for this message
Bonnie Lin (bonnielin) wrote :

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,
                    timeout=60)

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.