Re: [libvirt] [PATCH 5/6] allow non-zero success values from a domain's MigratePerform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




In the case of old server and new client, the client should get a RPC
error when trying to re-serialize the reply, because the data packet
it will be getting back from the server will be too small (ie missing
the new field this patch adds).

The RPC protocol should be considered ABI, and no existing methods
ever changed, only new methods can be added so NACK to this patch

I had actually prepared this patch too, but after my testing I wasn't sure if it was necessary. Would it be fine to add it to the respin?

Paolo
commit 916b512b4b6dfeb1bb2929514c26e8595f22a1da
Author: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date:   Fri Oct 2 01:02:01 2009 +0200

    hack to handle backwards compatibility

diff --git a/src/remote_internal.c b/src/remote_internal.c
index 7db59d1..e9fea0e 100644
--- a/src/remote_internal.c
+++ b/src/remote_internal.c
@@ -2534,6 +2534,15 @@ done:
     return rv;
 }
 
+
+static bool_t
+xdr_remote_domain_migrate_perform_ret_optional (XDR *xdrs, remote_domain_migrate_perform_ret *objp)
+{
+    if (!xdr_remote_domain_migrate_perform_ret (xdrs, objp))
+	objp->code = 0;
+    return TRUE;
+}
+
 static int
 remoteDomainMigratePerform (virDomainPtr domain,
                             const char *cookie,
@@ -2561,7 +2570,7 @@ remoteDomainMigratePerform (virDomainPtr domain,
     memset (&ret, 0, sizeof (ret));
     if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_PERFORM,
               (xdrproc_t) xdr_remote_domain_migrate_perform_args, (char *) &args,
-              (xdrproc_t) xdr_remote_domain_migrate_perform_ret, (char *) &ret) == -1)
+              (xdrproc_t) xdr_remote_domain_migrate_perform_ret_optional, (char *) &ret) == -1)
         goto done;
 
     rv = ret.code;
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]