rafaelweingartner closed pull request #2390: [CLOUDSTACK-10214] Unable to 
remove local primary storage
URL: https://github.com/apache/cloudstack/pull/2390
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/api/src/main/java/com/cloud/storage/StorageService.java 
b/api/src/main/java/com/cloud/storage/StorageService.java
index e40b1e6e14c..aebbbcd4bd0 100644
--- a/api/src/main/java/com/cloud/storage/StorageService.java
+++ b/api/src/main/java/com/cloud/storage/StorageService.java
@@ -90,23 +90,16 @@
 
     boolean deleteSecondaryStagingStore(DeleteSecondaryStagingStoreCmd cmd);
 
-    ImageStore discoverImageStore(String name, String url, String 
providerName, Long zoneId, Map details) throws IllegalArgumentException, 
DiscoveryException,
-            InvalidParameterValueException;
+    ImageStore discoverImageStore(String name, String url, String 
providerName, Long zoneId, Map details) throws IllegalArgumentException, 
DiscoveryException, InvalidParameterValueException;
 
-
-        /**
+    /**
      * Migrate existing NFS to use object store.
      * @param name object store name.
-     * @param url object store url.
+     * @param url object store URL.
      * @param providerName object store provider Name.
      * @param details object store other details
      * @return Object store created.
-     * @throws IllegalArgumentException
-     * @throws DiscoveryException
-     * @throws InvalidParameterValueException
      */
-    ImageStore migrateToObjectStore(String name, String url, String 
providerName, Map details) throws IllegalArgumentException, DiscoveryException,
-            InvalidParameterValueException;
-
+    ImageStore migrateToObjectStore(String name, String url, String 
providerName, Map<String, String> details) throws DiscoveryException;
 
 }
diff --git a/server/src/main/java/com/cloud/storage/StorageManagerImpl.java 
b/server/src/main/java/com/cloud/storage/StorageManagerImpl.java
index a179f8d65c9..749450c135f 100644
--- a/server/src/main/java/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/main/java/com/cloud/storage/StorageManagerImpl.java
@@ -344,7 +344,6 @@ public boolean share(VMInstanceVO vm, List<VolumeVO> vols, 
HostVO host, boolean
                 return false;
             }
         }
-
         // ok to share
         return true;
     }
@@ -891,11 +890,6 @@ public boolean deletePool(DeletePoolCmd cmd) {
             s_logger.warn("Unable to delete storage id: " + id + " due to it 
is not in Maintenance state");
             throw new InvalidParameterValueException("Unable to delete storage 
due to it is not in Maintenance state, id: " + id);
         }
-        if (sPool.isLocal()) {
-            s_logger.warn("Unable to delete local storage id:" + id);
-            throw new InvalidParameterValueException("Unable to delete local 
storage id: " + id);
-        }
-
         Pair<Long, Long> vlms = _volsDao.getCountAndTotalByPool(id);
         if (forced) {
             if (vlms.first() > 0) {
@@ -1126,7 +1120,6 @@ public void cleanupStorage(boolean recurring) {
                             s_logger.debug("Failed to delete snapshot: " + 
ssSnapshotVO.getId() + " from storage");
                         }
                     }
-
                     cleanupSecondaryStorage(recurring);
 
                     List<VolumeVO> vols = 
_volsDao.listVolumesToBeDestroyed(new Date(System.currentTimeMillis() - 
((long)StorageCleanupDelay.value() << 10)));
@@ -1931,19 +1924,16 @@ public synchronized boolean registerHostListener(String 
providerName, Hypervisor
 
     @Override
     public Answer sendToPool(long poolId, Command cmd) throws 
StorageUnavailableException {
-        // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Answer[] sendToPool(long poolId, Commands cmd) throws 
StorageUnavailableException {
-        // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public String getName() {
-        // TODO Auto-generated method stub
         return null;
     }
 
@@ -2044,7 +2034,7 @@ public ImageStore discoverImageStore(String name, String 
url, String providerNam
     }
 
     @Override
-    public ImageStore migrateToObjectStore(String name, String url, String 
providerName, Map details) throws IllegalArgumentException, DiscoveryException, 
InvalidParameterValueException {
+    public ImageStore migrateToObjectStore(String name, String url, String 
providerName, Map<String, String> details) throws DiscoveryException, 
InvalidParameterValueException {
         // check if current cloud is ready to migrate, we only support cloud 
with only NFS secondary storages
         List<ImageStoreVO> imgStores = _imageStoreDao.listImageStores();
         List<ImageStoreVO> nfsStores = new ArrayList<ImageStoreVO>();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to