Updated Branches: refs/heads/rbd-snap-clone 75c272dba -> bef3a2edb (forced update)
Cloudstack-2548: Failed to delete public IP range Public IP range deletion after it is dedicated fails with IP range being used for DHCP offers. Signed-off-by: Prasanna Santhanam <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/47a562a2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/47a562a2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/47a562a2 Branch: refs/heads/rbd-snap-clone Commit: 47a562a2c043c32fdf1f3108552cfce170b8b27e Parents: 09c6030 Author: Bharat Kumar <[email protected]> Authored: Tue May 21 12:21:01 2013 +0530 Committer: Prasanna Santhanam <[email protected]> Committed: Fri May 24 14:28:46 2013 +0530 ---------------------------------------------------------------------- .../configuration/ConfigurationManagerImpl.java | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/47a562a2/server/src/com/cloud/configuration/ConfigurationManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index 47c5482..214e292 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -3071,9 +3071,16 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati } } + } else { + // when there is no dhcp support in the network. + if (!deletePublicIPRange(vlanDbId)) { + return false; + } + _vlanDao.expunge(vlanDbId); + return true; } } - throw new InvalidParameterValueException("One of the ips in the range is used to provide Dhcp service to this subnet. cannot delete this range as "); + return false; }
