cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtutkow...@apache.org
Subject git commit: updated refs/heads/master to 0846bfe
Date Tue, 21 Jan 2014 06:11:26 GMT
Updated Branches:
  refs/heads/master e88cc488e -> 0846bfe1f


CLOUDSTACK-5873: [Automation] Failed to attach volume to VM, if the vm is created with option
startvm=false


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0846bfe1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0846bfe1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0846bfe1

Branch: refs/heads/master
Commit: 0846bfe1ff7bd269acb250374af5b601343e7334
Parents: e88cc48
Author: Mike Tutkowski <mike.tutkowski@solidfire.com>
Authored: Sun Jan 19 09:03:17 2014 -0700
Committer: Mike Tutkowski <mike.tutkowski@solidfire.com>
Committed: Mon Jan 20 23:10:54 2014 -0700

----------------------------------------------------------------------
 .../datastore/driver/SolidfirePrimaryDataStoreDriver.java     | 7 +++++++
 server/src/com/cloud/storage/VolumeApiServiceImpl.java        | 7 ++-----
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0846bfe1/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java
b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java
index 7d305e0..014413d 100644
--- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java
+++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java
@@ -219,6 +219,12 @@ public class SolidfirePrimaryDataStoreDriver implements PrimaryDataStoreDriver
{
 
     @Override
     public ChapInfo getChapInfo(VolumeInfo volumeInfo) {
+        return null;
+    }
+
+    /*
+    @Override
+    public ChapInfo getChapInfo(VolumeInfo volumeInfo) {
         long accountId = volumeInfo.getAccountId();
 
         AccountDetailVO accountDetail = _accountDetailsDao.findDetail(accountId, SolidFireUtil.CHAP_INITIATOR_USERNAME);
@@ -239,6 +245,7 @@ public class SolidfirePrimaryDataStoreDriver implements PrimaryDataStoreDriver
{
 
         return new ChapInfoImpl(chapInitiatorUsername, chapInitiatorSecret, chapTargetUsername,
chapTargetSecret);
     }
+    */
 
     // get the VAG associated with volumeInfo's cluster, if any (ListVolumeAccessGroups)
     // if the VAG exists

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0846bfe1/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index fb35e23..a79d8b4 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -2017,13 +2017,10 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
         // volumeToAttachStoragePool should be null if the VM we are attaching the disk to
has never been started before
         DataStore dataStore = volumeToAttachStoragePool != null ? dataStoreMgr.getDataStore(volumeToAttachStoragePool.getId(),
DataStoreRole.Primary) : null;
 
-        boolean queryForChap = true;
-
         // if we don't have a host, the VM we are attaching the disk to has never been started
before
         if (host != null) {
             try {
-                // if connectVolumeToHost returns true, then we do not want to use CHAP because
the volume is already connected to the host(s)
-                queryForChap = !volService.connectVolumeToHost(volFactory.getVolume(volumeToAttach.getId()),
host, dataStore);
+                volService.connectVolumeToHost(volFactory.getVolume(volumeToAttach.getId()),
host, dataStore);
             }
             catch (Exception e) {
                 volService.disconnectVolumeFromHost(volFactory.getVolume(volumeToAttach.getId()),
host, dataStore);
@@ -2046,7 +2043,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
 
             AttachCommand cmd = new AttachCommand(disk, vm.getInstanceName());
 
-            ChapInfo chapInfo = queryForChap ? volService.getChapInfo(volFactory.getVolume(volumeToAttach.getId()),
dataStore) : null;
+            ChapInfo chapInfo = volService.getChapInfo(volFactory.getVolume(volumeToAttach.getId()),
dataStore);
 
             Map<String, String> details = new HashMap<String, String>();
 


Mime
View raw message