----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13323/#review24894 -----------------------------------------------------------
Committed to MASTER. - Sheng Yang On Aug. 8, 2013, 6:03 a.m., bharat kumar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/13323/ > ----------------------------------------------------------- > > (Updated Aug. 8, 2013, 6:03 a.m.) > > > Review request for cloudstack, Alena Prokharchyk and Sheng Yang. > > > Bugs: Cloudstack-4083 > > > Repository: cloudstack-git > > > Description > ------- > > https://issues.apache.org/jira/browse/CLOUDSTACK-4083 > if a failure occurs while adding VM to another network (this should be the > first vm in the subnet). The ip alias created as a part of this process is > not removed. > > This occurred because we were not cleaning the alias ips in the event of a > failure. > > As a part of the fix. > 1.) moved the function removeDhcpServiceInsubnet and listLastNicsInSubnet to > NetworkManager (These were in VirtualMachineManagerImpl earlier.) > 2.) add the call to clean ipAlias in the remove nic function of the > networkManager. > 3.) Modified the removeDhcpServiceInsubnet to take network ad an argument. > This will help in removing only the ipAlias which belong to a particular > network. > > > Diffs > ----- > > server/src/com/cloud/network/NetworkManager.java f6dbb19 > server/src/com/cloud/network/NetworkManagerImpl.java 42e4093 > server/src/com/cloud/vm/VirtualMachineManagerImpl.java 15a9a82 > server/test/com/cloud/vpc/MockNetworkManagerImpl.java df552e4 > > Diff: https://reviews.apache.org/r/13323/diff/ > > > Testing > ------- > > Tested on 4.2. > created two guest networks guest1 and guest2. > created VMS in both the networks. > Added a VM(with no PV drivers) from guest1 to guest2. > this failed and on failure ipAlias configured as part of nic creation was > removed. > > Deleting the vm causes all the removal of all ipAliases from all the subnets > in which this is the lastvm. > > > Thanks, > > bharat kumar > >