sureshanaparti commented on code in PR #8947:
URL: https://github.com/apache/cloudstack/pull/8947#discussion_r1579394028


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java:
##########
@@ -654,20 +654,54 @@ public KVMStoragePool createStoragePool(String name, 
String host, int port, Stri
             } catch (LibvirtException e) {
                 s_logger.error("Failure in attempting to see if an existing 
storage pool might be using the path of the pool to be created:" + e);
             }
+        }
+
+        List<String> nfsopts = null;
+        if (type == StoragePoolType.NetworkFilesystem) {
+            if (details != null && details.containsKey("nfsopts")) {
+                nfsopts = 
Arrays.asList(details.get("nfsopts").replaceAll("\\s", "").split(","));
+            }
+
+            if (sp != null && nfsopts != null) {
+                try {
+                    LibvirtStoragePoolDef poolDef = getStoragePoolDef(conn, 
sp);
+                    Map poolNfsOptsMap = poolDef.getNfsOpts();
+                    boolean optionsDiffer = false;
+                    if (poolNfsOptsMap.size() != nfsopts.size()) {
+                        optionsDiffer = true;
+                    } else {
+                        for (String nfsopt : nfsopts) {
+                            if (!poolNfsOptsMap.containsKey(nfsopt)) {

Review Comment:
   Ok, I'm assuming` key=vers` & `value=4.1`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to