Skip to content

Commit

Permalink
DOSE-863 zpool status shows object store error (openzfs#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
manoj-joseph authored Dec 20, 2021
1 parent d186dc4 commit f6e017c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/libzutil/zutil_zoa.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,16 @@ zoa_connect_agent(libpc_handle_t *hdl, zoa_socket_t zoa_sock)
break;
}

if (errno == ECONNREFUSED && retries < ZOA_MAX_RETRIES) {
/*
* If the object agent is running or has run in the past, the
* zoa socket file should be present. If this file is missing,
* it indicates that either the agent has never run or the
* superuser removed the file. Fail silently in this case.
*/
if (errno == ENOENT) {
close(sock);
return (-1);
} else if (errno == ECONNREFUSED && retries < ZOA_MAX_RETRIES) {
zutil_error(hdl, EZFS_CONNECT_RETRY,
dgettext(TEXT_DOMAIN,
"failed to connect to object agent process:"));
Expand Down

0 comments on commit f6e017c

Please sign in to comment.