----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12510/#review23089 -----------------------------------------------------------
1) Replace hasDedicatedResources == false with !hasDedicatedResources and else if (hasDedicatedResources == true) { with else if (hasDedicatedResources) { 2) Add "rollbackState=true" to this statement: for (DedicatedResourceVO dr : dedicatedResources){ if (!_dedicatedDao.remove(dr.getId())) { s_logger.warn("Fail to release dedicated resources for domain " + domain.getId()); <insert here> return false; } } - Alena Prokharchyk On July 12, 2013, 2:01 p.m., Saksham Srivastava wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/12510/ > ----------------------------------------------------------- > > (Updated July 12, 2013, 2:01 p.m.) > > > Review request for cloudstack, Alena Prokharchyk and Devdeep Singh. > > > Bugs: 3476 > > > Repository: cloudstack-git > > > Description > ------- > > In case the release dedicate resource fails, deletion of domain should not > happen. > Whenever deleting a domain all the resources dedicated to it must be released > of dedication and moved to shared pool. > Currently even if release API fails the deleteDomain API is executed > successfully. > > Further if there are dedicated resources to a domiain and cleanup is not > true, resources should not be released. > Added checks to prohibit this behaviour. > > > Diffs > ----- > > server/src/com/cloud/user/DomainManagerImpl.java aad5787 > > Diff: https://reviews.apache.org/r/12510/diff/ > > > Testing > ------- > > If domain has dedicated resources, cleanup=true will release dedication and > delete the domain. > cleanup=false will not release dedication and will not delete the domain. > > > Thanks, > > Saksham Srivastava > >