----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12326/#review23066 -----------------------------------------------------------
Commit bdc7e4ce337f2f7cba8320808755119a835de07c in branch refs/heads/sdnextensions from Saksham Srivastava [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=bdc7e4c ] CLOUDSTACK-3094: Adding a shared network to already deployed VM is failing. Signed-off-by: Mice Xia <mice_...@tcloudcomputing.com> - ASF Subversion and Git Services On July 8, 2013, 2:30 p.m., Saksham Srivastava wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/12326/ > ----------------------------------------------------------- > > (Updated July 8, 2013, 2:30 p.m.) > > > Review request for cloudstack and mice xia. > > > Bugs: 3094 > > > Repository: cloudstack-git > > > Description > ------- > > If a nic entry is present in the db, even if it is marked as removed, > listDistinctHostnames returns the name of the corresponding vm. > This caused the addNic API to fail whenever a NIC entry was present in db > even if it was removed. > Added checks that ensure to throw exception only if the vm with nondistict > hostname has a NIC in the network. > > > Diffs > ----- > > engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java 830e464 > engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java ffb1a0b > server/src/com/cloud/vm/UserVmManagerImpl.java 5b2b283 > > Diff: https://reviews.apache.org/r/12326/diff/ > > > Testing > ------- > > Created a shared network. > Added the NIC to a vm with error state, causing a NIC entry in db but removed > as not null. > Added the same network again without error state, the network gets added. > > > Thanks, > > Saksham Srivastava > >