zap51 commented on issue #6821:
URL: https://github.com/apache/cloudstack/issues/6821#issuecomment-1275911097

   > > @weizhouapache
   > > Here's the output of the query. Some information is redacted FYI.
   > > > select * from user_ip_address join projects on 
user_ip_address.account_id=projects.project_account_id where projects.removed 
is not null;
   > > 
   > > 
   > > ```
   > > 
+------+--------------------------------------+------------+-----------+-------------------+----------------+------------+---------------------+------------+----------------+-------+-----------+-------------+-------------------+------------+---------------------+-----------+--------+-----------+-------------+---------+---------+---------+------------+--------------+-----+------+--------------------------------------+-----------------------+--------------------+-----------+---------------------+---------------------+----------+
   > > | id   | uuid                                 | account_id | domain_id | 
public_ip_address | data_center_id | source_nat | allocated           | 
vlan_db_id | one_to_one_nat | vm_id | state     | mac_address | 
source_network_id | network_id | physical_network_id | is_system | vpc_id | 
dnat_vmip | is_portable | display | removed | created | rule_state | 
forsystemvms | id  | name | uuid                                 | display_text 
         | project_account_id | domain_id | created             | removed       
      | state    |
   > > 
+------+--------------------------------------+------------+-----------+-------------------+----------------+------------+---------------------+------------+----------------+-------+-----------+-------------+-------------------+------------+---------------------+-----------+--------+-----------+-------------+---------+---------+---------+------------+--------------+-----+------+--------------------------------------+-----------------------+--------------------+-----------+---------------------+---------------------+----------+
   > > | 1463 | 26527c7b-a846-4654-bd6d-8ae89c31ce40 |       1265 |       962 | 
x.x.x.x           |              7 |          1 | 2022-09-19 05:12:31 |         
 7 |              0 |  NULL | Allocated |         379 |               219 |     
  NULL |                 211 |         0 |    248 | NULL      |           0 |   
    1 | NULL    | NULL    | NULL       |            0 | 299 | NULL | 
1cdf779b-23d8-40c4-be80-e69d8b24c95f | user-name-6536279     |               
1265 |       962 | 2022-09-16 08:38:03 | 2022-09-21 12:53:24 | Disabled |
   > > | 1499 | 9e4b3356-e0ae-4c5b-9edb-9ab576b757e4 |       1265 |       962 | 
x.x.x.x           |              7 |          1 | 2022-09-16 08:52:16 |         
 7 |              0 |  NULL | Allocated |         391 |               219 |     
  NULL |                 211 |         0 |    230 | NULL      |           0 |   
    1 | NULL    | NULL    | NULL       |            0 | 299 | NULL | 
1cdf779b-23d8-40c4-be80-e69d8b24c95f | user-name-6536279     |               
1265 |       962 | 2022-09-16 08:38:03 | 2022-09-21 12:53:24 | Disabled |
   > > 
+------+--------------------------------------+------------+-----------+-------------------+----------------+------------+---------------------+------------+----------------+-------+-----------+-------------+-------------------+------------+---------------------+-----------+--------+-----------+-------------+---------+---------+---------+------------+--------------+-----+------+--------------------------------------+-----------------------+--------------------+-----------+---------------------+---------------------+----------+
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > Thanks
   > 
   > the two ips are used by vpcs (ids are 248, 230) as source nat IP in a 
deleted project (id=299). it should not happen.
   > 
   > if the vpcs have been removed as well, a workaround is, update the ip to 
free state by manual db changes (please backup your database/table).
   > 
   > update user_ip_address set 
account_id=NULL,domain_id=NULL,source_nat=0,allocated=NULL,one_to_one_nat=0,vm_id=NULL,state='Free',vpc_id=NULL,network_id=NULL,dnat_vmip=NULL
 where id=1463; update user_ip_address set 
account_id=NULL,domain_id=NULL,source_nat=0,allocated=NULL,one_to_one_nat=0,vm_id=NULL,state='Free',vpc_id=NULL,network_id=NULL,dnat_vmip=NULL
 where id=1499;
   
   Thanks @weizhouapache.
   
   I was quickly checking the Virtual Routers, looks like there are 2 Virtual 
Routers belonging to 2 different VPCs holding those 2 IP Addresses as their 
SNAT IPs. Please let me know if I should go ahead and delete those Virtual 
Routers instead of executing the suggested MYSQL Query.
   
   Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to