clvmd: supress ENOENT error on testing connection
PATCH v2 1/1 clvmd: supress ENOENT error on testing connection
In HA cluster, we have "clvm" resource agent to manage clvmd daemon. The agent invokes clvmd like: "clvmd -T90 -d0", which always prints a scaring error message:
"""
local socket: connect failed: No such file or directory """
When specifed with "-d" option, clvmd tries to check if an instance of the clvmd daemon is already running through a testing connection. The connect() will fail with this ENOENT error in such case, so supress the error message in such case.
--- daemons/clvmd/clvmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
daemons/clvmd/clvmd.c +2 -1
@@ -2170,7 +2170,8 @@ static int check_local_clvmd(void)if (connect (local_socket,(struct sockaddr *) &sockaddr,sizeof (sockaddr))) { -log_sys_error ("connect" ,"local socket" ); +if (errno !=ENOENT ) +log_sys_error ("connect" ,"local socket" ); ret =-1 ; }
Signature · 1 line
2.10.2
PATCH v2 1/1 clvmd: supress ENOENT error on testing connection
Hi Zdenek,
Please take another look at this simple fix. Is this good for merging?
Thanks,
Eric
Quoted 32 lines · Eric Ren
In HA cluster, we have "clvm" resource agent to manage clvmd daemon. The agent invokes clvmd like: "clvmd -T90 -d0", which always prints a scaring error message:
"""
local socket: connect failed: No such file or directory """When specifed with "-d" option, clvmd tries to check if an instance of the clvmd daemon is already running through a testing connection. The
connect()will fail with this ENOENT error in such case, so supress the error message in such case.Signed-off-by Eric Ren <[email protected]>--- daemons/clvmd/clvmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)daemons/clvmd/clvmd.c +2
-1@@ -2170,7 +2170,8 @@ static int check_local_clvmd(void)if (connect (local_socket,(struct sockaddr *) &sockaddr,sizeof (sockaddr))) { -log_sys_error ("connect" ,"local socket" ); +if (errno !=ENOENT ) +log_sys_error ("connect" ,"local socket" ); ret =-1 ; }