sureshanaparti commented on issue #10687:
URL: https://github.com/apache/cloudstack/issues/10687#issuecomment-2826981745

   > [@DaanHoogland](https://github.com/DaanHoogland) 
[@sureshanaparti](https://github.com/sureshanaparti) just making sure:
   > 
   > * are you checking the table `cloud.usage_event`, and not `cloud.event`? A 
`NETWORK.CREATE` is inserted on `cloud.event` when the network is created 
(allocated), but not on `cloud.usage_event`
   
   correct, NETWORK.CREATE is added on `cloud.event` table, and not on 
`cloud.usage_event`.
   
   > * are you checking the table before the network is ever implemented? 
(while its state is `Allocated`)
   
   correct
   
   > I tested this multiple times on both the 4.19.2.0 and 4.20.0.0 releases, 
but nothing is inserted on `cloud.usage_event` after creating the network.
   
   yes, I observed the same
   
   @winterhazel comments inline ^^^
   
   My observations below:
   
   ```
   Created Isolated Network (Network in Allocated state) =>
   
   mysql> SELECT * FROM cloud.event WHERE type LIKE '%NETWORK%' AND resource_id 
= 206;
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   | id   | uuid                                 | type           | state     | 
description                                              | user_id | account_id 
| domain_id | resource_id | resource_type | created             | level | 
start_id | parameters | archived | display |
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   | 1129 | 4af06f76-9788-40a9-80a4-f10da4dafb0f | NETWORK.CREATE | Completed | 
Successfully completed creating network. Network Id: 206 |       2 |          2 
|         1 |         206 | Network       | 2025-04-24 09:14:41 | INFO  |       
 0 | NULL       |        0 |       1 |
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   1 row in set (0.00 sec)
   
   mysql> SELECT * FROM cloud.usage_event WHERE type LIKE '%NETWORK%' AND 
resource_id = 206;
   Empty set (0.00 sec)
   ```
   
   
   Deployed VM in Isolated Network created above (Network in Implemented state) 
=>
   
   ```
   mysql> SELECT * FROM cloud.event WHERE type LIKE '%NETWORK%' AND resource_id 
= 206;
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   | id   | uuid                                 | type           | state     | 
description                                              | user_id | account_id 
| domain_id | resource_id | resource_type | created             | level | 
start_id | parameters | archived | display |
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   | 1129 | 4af06f76-9788-40a9-80a4-f10da4dafb0f | NETWORK.CREATE | Completed | 
Successfully completed creating network. Network Id: 206 |       2 |          2 
|         1 |         206 | Network       | 2025-04-24 09:14:41 | INFO  |       
 0 | NULL       |        0 |       1 |
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   1 row in set (0.00 sec)
   
   mysql> SELECT * FROM cloud.usage_event WHERE type LIKE '%NETWORK%' AND 
resource_id = 206;
   
+-----+----------------+------------+---------------------+---------+-------------+---------------+-------------+-------------+------+---------------+-----------+--------------+
   | id  | type           | account_id | created             | zone_id | 
resource_id | resource_name | offering_id | template_id | size | resource_type 
| processed | virtual_size |
   
+-----+----------------+------------+---------------------+---------+-------------+---------------+-------------+-------------+------+---------------+-----------+--------------+
   | 365 | NETWORK.CREATE |          2 | 2025-04-24 09:22:51 |       1 |        
 206 | testnw02      |          10 |        NULL | NULL | NULL          |       
  0 |         NULL |
   
+-----+----------------+------------+---------------------+---------+-------------+---------------+-------------+-------------+------+---------------+-----------+--------------+
   1 row in set (0.00 sec)
   ```
   
   Stopped the VM deployed above (Network back to Allocated state, after 
NetworkGarbageCollector triggered) =>
   
   ```
   mysql> SELECT * FROM cloud.event WHERE type LIKE '%NETWORK%' AND resource_id 
= 206;
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   | id   | uuid                                 | type           | state     | 
description                                              | user_id | account_id 
| domain_id | resource_id | resource_type | created             | level | 
start_id | parameters | archived | display |
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   | 1129 | 4af06f76-9788-40a9-80a4-f10da4dafb0f | NETWORK.CREATE | Completed | 
Successfully completed creating network. Network Id: 206 |       2 |          2 
|         1 |         206 | Network       | 2025-04-24 09:14:41 | INFO  |       
 0 | NULL       |        0 |       1 |
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   1 row in set (0.00 sec)
   
   mysql> SELECT * FROM cloud.usage_event WHERE type LIKE '%NETWORK%' AND 
resource_id = 206;
   
+-----+----------------+------------+---------------------+---------+-------------+---------------+-------------+-------------+------+---------------+-----------+--------------+
   | id  | type           | account_id | created             | zone_id | 
resource_id | resource_name | offering_id | template_id | size | resource_type 
| processed | virtual_size |
   
+-----+----------------+------------+---------------------+---------+-------------+---------------+-------------+-------------+------+---------------+-----------+--------------+
   | 365 | NETWORK.CREATE |          2 | 2025-04-24 09:22:51 |       1 |        
 206 | testnw02      |          10 |        NULL | NULL | NULL          |       
  0 |         NULL |
   
+-----+----------------+------------+---------------------+---------+-------------+---------------+-------------+-------------+------+---------------+-----------+--------------+
   1 row in set (0.00 sec)
   ```
   
   Started the VM (Network in Implemented state) =>
   
   ```
   mysql> SELECT * FROM cloud.event WHERE type LIKE '%NETWORK%' AND resource_id 
= 206;
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   | id   | uuid                                 | type           | state     | 
description                                              | user_id | account_id 
| domain_id | resource_id | resource_type | created             | level | 
start_id | parameters | archived | display |
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   | 1129 | 4af06f76-9788-40a9-80a4-f10da4dafb0f | NETWORK.CREATE | Completed | 
Successfully completed creating network. Network Id: 206 |       2 |          2 
|         1 |         206 | Network       | 2025-04-24 09:14:41 | INFO  |       
 0 | NULL       |        0 |       1 |
   
+------+--------------------------------------+----------------+-----------+----------------------------------------------------------+---------+------------+-----------+-------------+---------------+---------------------+-------+----------+------------+----------+---------+
   1 row in set (0.00 sec)
   
   mysql> SELECT * FROM cloud.usage_event WHERE type LIKE '%NETWORK%' AND 
resource_id = 206;
   
+-----+----------------+------------+---------------------+---------+-------------+---------------+-------------+-------------+------+---------------+-----------+--------------+
   | id  | type           | account_id | created             | zone_id | 
resource_id | resource_name | offering_id | template_id | size | resource_type 
| processed | virtual_size |
   
+-----+----------------+------------+---------------------+---------+-------------+---------------+-------------+-------------+------+---------------+-----------+--------------+
   | 365 | NETWORK.CREATE |          2 | 2025-04-24 09:22:51 |       1 |        
 206 | testnw02      |          10 |        NULL | NULL | NULL          |       
  0 |         NULL |
   | 370 | NETWORK.CREATE |          2 | 2025-04-24 09:33:05 |       1 |        
 206 | testnw02      |          10 |        NULL | NULL | NULL          |       
  0 |         NULL |
   
+-----+----------------+------------+---------------------+---------+-------------+---------------+-------------+-------------+------+---------------+-----------+--------------+
   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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to