Tal Nisan has uploaded a new change for review.

Change subject: core: Mount options not sent when adding POSIX domain
......................................................................

core: Mount options not sent when adding POSIX domain

When adding a new domain to an existing data center, the mount options
were not sent

Change-Id: Ibc0986be3ce03dfed0129be7c40183735c4fff70
Bug-Url: https://bugzilla.redhat.com/927262
Signed-off-by: Tal Nisan <tni...@redhat.com>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
1 file changed, 9 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/00/13900/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
index b5989ff..db17d19 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
@@ -8,6 +8,7 @@
 import org.ovirt.engine.core.common.AuditLogType;
 import org.ovirt.engine.core.common.businessentities.StorageDomain;
 import org.ovirt.engine.core.common.businessentities.StorageServerConnections;
+import org.ovirt.engine.core.common.businessentities.StorageType;
 import org.ovirt.engine.core.common.businessentities.storage_pool;
 import org.ovirt.engine.core.common.config.Config;
 import org.ovirt.engine.core.common.config.ConfigValues;
@@ -79,14 +80,18 @@
         con.put("user", connection.getuser_name(), "");
         con.put("password", connection.getpassword(), "");
 
-        // storage_pool can be null when discovering iscsi send targets or 
when connecting
-        // through vds which has no storage pool
-        if (storage_pool == null || Config.<Boolean> 
GetValue(ConfigValues.AdvancedNFSOptionsEnabled,
-                storage_pool.getcompatibility_version().getValue())) {
+        if (connection.getstorage_type() == StorageType.POSIXFS
+                || connection.getstorage_type() == StorageType.GLUSTERFS) {
             // For mnt_options, vfs_type, and protocol_version - if they are 
null
             // or empty we should not send a key with an empty value
             con.putIfNotEmpty("mnt_options", connection.getMountOptions());
             con.putIfNotEmpty("vfs_type", connection.getVfsType());
+        }
+
+        // storage_pool can be null when discovering iscsi send targets or 
when connecting
+        // through vds which has no storage pool
+        if (storage_pool == null || Config.<Boolean> 
GetValue(ConfigValues.AdvancedNFSOptionsEnabled,
+                storage_pool.getcompatibility_version().getValue())) {
             if (connection.getNfsVersion() != null) {
                 con.put("protocol_version", 
connection.getNfsVersion().getValue());
             }


--
To view, visit http://gerrit.ovirt.org/13900
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc0986be3ce03dfed0129be7c40183735c4fff70
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <tni...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to