----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/18352/#review35257 -----------------------------------------------------------
engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java <https://reviews.apache.org/r/18352/#comment65721> If you specify the host then you don't need dc, pod, cluster. engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java <https://reviews.apache.org/r/18352/#comment65722> I would recommend that you use the createSearchBuilder() approach instead of hardcoding the sql query. Refer to PrimaryDataStoreDaoImpl() ctor. engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java <https://reviews.apache.org/r/18352/#comment65723> What is the use case for null host id? Make it long instead of Long. - Koushik Das On Feb. 21, 2014, 11:36 a.m., Saksham Srivastava wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/18352/ > ----------------------------------------------------------- > > (Updated Feb. 21, 2014, 11:36 a.m.) > > > Review request for cloudstack, Koushik Das and Prachi Damle. > > > Bugs: CLOUDSTACK-6151 > https://issues.apache.org/jira/browse/CLOUDSTACK-6151 > > > Repository: cloudstack-git > > > Description > ------- > > Attaching a disk created from local disk offering with tags, to a VM was > going to wrong local storage pool. > Cause : In LocalStoragePoolAlocator- > List<StoragePoolHostVO> hostPools = > _poolHostDao.listByHostId(plan.getHostId()); > It return pools by hostId, but nowhere were the tags being compared. > > Added new method findLocalStoragePoolsByHostAndTags() that returns stoage > pools by hostid and tags both. > > > Diffs > ----- > > > engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java > 59c338e > > engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java > d35aa44 > > engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java > 1f61e8b > > Diff: https://reviews.apache.org/r/18352/diff/ > > > Testing > ------- > > Tested the folowing scenarios: > attaching local volume with tags > attaching local volume without tags > attaching local volume with different tags > attaching shared volume > > Build passes successfully. > > > Thanks, > > Saksham Srivastava > >