You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Fariborz Navidan <md...@gmail.com> on 2021/05/21 06:44:40 UTC

Delete IP range

Hello,

We have migrated our server and public IPs has been changed. I need to
migrate all IP ranges to the new one. I have added a new IP range and
changed IP of all VMs. I need to force system VMS to use new IP range. I'm
trying delete the old IP range so that cloudstack assign IPs from the new
range. I just destroyed all system VMs but when I try to delete old IP
range, I get error "2 IPs are used". How do I determine where IPs are used?

Please advise.
Regards.

Re: Delete IP range

Posted by Pearl d'Silva <pe...@shapeblue.com>.
Hi Fariborz,

I did a small test - wherein I created a basic zone - created a VM - then deleted the VM and the router, disabled the zone and deleted the system VMs and noticed that the IP previously assigned to the router continues to remain allocated despite destroying the router and hence encountered the same issue of being prohibited from deleting the Public IP range.

So, it's highly likely that the IP that is left behind and marked allocated is probably the one that was assigned to the router; so, you can mark it as removed in the DB to proceed with deleting the IP range.

Regards,
Pearl
________________________________
From: Fariborz Navidan <md...@gmail.com>
Sent: Friday, May 21, 2021 5:27 PM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Re: Delete IP range

I found 1 IP was used as secondary IP. I just removed it but still one IP
is left which I cannot determine where is use.

On Fri, May 21, 2021 at 4:18 PM Fariborz Navidan <md...@gmail.com>
wrote:

> Hello,
> There are 2 IPs from that range in user_ip+address table but vm_id for all
> records is null. How do I determine which vms are using them?
>
> On Fri, May 21, 2021 at 3:41 PM Pearl d'Silva <pe...@shapeblue.com>
> wrote:
>
>> Hi Fariborz,
>>
>> Can you try listing for public IPs that are still allocated by querying
>> the following:
>>
>> select * from user_ip_address where data_center_id = <data_center_id> and
>> allocated is not null;
>>
>> If it does return some IPs that are marked as allocated and are within
>> the public IP range that you are attempting to delete, set those entries as
>> removed by updating the 'allocated' field of the 'user_ip_address' table as
>> null. Once this is done, you should be able to delete the Ip range.
>>
>> I'm not sure if there is a way to do the same via the UI.
>>
>> Thanks,
>> Pearl
>> ________________________________
>> From: Fariborz Navidan <md...@gmail.com>
>> Sent: Friday, May 21, 2021 4:16 PM
>> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
>> Subject: Re: Delete IP range
>>
>> Zone is disabled and no system VM and router exists but still the same
>> error.
>>
>> On Fri, May 21, 2021 at 3:12 PM Fariborz Navidan <md...@gmail.com>
>> wrote:
>>
>> > I have done the same. Still get this error message.
>> >
>> > Please help
>> >
>> > On Fri, May 21, 2021 at 11:55 AM Andrija Panic <andrija.panic@gmail.com
>> >
>> > wrote:
>> >
>> >> You should disable the zone and then delete SSVM and CPVM - otherwise
>> ACS
>> >> will try to create it again and use 2 IPs again.
>> >> Then remove the range, then enable the Zone again.
>> >>
>> >> Otherwise, you can check the table in DB user_ip_address (or similar)
>> and
>> >> try to read which IP is used atm - but probably it's just the SSVM and
>> >> CPVM
>> >> which have been recreated.
>> >>
>> >> On Fri, 21 May 2021 at 08:44, Fariborz Navidan <md...@gmail.com>
>> >> wrote:
>> >>
>> >> > Hello,
>> >> >
>> >> > We have migrated our server and public IPs has been changed. I need
>> to
>> >> > migrate all IP ranges to the new one. I have added a new IP range and
>> >> > changed IP of all VMs. I need to force system VMS to use new IP
>> range.
>> >> I'm
>> >> > trying delete the old IP range so that cloudstack assign IPs from the
>> >> new
>> >> > range. I just destroyed all system VMs but when I try to delete old
>> IP
>> >> > range, I get error "2 IPs are used". How do I determine where IPs are
>> >> used?
>> >> >
>> >> > Please advise.
>> >> > Regards.
>> >> >
>> >>
>> >>
>> >> --
>> >>
>> >> Andrija Panić
>> >>
>> >
>>
>>
>>
>>

 


Re: Delete IP range

Posted by Fariborz Navidan <md...@gmail.com>.
I found 1 IP was used as secondary IP. I just removed it but still one IP
is left which I cannot determine where is use.

On Fri, May 21, 2021 at 4:18 PM Fariborz Navidan <md...@gmail.com>
wrote:

> Hello,
> There are 2 IPs from that range in user_ip+address table but vm_id for all
> records is null. How do I determine which vms are using them?
>
> On Fri, May 21, 2021 at 3:41 PM Pearl d'Silva <pe...@shapeblue.com>
> wrote:
>
>> Hi Fariborz,
>>
>> Can you try listing for public IPs that are still allocated by querying
>> the following:
>>
>> select * from user_ip_address where data_center_id = <data_center_id> and
>> allocated is not null;
>>
>> If it does return some IPs that are marked as allocated and are within
>> the public IP range that you are attempting to delete, set those entries as
>> removed by updating the 'allocated' field of the 'user_ip_address' table as
>> null. Once this is done, you should be able to delete the Ip range.
>>
>> I'm not sure if there is a way to do the same via the UI.
>>
>> Thanks,
>> Pearl
>> ________________________________
>> From: Fariborz Navidan <md...@gmail.com>
>> Sent: Friday, May 21, 2021 4:16 PM
>> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
>> Subject: Re: Delete IP range
>>
>> Zone is disabled and no system VM and router exists but still the same
>> error.
>>
>> On Fri, May 21, 2021 at 3:12 PM Fariborz Navidan <md...@gmail.com>
>> wrote:
>>
>> > I have done the same. Still get this error message.
>> >
>> > Please help
>> >
>> > On Fri, May 21, 2021 at 11:55 AM Andrija Panic <andrija.panic@gmail.com
>> >
>> > wrote:
>> >
>> >> You should disable the zone and then delete SSVM and CPVM - otherwise
>> ACS
>> >> will try to create it again and use 2 IPs again.
>> >> Then remove the range, then enable the Zone again.
>> >>
>> >> Otherwise, you can check the table in DB user_ip_address (or similar)
>> and
>> >> try to read which IP is used atm - but probably it's just the SSVM and
>> >> CPVM
>> >> which have been recreated.
>> >>
>> >> On Fri, 21 May 2021 at 08:44, Fariborz Navidan <md...@gmail.com>
>> >> wrote:
>> >>
>> >> > Hello,
>> >> >
>> >> > We have migrated our server and public IPs has been changed. I need
>> to
>> >> > migrate all IP ranges to the new one. I have added a new IP range and
>> >> > changed IP of all VMs. I need to force system VMS to use new IP
>> range.
>> >> I'm
>> >> > trying delete the old IP range so that cloudstack assign IPs from the
>> >> new
>> >> > range. I just destroyed all system VMs but when I try to delete old
>> IP
>> >> > range, I get error "2 IPs are used". How do I determine where IPs are
>> >> used?
>> >> >
>> >> > Please advise.
>> >> > Regards.
>> >> >
>> >>
>> >>
>> >> --
>> >>
>> >> Andrija Panić
>> >>
>> >
>>
>>
>>
>>

Re: Delete IP range

Posted by Fariborz Navidan <md...@gmail.com>.
Hello,
There are 2 IPs from that range in user_ip+address table but vm_id for all
records is null. How do I determine which vms are using them?

On Fri, May 21, 2021 at 3:41 PM Pearl d'Silva <pe...@shapeblue.com>
wrote:

> Hi Fariborz,
>
> Can you try listing for public IPs that are still allocated by querying
> the following:
>
> select * from user_ip_address where data_center_id = <data_center_id> and
> allocated is not null;
>
> If it does return some IPs that are marked as allocated and are within the
> public IP range that you are attempting to delete, set those entries as
> removed by updating the 'allocated' field of the 'user_ip_address' table as
> null. Once this is done, you should be able to delete the Ip range.
>
> I'm not sure if there is a way to do the same via the UI.
>
> Thanks,
> Pearl
> ________________________________
> From: Fariborz Navidan <md...@gmail.com>
> Sent: Friday, May 21, 2021 4:16 PM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Re: Delete IP range
>
> Zone is disabled and no system VM and router exists but still the same
> error.
>
> On Fri, May 21, 2021 at 3:12 PM Fariborz Navidan <md...@gmail.com>
> wrote:
>
> > I have done the same. Still get this error message.
> >
> > Please help
> >
> > On Fri, May 21, 2021 at 11:55 AM Andrija Panic <an...@gmail.com>
> > wrote:
> >
> >> You should disable the zone and then delete SSVM and CPVM - otherwise
> ACS
> >> will try to create it again and use 2 IPs again.
> >> Then remove the range, then enable the Zone again.
> >>
> >> Otherwise, you can check the table in DB user_ip_address (or similar)
> and
> >> try to read which IP is used atm - but probably it's just the SSVM and
> >> CPVM
> >> which have been recreated.
> >>
> >> On Fri, 21 May 2021 at 08:44, Fariborz Navidan <md...@gmail.com>
> >> wrote:
> >>
> >> > Hello,
> >> >
> >> > We have migrated our server and public IPs has been changed. I need to
> >> > migrate all IP ranges to the new one. I have added a new IP range and
> >> > changed IP of all VMs. I need to force system VMS to use new IP range.
> >> I'm
> >> > trying delete the old IP range so that cloudstack assign IPs from the
> >> new
> >> > range. I just destroyed all system VMs but when I try to delete old IP
> >> > range, I get error "2 IPs are used". How do I determine where IPs are
> >> used?
> >> >
> >> > Please advise.
> >> > Regards.
> >> >
> >>
> >>
> >> --
> >>
> >> Andrija Panić
> >>
> >
>
>
>
>

Re: Delete IP range

Posted by Pearl d'Silva <pe...@shapeblue.com>.
Hi Fariborz,

Can you try listing for public IPs that are still allocated by querying the following:

select * from user_ip_address where data_center_id = <data_center_id> and allocated is not null;

If it does return some IPs that are marked as allocated and are within the public IP range that you are attempting to delete, set those entries as removed by updating the 'allocated' field of the 'user_ip_address' table as null. Once this is done, you should be able to delete the Ip range.

I'm not sure if there is a way to do the same via the UI.

Thanks,
Pearl
________________________________
From: Fariborz Navidan <md...@gmail.com>
Sent: Friday, May 21, 2021 4:16 PM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Re: Delete IP range

Zone is disabled and no system VM and router exists but still the same
error.

On Fri, May 21, 2021 at 3:12 PM Fariborz Navidan <md...@gmail.com>
wrote:

> I have done the same. Still get this error message.
>
> Please help
>
> On Fri, May 21, 2021 at 11:55 AM Andrija Panic <an...@gmail.com>
> wrote:
>
>> You should disable the zone and then delete SSVM and CPVM - otherwise ACS
>> will try to create it again and use 2 IPs again.
>> Then remove the range, then enable the Zone again.
>>
>> Otherwise, you can check the table in DB user_ip_address (or similar) and
>> try to read which IP is used atm - but probably it's just the SSVM and
>> CPVM
>> which have been recreated.
>>
>> On Fri, 21 May 2021 at 08:44, Fariborz Navidan <md...@gmail.com>
>> wrote:
>>
>> > Hello,
>> >
>> > We have migrated our server and public IPs has been changed. I need to
>> > migrate all IP ranges to the new one. I have added a new IP range and
>> > changed IP of all VMs. I need to force system VMS to use new IP range.
>> I'm
>> > trying delete the old IP range so that cloudstack assign IPs from the
>> new
>> > range. I just destroyed all system VMs but when I try to delete old IP
>> > range, I get error "2 IPs are used". How do I determine where IPs are
>> used?
>> >
>> > Please advise.
>> > Regards.
>> >
>>
>>
>> --
>>
>> Andrija Panić
>>
>

 


Re: Delete IP range

Posted by Fariborz Navidan <md...@gmail.com>.
Zone is disabled and no system VM and router exists but still the same
error.

On Fri, May 21, 2021 at 3:12 PM Fariborz Navidan <md...@gmail.com>
wrote:

> I have done the same. Still get this error message.
>
> Please help
>
> On Fri, May 21, 2021 at 11:55 AM Andrija Panic <an...@gmail.com>
> wrote:
>
>> You should disable the zone and then delete SSVM and CPVM - otherwise ACS
>> will try to create it again and use 2 IPs again.
>> Then remove the range, then enable the Zone again.
>>
>> Otherwise, you can check the table in DB user_ip_address (or similar) and
>> try to read which IP is used atm - but probably it's just the SSVM and
>> CPVM
>> which have been recreated.
>>
>> On Fri, 21 May 2021 at 08:44, Fariborz Navidan <md...@gmail.com>
>> wrote:
>>
>> > Hello,
>> >
>> > We have migrated our server and public IPs has been changed. I need to
>> > migrate all IP ranges to the new one. I have added a new IP range and
>> > changed IP of all VMs. I need to force system VMS to use new IP range.
>> I'm
>> > trying delete the old IP range so that cloudstack assign IPs from the
>> new
>> > range. I just destroyed all system VMs but when I try to delete old IP
>> > range, I get error "2 IPs are used". How do I determine where IPs are
>> used?
>> >
>> > Please advise.
>> > Regards.
>> >
>>
>>
>> --
>>
>> Andrija Panić
>>
>

Re: Delete IP range

Posted by Fariborz Navidan <md...@gmail.com>.
I have done the same. Still get this error message.

Please help

On Fri, May 21, 2021 at 11:55 AM Andrija Panic <an...@gmail.com>
wrote:

> You should disable the zone and then delete SSVM and CPVM - otherwise ACS
> will try to create it again and use 2 IPs again.
> Then remove the range, then enable the Zone again.
>
> Otherwise, you can check the table in DB user_ip_address (or similar) and
> try to read which IP is used atm - but probably it's just the SSVM and CPVM
> which have been recreated.
>
> On Fri, 21 May 2021 at 08:44, Fariborz Navidan <md...@gmail.com>
> wrote:
>
> > Hello,
> >
> > We have migrated our server and public IPs has been changed. I need to
> > migrate all IP ranges to the new one. I have added a new IP range and
> > changed IP of all VMs. I need to force system VMS to use new IP range.
> I'm
> > trying delete the old IP range so that cloudstack assign IPs from the new
> > range. I just destroyed all system VMs but when I try to delete old IP
> > range, I get error "2 IPs are used". How do I determine where IPs are
> used?
> >
> > Please advise.
> > Regards.
> >
>
>
> --
>
> Andrija Panić
>

Re: Delete IP range

Posted by Andrija Panic <an...@gmail.com>.
You should disable the zone and then delete SSVM and CPVM - otherwise ACS
will try to create it again and use 2 IPs again.
Then remove the range, then enable the Zone again.

Otherwise, you can check the table in DB user_ip_address (or similar) and
try to read which IP is used atm - but probably it's just the SSVM and CPVM
which have been recreated.

On Fri, 21 May 2021 at 08:44, Fariborz Navidan <md...@gmail.com>
wrote:

> Hello,
>
> We have migrated our server and public IPs has been changed. I need to
> migrate all IP ranges to the new one. I have added a new IP range and
> changed IP of all VMs. I need to force system VMS to use new IP range. I'm
> trying delete the old IP range so that cloudstack assign IPs from the new
> range. I just destroyed all system VMs but when I try to delete old IP
> range, I get error "2 IPs are used". How do I determine where IPs are used?
>
> Please advise.
> Regards.
>


-- 

Andrija Panić