Hi Alena, I did it. btw, my problem is solved.
What i understand now is when i edit the vlan row and the range / total ip has more ip than previous, CS didn't trigger / insert row with 'Free' state on user_ip_address table, thats why the total ip is wrong. Thanks, Heince On 14-Aug-2012, at 11:16 PM, Alena Prokharchyk wrote: > If you insert them manually into the DB, make sure that vlan.'description' > field reflects the new start/end Ips > > -Alena. > > On 8/14/12 4:12 AM, "heince kurniawan" <[email protected]> wrote: > >> Thanks Mice, your hints very helpful. >> >> so, i end up with shortening current range to match previous total ip, >> then i added the rest 10 by adding new public IP range from UI. >> >> Regards, >> Heince >> >> >> On 14-Aug-2012, at 4:07 PM, Mice Xia wrote: >> >>> Heince, >>> >>> 1) Try adding a new public IP range from UI. >>> 2) Or try inserting them into DB manually, a row with 'Free' state will >>> be your example to start off. >>> >>> Regards >>> Mice >>> >>> -----Original Message----- >>> From: heince kurniawan [mailto:[email protected]] >>> Sent: Tuesday, August 14, 2012 2:49 PM >>> To: [email protected] >>> Subject: Re: change / replace public ip range >>> >>> Hi Mice, >>> >>> The result is not updated to my new range. >>> I understand from you that user_ip_address table is where CS get total >>> public ip. >>> >>> in that table, i see only 10 row with new ip that i've been modified(my >>> previous total ip is 10) instead of 20 (my new total ip). >>> How do i generate the rest 10 ip to that table ? >>> >>> Regards, >>> Heince >>> >>> >>> On 14-Aug-2012, at 2:24 PM, Mice Xia wrote: >>> >>>> Heince, >>>> >>>> Try executing following SQL and check the result, replace your zone id >>>> with 'center_id = 1'. This should give the same result as UI shows: >>>> >>>> SELECT COUNT(user_ip_address.public_ip_address) FROM user_ip_address >>>> INNER JOIN vlan ON user_ip_address.vlan_db_id=vlan.id WHERE >>>> user_ip_address.data_center_id = 1 AND (vlan.vlan_type = >>>> 'VirtualNetwork' ); >>>> >>>> Regards >>>> Mice >>>> >>>> -----Original Message----- >>>> From: heince kurniawan [mailto:[email protected]] >>>> Sent: Tuesday, August 14, 2012 1:00 PM >>>> To: [email protected] >>>> Subject: Re: change / replace public ip range >>>> >>>> Hi Alena, >>>> >>>> I did it but still the total is wrong, any db table that i need to >>>> modify? >>>> >>>> Regards, >>>> Heince >>>> >>>> >>>> On 14-Aug-2012, at 3:34 AM, Alena Prokharchyk wrote: >>>> >>>>> Hi Heince, >>>>> >>>>> Execute listCapacity Api call with fetchlatest=true. It will >>>>> re-calculate >>>>> the capacity and return you the up to date result. >>>>> >>>>> -Alena. >>>>> >>>>> On 8/13/12 12:17 PM, "heince kurniawan" <[email protected]> wrote: >>>>> >>>>>> Hi Alena, >>>>>> >>>>>> I have modified it, and router, system vms already using new ip. >>>>>> but the total capacity of the ip is wrong, how do i workaround this ? >>>>>> >>>>>> Regards, >>>>>> Heince >>>>>> >>>>>> >>>>>> On 14-Aug-2012, at 12:29 AM, Alena Prokharchyk wrote: >>>>>> >>>>>>> The IP address stays with the vm for the entire life cycle, till >>>>>>> it's >>>>>>> expunged. >>>>>>> >>>>>>> Modifying the DB is the only one way to workaround it. But changing >>>>>>> it >>>>>>> in >>>>>>> the user_ip_address table is not enough. You should: >>>>>>> >>>>>>> * change the record in cloud.vlan table that corresponds to ip >>>>>>> address >>>>>>> range. >>>>>>> * Change the record in nics table for all vms nics to have new ip >>>>>>> address >>>>>>> * restart the guest network >>>>>>> * stop/start ALL user vms in network >>>>>>> >>>>>>> >>>>>>> -Alena. >>>>>>> >>>>>>> On 8/13/12 1:16 AM, "Mice Xia" <[email protected]> wrote: >>>>>>> >>>>>>>> In database there is a table 'user_ip_address' for public IP >>>>>>>> address >>>>>>>> allocation, maybe you can try changing its address and restart >>>>>>>> network >>>>>>>> on >>>>>>>> UI. >>>>>>>> There is also a table 'vlan', and you may want to change its >>>>>>>> description >>>>>>>> to reflect your new IP range in UI. >>>>>>>> >>>>>>>> It seems to work for trunk, not sure if it's applicable for 3.0.2. >>>>>>>> >>>>>>>> Caution: >>>>>>>> Don¹t forget to backup your database (or everything) before you try >>>>>>>> this >>>>>>>> workaround. >>>>>>>> >>>>>>>> Regards >>>>>>>> Mice >>>>>>>> >>>>>>>> -----Original Message----- >>>>>>>> From: heince kurniawan [mailto:[email protected]] >>>>>>>> Sent: Monday, August 13, 2012 12:28 PM >>>>>>>> To: [email protected] >>>>>>>> Subject: change / replace public ip range >>>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I'm using CS 3.0.2 advanced networking , just changed our ISP with >>>>>>>> new >>>>>>>> IP >>>>>>>> ranges, and I'm trying to change the previous ip assignment. >>>>>>>> >>>>>>>> This is what i've done: >>>>>>>> - stop all vms >>>>>>>> - maintenance all hosts >>>>>>>> - destroy router and system vms >>>>>>>> - disable zone >>>>>>>> >>>>>>>> but i still can't delete the public ip, status : "The IP range >>>>>>>> can't be >>>>>>>> deleted because it has allocated public IP addresses." >>>>>>>> >>>>>>>> Even though i have destroyed router, the guest network mapping to >>>>>>>> public >>>>>>>> ip is still on state 'allocated', i can't delete the guest network >>>>>>>> : >>>>>>>> "Can't delete the network, not all user vms are expunged. Vm >>>>>>>> VM[User|i-2-7-VM] is in Stopped state" >>>>>>>> >>>>>>>> And i don't want to destroy all the vms, any workaround ? >>>>>>>> >>>>>>>> Bottom line: i just need to change the public ip range without >>>>>>>> destroying >>>>>>>> any user's vm. >>>>>>>> >>>>>>>> Regards, >>>>>>>> Heince >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>> >> >> > >
