----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12326/ -----------------------------------------------------------
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
