[pve-devel] [PATCH librados2-perl] Add a hint to why a mon command may have timed out

Alwin Antreich a.antreich at proxmox.com
Thu Apr 11 10:53:49 CEST 2019


With this patch a timed out mon command returns a more descriptive
message, as to just a 'got timeout', when the MON could not be reached.

Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
---
Note: this is after some more thought and discussion, of my previously send
ceph status check. Just extending the error message here, gives us the benefit
of having the hint anywhere the mon command is used. Instead only on the ceph
status call.
https://pve.proxmox.com/pipermail/pve-devel/2019-April/036564.html

 PVE/RADOS.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/RADOS.pm b/PVE/RADOS.pm
index 11af8a6..9c29489 100644
--- a/PVE/RADOS.pm
+++ b/PVE/RADOS.pm
@@ -109,7 +109,7 @@ my $sendcmd = sub {
     eval { PVE::Tools::run_with_timeout($self->{timeout}, $code); };
     if (my $err = $@) {
 	&$kill_worker($self);
-	die $err;
+	die "service/network not available: $err";
     }
     if ($restag eq 'E') {
 	die $raw if $raw;
-- 
2.11.0





More information about the pve-devel mailing list