weizhouapache commented on issue #7891:
URL: https://github.com/apache/cloudstack/issues/7891#issuecomment-2162464393
I am able to reproduce the issue in a zone with vxlan isolation
when create a private gateway, there are two networks created for it
```
mysql> select * from networks where id in (441,442);
+-----+----------------------------+--------------------------------------+----------------------------+--------------+-----------------------+---------------+-------------+----------------+--------+---------------------+---------------------+----------------+-----------------------+-------+---------+-----------+------------+------+------+---------+---------+-----------+------------+----------+----------------+----------------+------------+------------------+---------------------+---------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+-------------+-----------+-------------+------------+-------------+
| id | name | uuid |
display_text | traffic_type | broadcast_domain_type |
broadcast_uri | gateway | cidr | mode | network_offering_id |
physical_network_id | data_center_id | guru_name | state | related
| domain_id | account_id | dns1 | dns2 | ip6dns1 | ip6dns2 | guru_data |
set_fields | acl_type | network_domain | reservation_id | guest_type |
restart_required | created | removed | specify_ip_ranges | vpc_id |
ip6_gateway | ip6_cidr | network_cidr | display_network | network_acl_id |
streched_l2 | redundant | external_id | public_mtu | private_mtu |
+-----+----------------------------+--------------------------------------+----------------------------+--------------+-----------------------+---------------+-------------+----------------+--------+---------------------+---------------------+----------------+-----------------------+-------+---------+-----------+------------+------+------+---------+---------+-----------+------------+----------+----------------+----------------+------------+------------------+---------------------+---------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+-------------+-----------+-------------+------------+-------------+
| 441 | vpc-vpc-001-privateNetwork | 163390b5-704e-44ff-a8cd-ea026880ebb1 |
vpc-vpc-001-privateNetwork | Guest | Vlan | vlan://100
| 192.168.1.1 | 192.168.1.0/24 | Static | 5 |
200 | 1 | PrivateNetworkGuru | Setup | 441 | 1 |
2 | NULL | NULL | NULL | NULL | NULL | 0 | Account
| NULL | NULL | Isolated | 0 | 2024-06-12
08:43:19 | NULL | 0 | NULL | NULL | NULL | NULL
| 1 | NULL | 0 | 0 | NULL
| NULL | NULL |
| 442 | vpc-vpc-001-privateNetwork | 8d90b099-04ba-42bd-9f21-0d230eb6ee2e |
vpc-vpc-001-privateNetwork | Guest | Vxlan | vlan://100
| 192.168.1.1 | 192.168.1.0/24 | Dhcp | 5 |
200 | 1 | VxlanGuestNetworkGuru | Setup | 441 | 1 |
2 | NULL | NULL | NULL | NULL | NULL | 0 | Account
| NULL | NULL | Isolated | 0 | 2024-06-12
08:43:19 | NULL | 0 | 54 | NULL | NULL | NULL
| 1 | NULL | 0 | 0 | NULL
| 1500 | 1500 |
+-----+----------------------------+--------------------------------------+----------------------------+--------------+-----------------------+---------------+-------------+----------------+--------+---------------------+---------------------+----------------+-----------------------+-------+---------+-----------+------------+------+------+---------+---------+-----------+------------+----------+----------------+----------------+------------+------------------+---------------------+---------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+-------------+-----------+-------------+------------+-------------+
2 rows in set (0.00 sec)
```
when private gateway is removed, only the 1 record is marked as removed.
```
mysql> select * from networks where id in (441,442);
+-----+----------------------------+--------------------------------------+----------------------------+--------------+-----------------------+---------------+-------------+----------------+--------+---------------------+---------------------+----------------+-----------------------+---------+---------+-----------+------------+------+------+---------+---------+-----------+------------+----------+----------------+----------------+------------+------------------+---------------------+---------------------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+-------------+-----------+-------------+------------+-------------+
| id | name | uuid |
display_text | traffic_type | broadcast_domain_type |
broadcast_uri | gateway | cidr | mode | network_offering_id |
physical_network_id | data_center_id | guru_name | state |
related | domain_id | account_id | dns1 | dns2 | ip6dns1 | ip6dns2 | guru_data
| set_fields | acl_type | network_domain | reservation_id | guest_type |
restart_required | created | removed |
specify_ip_ranges | vpc_id | ip6_gateway | ip6_cidr | network_cidr |
display_network | network_acl_id | streched_l2 | redundant | external_id |
public_mtu | private_mtu |
+-----+----------------------------+--------------------------------------+----------------------------+--------------+-----------------------+---------------+-------------+----------------+--------+---------------------+---------------------+----------------+-----------------------+---------+---------+-----------+------------+------+------+---------+---------+-----------+------------+----------+----------------+----------------+------------+------------------+---------------------+---------------------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+-------------+-----------+-------------+------------+-------------+
| 441 | vpc-vpc-001-privateNetwork | 163390b5-704e-44ff-a8cd-ea026880ebb1 |
vpc-vpc-001-privateNetwork | Guest | Vlan | vlan://100
| 192.168.1.1 | 192.168.1.0/24 | Static | 5 |
200 | 1 | PrivateNetworkGuru | Destroy | 441 | 1
| 2 | NULL | NULL | NULL | NULL | NULL | 0 |
Account | NULL | NULL | Isolated | 0 |
2024-06-12 08:43:19 | 2024-06-12 08:48:56 | 0 | NULL | NULL
| NULL | NULL | 1 | NULL | 0
| 0 | NULL | NULL | NULL |
| 442 | vpc-vpc-001-privateNetwork | 8d90b099-04ba-42bd-9f21-0d230eb6ee2e |
vpc-vpc-001-privateNetwork | Guest | Vxlan | vlan://100
| 192.168.1.1 | 192.168.1.0/24 | Dhcp | 5 |
200 | 1 | VxlanGuestNetworkGuru | Setup | 441 | 1
| 2 | NULL | NULL | NULL | NULL | NULL | 0 |
Account | NULL | NULL | Isolated | 0 |
2024-06-12 08:43:19 | NULL | 0 | 54 | NULL
| NULL | NULL | 1 | NULL | 0
| 0 | NULL | 1500 | 1500 |
+-----+----------------------------+--------------------------------------+----------------------------+--------------+-----------------------+---------------+-------------+----------------+--------+---------------------+---------------------+----------------+-----------------------+---------+---------+-----------+------------+------+------+---------+---------+-----------+------------+----------+----------------+----------------+------------+------------------+---------------------+---------------------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+-------------+-----------+-------------+------------+-------------+
2 rows in set (0.00 sec)
```
--
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]