You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/09/25 08:59:18 UTC

[GitHub] vedulasantosh commented on issue #2139: CLOUDSTACK-9921: NPE when storage garbage collector is running.

vedulasantosh commented on issue #2139: CLOUDSTACK-9921: NPE when storage garbage collector is running.
URL: https://github.com/apache/cloudstack/pull/2139#issuecomment-331819596
 
 
   LGTM for Test 
   
   1.created  a centos vm.
   2.Took the snapshot of root volume.
   3.deleted the snapshot.
   4.stopped the vm and migrated it to another user.
   5.after garbage collector run snapshots are deleted successfully without any null pointer exception.
   
   mysql> select * from snapshots;
   +----+----------------+------------+-----------+-----------+------------------+-----------+------+-----------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------------------+----------------+----------+------------+--------------+-----------------+---------+-------+----------+----------+---------------+
   | id | data_center_id | account_id | domain_id | volume_id | disk_offering_id | status    | path | name            | uuid                                 | snapshot_type | type_description | size        | created             | removed             | backup_snap_id | swift_id | sechost_id | prev_snap_id | hypervisor_type | version | s3_id | min_iops | max_iops | location_type |
   +----+----------------+------------+-----------+-----------+------------------+-----------+------+-----------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------------------+----------------+----------+------------+--------------+-----------------+---------+-------+----------+----------+---------------+
   |  1 |              1 |          2 |         1 |         5 |                1 | Destroyed | NULL | ROOT-5-Snapshot | b2097cba-2a7d-458a-8249-cb8f7e95fa3c |             0 | MANUAL           | 21474836480 | 2017-09-22 11:33:53 | 2017-09-25 04:51:43 | NULL           |     NULL |       NULL |         NULL | XenServer       | 2.2     |  NULL |     NULL |     NULL | NULL          |
   |  2 |              1 |          2 |         1 |         5 |                1 | Destroyed | NULL | Snapshot2       | 3eac56b8-673e-4ce8-aa9a-69c1b0d1592e |             0 | MANUAL           | 21474836480 | 2017-09-22 11:54:49 | 2017-09-25 04:51:43 | NULL           |     NULL |       NULL |         NULL | XenServer       | 2.2     |  NULL |     NULL |     NULL | NULL          |
   |  3 |              1 |          2 |         1 |        16 |                1 | BackedUp  | NULL | snapshot1       | 6b936426-a5a5-40f3-b735-3c91ec05ecb3 |             0 | MANUAL           | 21474836480 | 2017-09-25 06:48:56 | NULL                | NULL           |     NULL |       NULL |         NULL | XenServer       | 2.2     |  NULL |     NULL |     NULL | NULL          |
   +----+----------------+------------+-----------+-----------+------------------+-----------+------+-----------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------------------+----------------+----------+------------+--------------+-----------------+---------+-------+----------+----------+---------------+
   3 rows in set (0.00 sec)
   
   mysql> select * from snapshot_store_ref;
   +----+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+-----------------------------------------------------+-------+--------------+---------+---------------------+-----------+
   | id | store_id | snapshot_id | created             | last_updated | job_id | store_role | size        | physical_size | parent_snapshot_id | install_path                                        | state | update_count | ref_cnt | updated             | volume_id |
   +----+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+-----------------------------------------------------+-------+--------------+---------+---------------------+-----------+
   |  5 |        2 |           3 | 2017-09-25 06:48:58 | NULL         | NULL   | Primary    | 21474836480 |   21474836480 |                  0 | 3936eff0-7ee1-401b-b576-92de9055c2e9                | Ready |            2 |       0 | 2017-09-25 06:48:59 |        16 |
   |  6 |        2 |           3 | 2017-09-25 06:48:59 | NULL         | NULL   | Image      | 21474836480 |    1765089792 |                  0 | snapshots/2/16/f8797200-c070-4288-97c3-d8194c728475 | Ready |            2 |       0 | 2017-09-25 06:49:52 |        16 |
   +----+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+-----------------------------------------------------+-------+--------------+---------+---------------------+-----------+
   2 rows in set (0.00 sec)
   
   
   
   Logs after migrating VM to another User:
   
   2017-09-25 12:23:45,019 DEBUG [c.c.s.StorageManagerImpl] (StorageManager-Scavenger-3:ctx-7fa2f16d) (logid:e8360439) Secondary storage garbage collector found 1 snapshots to cleanup on snapshot_store_ref for store: Secondary
   2017-09-25 12:23:45,021 DEBUG [c.c.s.StorageManagerImpl] (StorageManager-Scavenger-3:ctx-7fa2f16d) (logid:e8360439) Deleting snapshot store DB entry: SnapshotDataStore[6-3-2snapshots/2/16/f8797200-c070-4288-97c3-d8194c728475]
   
   
   
   mysql> select * from snapshots;
   +----+----------------+------------+-----------+-----------+------------------+-----------+------+-----------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------------------+----------------+----------+------------+--------------+-----------------+---------+-------+----------+----------+---------------+
   | id | data_center_id | account_id | domain_id | volume_id | disk_offering_id | status    | path | name            | uuid                                 | snapshot_type | type_description | size        | created             | removed             | backup_snap_id | swift_id | sechost_id | prev_snap_id | hypervisor_type | version | s3_id | min_iops | max_iops | location_type |
   +----+----------------+------------+-----------+-----------+------------------+-----------+------+-----------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------------------+----------------+----------+------------+--------------+-----------------+---------+-------+----------+----------+---------------+
   |  1 |              1 |          2 |         1 |         5 |                1 | Destroyed | NULL | ROOT-5-Snapshot | b2097cba-2a7d-458a-8249-cb8f7e95fa3c |             0 | MANUAL           | 21474836480 | 2017-09-22 11:33:53 | 2017-09-25 04:51:43 | NULL           |     NULL |       NULL |         NULL | XenServer       | 2.2     |  NULL |     NULL |     NULL | NULL          |
   |  2 |              1 |          2 |         1 |         5 |                1 | Destroyed | NULL | Snapshot2       | 3eac56b8-673e-4ce8-aa9a-69c1b0d1592e |             0 | MANUAL           | 21474836480 | 2017-09-22 11:54:49 | 2017-09-25 04:51:43 | NULL           |     NULL |       NULL |         NULL | XenServer       | 2.2     |  NULL |     NULL |     NULL | NULL          |
   |  3 |              1 |          2 |         1 |        16 |                1 | Destroyed | NULL | snapshot1       | 6b936426-a5a5-40f3-b735-3c91ec05ecb3 |             0 | MANUAL           | 21474836480 | 2017-09-25 06:48:56 | 2017-09-25 06:53:45 | NULL           |     NULL |       NULL |         NULL | XenServer       | 2.2     |  NULL |     NULL |     NULL | NULL          |
   +----+----------------+------------+-----------+-----------+------------------+-----------+------+-----------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------------------+----------------+----------+------------+--------------+-----------------+---------+-------+----------+----------+---------------+
   3 rows in set (0.00 sec)
   
   mysql> select * from snapshot_store_ref;
   +----+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+--------------------------------------+-----------+--------------+---------+---------------------+-----------+
   | id | store_id | snapshot_id | created             | last_updated | job_id | store_role | size        | physical_size | parent_snapshot_id | install_path                         | state     | update_count | ref_cnt | updated             | volume_id |
   +----+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+--------------------------------------+-----------+--------------+---------+---------------------+-----------+
   |  5 |        2 |           3 | 2017-09-25 06:48:58 | NULL         | NULL   | Primary    | 21474836480 |   21474836480 |                  0 | 3936eff0-7ee1-401b-b576-92de9055c2e9 | Destroyed |            2 |       0 | 2017-09-25 06:48:59 |        16 |
   +----+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+--------------------------------------+-----------+--------------+---------+---------------------+-----------+
   1 row in set (0.00 sec)
   
   Migrating the VM without deleting the snapshots gives a popup:
   ![screenshot from 2017-09-25 14 18 42](https://user-images.githubusercontent.com/16554581/30800498-cef056ac-a1fd-11e7-86fd-488fd51ebc73.png)
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services