nvazquez commented on issue #6209:
URL: https://github.com/apache/cloudstack/issues/6209#issuecomment-1090175963

   @slavkap @Pearl1594 opening this for discussion: since 
https://github.com/apache/cloudstack/pull/1740 snapshots on primary storage are 
cleaned up after migration. Internally a new volume DB record is created after 
the volume is migrated and the old one is destroyed, along with snapshots and 
that seems to cause the issue (for the reinstall VM case I think that is also 
the case).
   
   As an example, before the volume migration:
   ````
   MariaDB [cloud]> select id, store_id, store_role, snapshot_id, state, 
volume_id from snapshot_store_ref where snapshot_id = 5;
   +----+----------+------------+-------------+-------+-----------+
   | id | store_id | store_role | snapshot_id | state | volume_id |
   +----+----------+------------+-------------+-------+-----------+
   |  9 |        1 | Primary    |           5 | Ready |        13 |
   | 10 |        1 | Image      |           5 | Ready |        13 |
   +----+----------+------------+-------------+-------+-----------+
   2 rows in set (0.00 sec)
   ````
   
   After volume migration:
   ````
   MariaDB [cloud]> select id, store_id, store_role, snapshot_id, state, 
volume_id from snapshot_store_ref where snapshot_id = 5;
   +----+----------+------------+-------------+-------+-----------+
   | id | store_id | store_role | snapshot_id | state | volume_id |
   +----+----------+------------+-------------+-------+-----------+
   | 10 |        1 | Image      |           5 | Ready |        14 |
   +----+----------+------------+-------------+-------+-----------+
   1 rows in set (0.00 sec)
   ````
   
   As discussed offline @slavkap proposed the storage driver checks if the 
references on `snapshot_store_ref` should be deleted for Primary role - 
@Pearl1594 what do you think?


-- 
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