I assume you can make sense of these queries, install something like MySQL Workbench - or tool you like the most for sql work so you can make changes in place without knowing much of SQL.

Here are  snippets i wrote that may help

First find the network ID you need to clean up
SELECT * from cloud.networks

check what i used to check what network uses which IPs.
SELECT name,ip4_address FROM cloud.nics,cloud.vm_instance where broadcast_uri like "%106" and nics.instance_id=vm_instance.id and nics.state not like "Deallocating";

Check what IPs are used by specific network, you can alter them to Free once you find the disparity SELECT * FROM cloud.user_ip_address where source_network_id=221 and state not like "Free";

Same on NICs table, set them to Deallocating if they are set to Reserved or Allocated - and append the removed date SELECT * FROM cloud.nics where network_id=212 and state not like "Deallocating" and removed is null;

On 3/3/15 5:17 PM, Nux! wrote:
I have disabled the zone hours ago and killed the VR. I still cannot remove 
that range, same error.
I'll let it do its thing overnight and try again tomorrow morning.

At this point the waiting times are kind of bad and I'd rather dive in the DB 
if there's a reasonable way of doing it that way.

Lucian

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

----- Original Message -----
From: "Nux!" <n...@li.nux.ro>
To: dev@cloudstack.apache.org
Sent: Tuesday, 3 March, 2015 23:18:24
Subject: Re: Cannot delete range as IP is being used for providing dhcp service 
in this subnet
Hi Marcus,

Yes, shared guest networks.

I'll try your way.

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

----- Original Message -----
From: "Marcus" <shadow...@gmail.com>
To: dev@cloudstack.apache.org
Sent: Tuesday, 3 March, 2015 22:20:05
Subject: Re: Cannot delete range as IP is being used for providing dhcp service
in this subnet
We're not talking guest networks, right?  In the past I've been able
to remove these by disabling the zone, then deleting the router and/or
applicable system vms. Disabling the zone ensures the system vms don't
come back up. The vms do have to expunge though before you'll have any
luck.

On Tue, Mar 3, 2015 at 2:06 PM, Somesh Naidu <somesh.na...@citrix.com> wrote:
Lucian,

Not sure if you can get past that without destroying that network (or
manipulating the DB).

I am not sure if network restart with cleanup true releases the VR IP so you
probably could try that. If it does, then we'd have to figure how to avoid the
new IP getting chosen from the same IP range.

Regards,
Somesh


-----Original Message-----
From: Nux! [mailto:n...@li.nux.ro]
Sent: Tuesday, March 03, 2015 2:31 PM
To: dev
Subject: [4.5] Cannot delete range as IP is being used for providing dhcp
service in this subnet

Hi,

I'm having this problem, I've added a secondary subnet/range in my Adv+SG zone
and now I want to delete it.
All the VMs using it have been deleted (and I've been waiting for a while for
the explunge/cleanup jobs to run), yet I am getting this error:

"Cannot delete vlan range 2 as 192.168.203.102 is being used for providing dhcp
service in this subnet. Delete all VMs in this subnet and try again"

All the VMs are deleted, only the virtual router is using IPs from that range.

root@r-4-VM:~# ip a|grep 192.168
     inet 192.168.203.102/24 brd 192.168.203.255 scope global eth0:55
     inet 192.168.203.103/24 brd 192.168.203.255 scope global secondary eth0:56

How can I make the VR let go of those IPs?

Lucian

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

Reply via email to