You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Rajesh Battala <ra...@citrix.com> on 2013/06/27 14:39:21 UTC

Re: Review Request 11992: CLOUDSTACK-2571 ZWPS issues with Enabling/Clearing the Maintenance State of the Storage

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11992/
-----------------------------------------------------------

(Updated June 27, 2013, 12:39 p.m.)


Review request for cloudstack, Alex Huang, edison su, Ram Ganesh, and Sateesh Chodapuneedi.


Changes
-------

Modified the code in StoragePoolAutomationImpl

As one ZWPS is attached to only one type of Hypervisor, no need to collect all the hosts of different hypervisors while putting/cancelling maintenace.


Bugs: CLOUDSTACK-2571


Repository: cloudstack-git


Description
-------

Issue : NPE's are happening when ZWPS is put in maintenance, removed from maintenance.

Fixed:
1. Added ZONE scope storage handling in StorageManagerImpl and StoragePoolAutomationImpl 
2. Modified PrimaryDataStoreDao, listBy method to take poolid to Wrapper class of long instead of primitive. Modified associated DaoImpl.
3. StoragePoolAutomationImpl, when storage is setting to Maintenance mode, handled the case for ZONE wide scope of storage. 
   if the storage is zone wide, get all the hosts(kvm, vmware) in zone and send the ModifyStoragePool command (with false)
4. When users, cancels maintenance mode, the handled the ZONE wide scope of storage pool.
5. Once the Storage is in maintenance, Deletion of the Storage will remove the mount points from all the hosts.

This patch will solve all the issues pertaining to keeping/cancelling the ZONE wide primary storage.


Diffs (updated)
-----

  engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java 99b7b9c 
  engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java 8f7826f 
  server/src/com/cloud/storage/StorageManagerImpl.java b3e8b96 
  server/src/com/cloud/storage/StoragePoolAutomationImpl.java 4001775 

Diff: https://reviews.apache.org/r/11992/diff/


Testing
-------

Manual Testing
============= 
1. Enable maintenance mode of Zone wide storage , There were no NPE's happening and successfully kept the storage in maintenance mode. Verified DB status.
2. Cancel maintenance mode of Zone wide storage, There were no NPE's happening and successfully kept the storage in UP state.
3. Enable maintenance mode of zone wide, once successful then Delete the storage, Storage got deleted successfuly. Verify the hosts,  Storage got unmounted and verified the DB status.
Addition Tests (As the common code path is modified):
1. Add the Cluster scope of primary storage (kvm , xenserver). Adding the storage in both clusters is successful.
kvm specific:
============
2. Enable Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in maintenance state. 
3. Cancel the Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in UP state.
4. Enable Maintenance Mode of cluster scope kvm storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.

Xenserver specific:
===================
5. Enable Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in maintenance state. 
6. Cancel the Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in UP state.
7. Enable Maintenance Mode of cluster scope Xenserver storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.

ZWPS is supported in KVM and VMware, the common code is modified. It should work of VMWare as well without any issues


Thanks,

Rajesh Battala


Re: Review Request 11992: CLOUDSTACK-2571 ZWPS issues with Enabling/Clearing the Maintenance State of the Storage

Posted by Rajesh Battala <ra...@citrix.com>.

> On June 27, 2013, 6:05 p.m., edison su wrote:
> > server/src/com/cloud/storage/StoragePoolAutomationImpl.java, line 355
> > <https://reviews.apache.org/r/11992/diff/2/?file=312675#file312675line355>
> >
> >     What am trying to say is to move the following codee to storagepoolautomationimpl:
> >     
> >     List<StoragePoolVO> spes = _storagePoolDao.listBy(primaryStorage.getDataCenterId(), primaryStorage.getPodId(), primaryStorage.getClusterId(),
> >                     ScopeType.CLUSTER);
> >             for (StoragePoolVO sp : spes) {
> >                 if (sp.getStatus() == StoragePoolStatus.PrepareForMaintenance) {
> >                     throw new CloudRuntimeException("Only one storage pool in a cluster can be in PrepareForMaintenance mode, " + sp.getId()
> >                             + " is already in  PrepareForMaintenance mode ");
> >                 }
> >             }
> >     
> >
> 
> Rajesh Battala wrote:
>     moved the code to StoreagePoolAutomationImpl in the latest patch

Thank Edison for the review. I had incorporated the suggestions provided in the latest uploaded patch


- Rajesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11992/#review22473
-----------------------------------------------------------


On June 28, 2013, 9:18 a.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11992/
> -----------------------------------------------------------
> 
> (Updated June 28, 2013, 9:18 a.m.)
> 
> 
> Review request for cloudstack, Alex Huang, edison su, Ram Ganesh, and Sateesh Chodapuneedi.
> 
> 
> Bugs: CLOUDSTACK-2571
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Issue : NPE's are happening when ZWPS is put in maintenance, removed from maintenance.
> 
> Fixed:
> 1. Added ZONE scope storage handling in StorageManagerImpl and StoragePoolAutomationImpl 
> 2. Modified PrimaryDataStoreDao, listBy method to take poolid to Wrapper class of long instead of primitive. Modified associated DaoImpl.
> 3. StoragePoolAutomationImpl, when storage is setting to Maintenance mode, handled the case for ZONE wide scope of storage. 
>    if the storage is zone wide, get all the hosts(kvm, vmware) in zone and send the ModifyStoragePool command (with false)
> 4. When users, cancels maintenance mode, the handled the ZONE wide scope of storage pool.
> 5. Once the Storage is in maintenance, Deletion of the Storage will remove the mount points from all the hosts.
> 
> This patch will solve all the issues pertaining to keeping/cancelling the ZONE wide primary storage.
> 
> 
> Diffs
> -----
> 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java 99b7b9c 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java 8f7826f 
>   server/src/com/cloud/storage/StorageManagerImpl.java b3e8b96 
>   server/src/com/cloud/storage/StoragePoolAutomationImpl.java 4001775 
> 
> Diff: https://reviews.apache.org/r/11992/diff/
> 
> 
> Testing
> -------
> 
> Manual Testing
> ============= 
> 1. Enable maintenance mode of Zone wide storage , There were no NPE's happening and successfully kept the storage in maintenance mode. Verified DB status.
> 2. Cancel maintenance mode of Zone wide storage, There were no NPE's happening and successfully kept the storage in UP state.
> 3. Enable maintenance mode of zone wide, once successful then Delete the storage, Storage got deleted successfuly. Verify the hosts,  Storage got unmounted and verified the DB status.
> Addition Tests (As the common code path is modified):
> 1. Add the Cluster scope of primary storage (kvm , xenserver). Adding the storage in both clusters is successful.
> kvm specific:
> ============
> 2. Enable Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in maintenance state. 
> 3. Cancel the Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in UP state.
> 4. Enable Maintenance Mode of cluster scope kvm storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> Xenserver specific:
> ===================
> 5. Enable Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in maintenance state. 
> 6. Cancel the Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in UP state.
> 7. Enable Maintenance Mode of cluster scope Xenserver storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> ZWPS is supported in KVM and VMware, the common code is modified. It should work of VMWare as well without any issues
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Re: Review Request 11992: CLOUDSTACK-2571 ZWPS issues with Enabling/Clearing the Maintenance State of the Storage

Posted by Rajesh Battala <ra...@citrix.com>.

> On June 27, 2013, 6:05 p.m., edison su wrote:
> > server/src/com/cloud/storage/StoragePoolAutomationImpl.java, line 355
> > <https://reviews.apache.org/r/11992/diff/2/?file=312675#file312675line355>
> >
> >     What am trying to say is to move the following codee to storagepoolautomationimpl:
> >     
> >     List<StoragePoolVO> spes = _storagePoolDao.listBy(primaryStorage.getDataCenterId(), primaryStorage.getPodId(), primaryStorage.getClusterId(),
> >                     ScopeType.CLUSTER);
> >             for (StoragePoolVO sp : spes) {
> >                 if (sp.getStatus() == StoragePoolStatus.PrepareForMaintenance) {
> >                     throw new CloudRuntimeException("Only one storage pool in a cluster can be in PrepareForMaintenance mode, " + sp.getId()
> >                             + " is already in  PrepareForMaintenance mode ");
> >                 }
> >             }
> >     
> >

moved the code to StoreagePoolAutomationImpl in the latest patch


- Rajesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11992/#review22473
-----------------------------------------------------------


On June 27, 2013, 12:39 p.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11992/
> -----------------------------------------------------------
> 
> (Updated June 27, 2013, 12:39 p.m.)
> 
> 
> Review request for cloudstack, Alex Huang, edison su, Ram Ganesh, and Sateesh Chodapuneedi.
> 
> 
> Bugs: CLOUDSTACK-2571
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Issue : NPE's are happening when ZWPS is put in maintenance, removed from maintenance.
> 
> Fixed:
> 1. Added ZONE scope storage handling in StorageManagerImpl and StoragePoolAutomationImpl 
> 2. Modified PrimaryDataStoreDao, listBy method to take poolid to Wrapper class of long instead of primitive. Modified associated DaoImpl.
> 3. StoragePoolAutomationImpl, when storage is setting to Maintenance mode, handled the case for ZONE wide scope of storage. 
>    if the storage is zone wide, get all the hosts(kvm, vmware) in zone and send the ModifyStoragePool command (with false)
> 4. When users, cancels maintenance mode, the handled the ZONE wide scope of storage pool.
> 5. Once the Storage is in maintenance, Deletion of the Storage will remove the mount points from all the hosts.
> 
> This patch will solve all the issues pertaining to keeping/cancelling the ZONE wide primary storage.
> 
> 
> Diffs
> -----
> 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java 99b7b9c 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java 8f7826f 
>   server/src/com/cloud/storage/StorageManagerImpl.java b3e8b96 
>   server/src/com/cloud/storage/StoragePoolAutomationImpl.java 4001775 
> 
> Diff: https://reviews.apache.org/r/11992/diff/
> 
> 
> Testing
> -------
> 
> Manual Testing
> ============= 
> 1. Enable maintenance mode of Zone wide storage , There were no NPE's happening and successfully kept the storage in maintenance mode. Verified DB status.
> 2. Cancel maintenance mode of Zone wide storage, There were no NPE's happening and successfully kept the storage in UP state.
> 3. Enable maintenance mode of zone wide, once successful then Delete the storage, Storage got deleted successfuly. Verify the hosts,  Storage got unmounted and verified the DB status.
> Addition Tests (As the common code path is modified):
> 1. Add the Cluster scope of primary storage (kvm , xenserver). Adding the storage in both clusters is successful.
> kvm specific:
> ============
> 2. Enable Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in maintenance state. 
> 3. Cancel the Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in UP state.
> 4. Enable Maintenance Mode of cluster scope kvm storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> Xenserver specific:
> ===================
> 5. Enable Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in maintenance state. 
> 6. Cancel the Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in UP state.
> 7. Enable Maintenance Mode of cluster scope Xenserver storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> ZWPS is supported in KVM and VMware, the common code is modified. It should work of VMWare as well without any issues
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Re: Review Request 11992: CLOUDSTACK-2571 ZWPS issues with Enabling/Clearing the Maintenance State of the Storage

Posted by edison su <ed...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11992/#review22473
-----------------------------------------------------------



server/src/com/cloud/storage/StoragePoolAutomationImpl.java
<https://reviews.apache.org/r/11992/#comment46021>

    What am trying to say is to move the following codee to storagepoolautomationimpl:
    
    List<StoragePoolVO> spes = _storagePoolDao.listBy(primaryStorage.getDataCenterId(), primaryStorage.getPodId(), primaryStorage.getClusterId(),
                    ScopeType.CLUSTER);
            for (StoragePoolVO sp : spes) {
                if (sp.getStatus() == StoragePoolStatus.PrepareForMaintenance) {
                    throw new CloudRuntimeException("Only one storage pool in a cluster can be in PrepareForMaintenance mode, " + sp.getId()
                            + " is already in  PrepareForMaintenance mode ");
                }
            }
    
    


- edison su


On June 27, 2013, 12:39 p.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11992/
> -----------------------------------------------------------
> 
> (Updated June 27, 2013, 12:39 p.m.)
> 
> 
> Review request for cloudstack, Alex Huang, edison su, Ram Ganesh, and Sateesh Chodapuneedi.
> 
> 
> Bugs: CLOUDSTACK-2571
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Issue : NPE's are happening when ZWPS is put in maintenance, removed from maintenance.
> 
> Fixed:
> 1. Added ZONE scope storage handling in StorageManagerImpl and StoragePoolAutomationImpl 
> 2. Modified PrimaryDataStoreDao, listBy method to take poolid to Wrapper class of long instead of primitive. Modified associated DaoImpl.
> 3. StoragePoolAutomationImpl, when storage is setting to Maintenance mode, handled the case for ZONE wide scope of storage. 
>    if the storage is zone wide, get all the hosts(kvm, vmware) in zone and send the ModifyStoragePool command (with false)
> 4. When users, cancels maintenance mode, the handled the ZONE wide scope of storage pool.
> 5. Once the Storage is in maintenance, Deletion of the Storage will remove the mount points from all the hosts.
> 
> This patch will solve all the issues pertaining to keeping/cancelling the ZONE wide primary storage.
> 
> 
> Diffs
> -----
> 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java 99b7b9c 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java 8f7826f 
>   server/src/com/cloud/storage/StorageManagerImpl.java b3e8b96 
>   server/src/com/cloud/storage/StoragePoolAutomationImpl.java 4001775 
> 
> Diff: https://reviews.apache.org/r/11992/diff/
> 
> 
> Testing
> -------
> 
> Manual Testing
> ============= 
> 1. Enable maintenance mode of Zone wide storage , There were no NPE's happening and successfully kept the storage in maintenance mode. Verified DB status.
> 2. Cancel maintenance mode of Zone wide storage, There were no NPE's happening and successfully kept the storage in UP state.
> 3. Enable maintenance mode of zone wide, once successful then Delete the storage, Storage got deleted successfuly. Verify the hosts,  Storage got unmounted and verified the DB status.
> Addition Tests (As the common code path is modified):
> 1. Add the Cluster scope of primary storage (kvm , xenserver). Adding the storage in both clusters is successful.
> kvm specific:
> ============
> 2. Enable Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in maintenance state. 
> 3. Cancel the Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in UP state.
> 4. Enable Maintenance Mode of cluster scope kvm storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> Xenserver specific:
> ===================
> 5. Enable Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in maintenance state. 
> 6. Cancel the Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in UP state.
> 7. Enable Maintenance Mode of cluster scope Xenserver storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> ZWPS is supported in KVM and VMware, the common code is modified. It should work of VMWare as well without any issues
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Re: Review Request 11992: CLOUDSTACK-2571 ZWPS issues with Enabling/Clearing the Maintenance State of the Storage

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11992/#review22680
-----------------------------------------------------------


Commit 2bc4cbf9fb20ff770ea672815886e2c6d9cb8276 in branch refs/heads/master from Rajesh Battala
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=2bc4cbf ]

CLOUDSTACK-2571 Zone Wide Primary Storage blocker issues while Enabling in Maintenance State

Signed-off-by: Edison Su <su...@gmail.com>


- ASF Subversion and Git Services


On June 28, 2013, 9:18 a.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11992/
> -----------------------------------------------------------
> 
> (Updated June 28, 2013, 9:18 a.m.)
> 
> 
> Review request for cloudstack, Alex Huang, edison su, Ram Ganesh, and Sateesh Chodapuneedi.
> 
> 
> Bugs: CLOUDSTACK-2571
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Issue : NPE's are happening when ZWPS is put in maintenance, removed from maintenance.
> 
> Fixed:
> 1. Added ZONE scope storage handling in StorageManagerImpl and StoragePoolAutomationImpl 
> 2. Modified PrimaryDataStoreDao, listBy method to take poolid to Wrapper class of long instead of primitive. Modified associated DaoImpl.
> 3. StoragePoolAutomationImpl, when storage is setting to Maintenance mode, handled the case for ZONE wide scope of storage. 
>    if the storage is zone wide, get all the hosts(kvm, vmware) in zone and send the ModifyStoragePool command (with false)
> 4. When users, cancels maintenance mode, the handled the ZONE wide scope of storage pool.
> 5. Once the Storage is in maintenance, Deletion of the Storage will remove the mount points from all the hosts.
> 
> This patch will solve all the issues pertaining to keeping/cancelling the ZONE wide primary storage.
> 
> 
> Diffs
> -----
> 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java 99b7b9c 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java 8f7826f 
>   server/src/com/cloud/storage/StorageManagerImpl.java b3e8b96 
>   server/src/com/cloud/storage/StoragePoolAutomationImpl.java 4001775 
> 
> Diff: https://reviews.apache.org/r/11992/diff/
> 
> 
> Testing
> -------
> 
> Manual Testing
> ============= 
> 1. Enable maintenance mode of Zone wide storage , There were no NPE's happening and successfully kept the storage in maintenance mode. Verified DB status.
> 2. Cancel maintenance mode of Zone wide storage, There were no NPE's happening and successfully kept the storage in UP state.
> 3. Enable maintenance mode of zone wide, once successful then Delete the storage, Storage got deleted successfuly. Verify the hosts,  Storage got unmounted and verified the DB status.
> Addition Tests (As the common code path is modified):
> 1. Add the Cluster scope of primary storage (kvm , xenserver). Adding the storage in both clusters is successful.
> kvm specific:
> ============
> 2. Enable Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in maintenance state. 
> 3. Cancel the Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in UP state.
> 4. Enable Maintenance Mode of cluster scope kvm storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> Xenserver specific:
> ===================
> 5. Enable Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in maintenance state. 
> 6. Cancel the Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in UP state.
> 7. Enable Maintenance Mode of cluster scope Xenserver storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> ZWPS is supported in KVM and VMware, the common code is modified. It should work of VMWare as well without any issues
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Re: Review Request 11992: CLOUDSTACK-2571 ZWPS issues with Enabling/Clearing the Maintenance State of the Storage

Posted by Rajesh Battala <ra...@citrix.com>.

> On July 1, 2013, 5:18 p.m., edison su wrote:
> > Ship It!

Thanks Edison for the review and pushing to repo.


- Rajesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11992/#review22613
-----------------------------------------------------------


On June 28, 2013, 9:18 a.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11992/
> -----------------------------------------------------------
> 
> (Updated June 28, 2013, 9:18 a.m.)
> 
> 
> Review request for cloudstack, Alex Huang, edison su, Ram Ganesh, and Sateesh Chodapuneedi.
> 
> 
> Bugs: CLOUDSTACK-2571
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Issue : NPE's are happening when ZWPS is put in maintenance, removed from maintenance.
> 
> Fixed:
> 1. Added ZONE scope storage handling in StorageManagerImpl and StoragePoolAutomationImpl 
> 2. Modified PrimaryDataStoreDao, listBy method to take poolid to Wrapper class of long instead of primitive. Modified associated DaoImpl.
> 3. StoragePoolAutomationImpl, when storage is setting to Maintenance mode, handled the case for ZONE wide scope of storage. 
>    if the storage is zone wide, get all the hosts(kvm, vmware) in zone and send the ModifyStoragePool command (with false)
> 4. When users, cancels maintenance mode, the handled the ZONE wide scope of storage pool.
> 5. Once the Storage is in maintenance, Deletion of the Storage will remove the mount points from all the hosts.
> 
> This patch will solve all the issues pertaining to keeping/cancelling the ZONE wide primary storage.
> 
> 
> Diffs
> -----
> 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java 99b7b9c 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java 8f7826f 
>   server/src/com/cloud/storage/StorageManagerImpl.java b3e8b96 
>   server/src/com/cloud/storage/StoragePoolAutomationImpl.java 4001775 
> 
> Diff: https://reviews.apache.org/r/11992/diff/
> 
> 
> Testing
> -------
> 
> Manual Testing
> ============= 
> 1. Enable maintenance mode of Zone wide storage , There were no NPE's happening and successfully kept the storage in maintenance mode. Verified DB status.
> 2. Cancel maintenance mode of Zone wide storage, There were no NPE's happening and successfully kept the storage in UP state.
> 3. Enable maintenance mode of zone wide, once successful then Delete the storage, Storage got deleted successfuly. Verify the hosts,  Storage got unmounted and verified the DB status.
> Addition Tests (As the common code path is modified):
> 1. Add the Cluster scope of primary storage (kvm , xenserver). Adding the storage in both clusters is successful.
> kvm specific:
> ============
> 2. Enable Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in maintenance state. 
> 3. Cancel the Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in UP state.
> 4. Enable Maintenance Mode of cluster scope kvm storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> Xenserver specific:
> ===================
> 5. Enable Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in maintenance state. 
> 6. Cancel the Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in UP state.
> 7. Enable Maintenance Mode of cluster scope Xenserver storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> ZWPS is supported in KVM and VMware, the common code is modified. It should work of VMWare as well without any issues
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Re: Review Request 11992: CLOUDSTACK-2571 ZWPS issues with Enabling/Clearing the Maintenance State of the Storage

Posted by edison su <ed...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11992/#review22613
-----------------------------------------------------------

Ship it!


Ship It!

- edison su


On June 28, 2013, 9:18 a.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11992/
> -----------------------------------------------------------
> 
> (Updated June 28, 2013, 9:18 a.m.)
> 
> 
> Review request for cloudstack, Alex Huang, edison su, Ram Ganesh, and Sateesh Chodapuneedi.
> 
> 
> Bugs: CLOUDSTACK-2571
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Issue : NPE's are happening when ZWPS is put in maintenance, removed from maintenance.
> 
> Fixed:
> 1. Added ZONE scope storage handling in StorageManagerImpl and StoragePoolAutomationImpl 
> 2. Modified PrimaryDataStoreDao, listBy method to take poolid to Wrapper class of long instead of primitive. Modified associated DaoImpl.
> 3. StoragePoolAutomationImpl, when storage is setting to Maintenance mode, handled the case for ZONE wide scope of storage. 
>    if the storage is zone wide, get all the hosts(kvm, vmware) in zone and send the ModifyStoragePool command (with false)
> 4. When users, cancels maintenance mode, the handled the ZONE wide scope of storage pool.
> 5. Once the Storage is in maintenance, Deletion of the Storage will remove the mount points from all the hosts.
> 
> This patch will solve all the issues pertaining to keeping/cancelling the ZONE wide primary storage.
> 
> 
> Diffs
> -----
> 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java 99b7b9c 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java 8f7826f 
>   server/src/com/cloud/storage/StorageManagerImpl.java b3e8b96 
>   server/src/com/cloud/storage/StoragePoolAutomationImpl.java 4001775 
> 
> Diff: https://reviews.apache.org/r/11992/diff/
> 
> 
> Testing
> -------
> 
> Manual Testing
> ============= 
> 1. Enable maintenance mode of Zone wide storage , There were no NPE's happening and successfully kept the storage in maintenance mode. Verified DB status.
> 2. Cancel maintenance mode of Zone wide storage, There were no NPE's happening and successfully kept the storage in UP state.
> 3. Enable maintenance mode of zone wide, once successful then Delete the storage, Storage got deleted successfuly. Verify the hosts,  Storage got unmounted and verified the DB status.
> Addition Tests (As the common code path is modified):
> 1. Add the Cluster scope of primary storage (kvm , xenserver). Adding the storage in both clusters is successful.
> kvm specific:
> ============
> 2. Enable Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in maintenance state. 
> 3. Cancel the Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in UP state.
> 4. Enable Maintenance Mode of cluster scope kvm storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> Xenserver specific:
> ===================
> 5. Enable Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in maintenance state. 
> 6. Cancel the Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in UP state.
> 7. Enable Maintenance Mode of cluster scope Xenserver storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> ZWPS is supported in KVM and VMware, the common code is modified. It should work of VMWare as well without any issues
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Re: Review Request 11992: CLOUDSTACK-2571 ZWPS issues with Enabling/Clearing the Maintenance State of the Storage

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11992/#review22612
-----------------------------------------------------------


Commit 160b493285f6c72e1e93509dfd470c4bd7da7945 in branch refs/heads/4.2 from Rajesh Battala
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=160b493 ]

CLOUDSTACK-2571 Zone Wide Primary Storage blocker issues while Enabling in Maintenance State

Signed-off-by: Edison Su <su...@gmail.com>


- ASF Subversion and Git Services


On June 28, 2013, 9:18 a.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11992/
> -----------------------------------------------------------
> 
> (Updated June 28, 2013, 9:18 a.m.)
> 
> 
> Review request for cloudstack, Alex Huang, edison su, Ram Ganesh, and Sateesh Chodapuneedi.
> 
> 
> Bugs: CLOUDSTACK-2571
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Issue : NPE's are happening when ZWPS is put in maintenance, removed from maintenance.
> 
> Fixed:
> 1. Added ZONE scope storage handling in StorageManagerImpl and StoragePoolAutomationImpl 
> 2. Modified PrimaryDataStoreDao, listBy method to take poolid to Wrapper class of long instead of primitive. Modified associated DaoImpl.
> 3. StoragePoolAutomationImpl, when storage is setting to Maintenance mode, handled the case for ZONE wide scope of storage. 
>    if the storage is zone wide, get all the hosts(kvm, vmware) in zone and send the ModifyStoragePool command (with false)
> 4. When users, cancels maintenance mode, the handled the ZONE wide scope of storage pool.
> 5. Once the Storage is in maintenance, Deletion of the Storage will remove the mount points from all the hosts.
> 
> This patch will solve all the issues pertaining to keeping/cancelling the ZONE wide primary storage.
> 
> 
> Diffs
> -----
> 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java 99b7b9c 
>   engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java 8f7826f 
>   server/src/com/cloud/storage/StorageManagerImpl.java b3e8b96 
>   server/src/com/cloud/storage/StoragePoolAutomationImpl.java 4001775 
> 
> Diff: https://reviews.apache.org/r/11992/diff/
> 
> 
> Testing
> -------
> 
> Manual Testing
> ============= 
> 1. Enable maintenance mode of Zone wide storage , There were no NPE's happening and successfully kept the storage in maintenance mode. Verified DB status.
> 2. Cancel maintenance mode of Zone wide storage, There were no NPE's happening and successfully kept the storage in UP state.
> 3. Enable maintenance mode of zone wide, once successful then Delete the storage, Storage got deleted successfuly. Verify the hosts,  Storage got unmounted and verified the DB status.
> Addition Tests (As the common code path is modified):
> 1. Add the Cluster scope of primary storage (kvm , xenserver). Adding the storage in both clusters is successful.
> kvm specific:
> ============
> 2. Enable Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in maintenance state. 
> 3. Cancel the Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in UP state.
> 4. Enable Maintenance Mode of cluster scope kvm storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> Xenserver specific:
> ===================
> 5. Enable Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in maintenance state. 
> 6. Cancel the Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in UP state.
> 7. Enable Maintenance Mode of cluster scope Xenserver storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.
> 
> ZWPS is supported in KVM and VMware, the common code is modified. It should work of VMWare as well without any issues
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Re: Review Request 11992: CLOUDSTACK-2571 ZWPS issues with Enabling/Clearing the Maintenance State of the Storage

Posted by Rajesh Battala <ra...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11992/
-----------------------------------------------------------

(Updated June 28, 2013, 9:18 a.m.)


Review request for cloudstack, Alex Huang, edison su, Ram Ganesh, and Sateesh Chodapuneedi.


Changes
-------

incorporated review comments.
This patch will resolve only issues with "Enable Maintenance" of ZWPS.
Regarding issues with cancelling maintenance, I had created one more review request.


Bugs: CLOUDSTACK-2571


Repository: cloudstack-git


Description
-------

Issue : NPE's are happening when ZWPS is put in maintenance, removed from maintenance.

Fixed:
1. Added ZONE scope storage handling in StorageManagerImpl and StoragePoolAutomationImpl 
2. Modified PrimaryDataStoreDao, listBy method to take poolid to Wrapper class of long instead of primitive. Modified associated DaoImpl.
3. StoragePoolAutomationImpl, when storage is setting to Maintenance mode, handled the case for ZONE wide scope of storage. 
   if the storage is zone wide, get all the hosts(kvm, vmware) in zone and send the ModifyStoragePool command (with false)
4. When users, cancels maintenance mode, the handled the ZONE wide scope of storage pool.
5. Once the Storage is in maintenance, Deletion of the Storage will remove the mount points from all the hosts.

This patch will solve all the issues pertaining to keeping/cancelling the ZONE wide primary storage.


Diffs (updated)
-----

  engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java 99b7b9c 
  engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java 8f7826f 
  server/src/com/cloud/storage/StorageManagerImpl.java b3e8b96 
  server/src/com/cloud/storage/StoragePoolAutomationImpl.java 4001775 

Diff: https://reviews.apache.org/r/11992/diff/


Testing
-------

Manual Testing
============= 
1. Enable maintenance mode of Zone wide storage , There were no NPE's happening and successfully kept the storage in maintenance mode. Verified DB status.
2. Cancel maintenance mode of Zone wide storage, There were no NPE's happening and successfully kept the storage in UP state.
3. Enable maintenance mode of zone wide, once successful then Delete the storage, Storage got deleted successfuly. Verify the hosts,  Storage got unmounted and verified the DB status.
Addition Tests (As the common code path is modified):
1. Add the Cluster scope of primary storage (kvm , xenserver). Adding the storage in both clusters is successful.
kvm specific:
============
2. Enable Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in maintenance state. 
3. Cancel the Maintenance Mode of cluster scope kvm storage. Successfully enabled the storage in UP state.
4. Enable Maintenance Mode of cluster scope kvm storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.

Xenserver specific:
===================
5. Enable Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in maintenance state. 
6. Cancel the Maintenance Mode of cluster scope Xenserver storage. Successfully enabled the storage in UP state.
7. Enable Maintenance Mode of cluster scope Xenserver storage. Delete the storage. Storage got successfully deleted, unmounted from hosts and from db.

ZWPS is supported in KVM and VMware, the common code is modified. It should work of VMWare as well without any issues


Thanks,

Rajesh Battala