[libvirt PATCH 1/3] rpc: fix dispatch for node device APIs for virt drivers

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

 



Despite their names, the following APIs:

    virNodeDeviceDettach
    virNodeDeviceDetachFlags
    virNodeDeviceReAttach
    virNodeDeviceReset

are all handled by the virt drivers, not the node device driver.
A bug in the RPC generator meant that these APIs were sent to
the nodedev driver for handling. This caused breakage with the
split daemons, since nothing was available to process them.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/rpc/gendispatch.pl | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index 987a136566..c140ed712c 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -171,7 +171,13 @@ sub get_conn_method {
     if ($proc =~ /Connect.*Network/) {
         return "remoteGetNetworkConn";
     }
-    if ($proc =~ /Node.*Device/) {
+    # Carefully whitelist a few APIs with NodeDevice name
+    # prefix which actually get handled by the virt drivers
+    if ($proc =~ /Node.*Device/ &&
+        !($proc =~ /NodeDeviceReset/ ||
+          $proc =~ /NodeDeviceReAttach/ ||
+          $proc =~ /NodeDeviceDettach/ ||
+          $proc =~ /NodeDeviceDetachFlags/)) {
         return "remoteGetNodeDevConn";
     }
     if ($proc =~ /Connect.*NWFilter/) {
-- 
2.24.1





[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]

  Powered by Linux