If last Error Response is nil, then calling failure function will cause
segmentation fault error
Fixes #1115
Signed-off-by: Oshank Kumar <okumar@redhat.com>
The client timeout is now configurable at the restclient layer and also
in the CLI. The client timeout defaults to 30 seconds in both restclient
and CLI.
Timeout can be configured in:
* restclient using SetTimeout() API.
* CLI using --timeout command line flag.
This client timeout is the overall timeout which includes the time taken
from setting up TCP connection till client finishes reading the response
body from glusterd2.
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Need some work on handling different error codes and add detailed
messages to users. With this patch, GlusterCLI handles Glusterd down
or not reachable error.
Signed-off-by: Aravinda VK <avishwan@redhat.com>