[pve-devel] [PATCH cluster v2] ipcc_send_rec*: include msgid in error

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jul 25 13:45:07 CEST 2017


else we often may have no idea which request failed at all...

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---

Changes v1 -> v2:
* include msgid also in ipcc_send_rec_json

 data/PVE/Cluster.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm
index 8990656..38c5fdb 100644
--- a/data/PVE/Cluster.pm
+++ b/data/PVE/Cluster.pm
@@ -381,7 +381,7 @@ my $ipcc_send_rec = sub {
 
     my $res = PVE::IPCC::ipcc_send_rec($msgid, $data);
 
-    die "ipcc_send_rec failed: $!\n" if !defined($res) && ($! != 0);
+    die "ipcc_send_rec[$msgid] failed: $!\n" if !defined($res) && ($! != 0);
 
     return $res;
 };
@@ -391,7 +391,7 @@ my $ipcc_send_rec_json = sub {
 
     my $res = PVE::IPCC::ipcc_send_rec($msgid, $data);
 
-    die "ipcc_send_rec failed: $!\n" if !defined($res) && ($! != 0);
+    die "ipcc_send_rec[$msgid] failed: $!\n" if !defined($res) && ($! != 0);
 
     return decode_json($res);
 };
-- 
2.11.0





More information about the pve-devel mailing list