You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/04/06 11:46:59 UTC

[GitHub] [cloudstack] nvazquez commented on issue #6209: Revert volume to snapshot failures

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: commits-unsubscribe@cloudstack.apache.org

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