[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13725906#comment-13725906
 ] 

ASF subversion and git services commented on CLOUDSTACK-3976:
-------------------------------------------------------------

Commit 6ea9d8b1594b9a737b2741a786a252c3700bc58f in branch refs/heads/master 
from [~edison]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=6ea9d8b ]

CLOUDSTACK-3976: if the snapshot is empty and it's the last one in the chain, 
we need to take full snapshot for the snapshots in sequence

                
> [Object_store_refactor] Parent snapshot is not getting deleted from secondary 
> storage after deleting child snapshots.
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-3976
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3976
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Storage Controller, XenServer
>    Affects Versions: 4.2.0
>         Environment: Latest build from ACS 4.2 branch
> Storage: NFS for both primary and secondary
>            Reporter: Sanjeev N
>            Assignee: edison su
>            Priority: Critical
>             Fix For: 4.2.0
>
>         Attachments: cloud.dmp, management-server.rar
>
>
> Parent snapshot is not getting deleted from secondary storage after deleting 
> child snapshots.
> Steps to Reproduce:
> =================
> 1.Bring up CS with atleast one xen cluster using NFS as the storage for both 
> primary and secondary
> 2.Deploy guest vm with default cent os template
> 3.On the root volume of the guest vm create snapshot 
> 4.Make some changes in root volume and create second snapshot 
> 5.Delete first snapshot (parent snapshot)
> 6.Now delete second snapshot (child snapshot)
> Observations
> ===========
> After step3 and step4 two entries were created in snapshot_store_ref table 
> with secondary storage location of the snapshots.
> 1.After step5 snopshot1's state was set to "Destroyed" in snapshosts table 
> and it was present in secondary storage which is expected since child 
> snapshot was still not deleted
> 2.After step6 snapshot2's state was set to "Destroyed" in snapshosts table 
> and it was deleted from the secondary storage as well.
> After step6 there was no change in the status for snapshot2 in 
> snapshot_store_ref table.
> 3.After storage gc kicked in snapshot2's entry from snapshot_store_table was 
> deleted but not snapsho1's and also snapshot1 was not deleted from secondary 
> storage.
> Impact:
> ======
> In usage_events table I could see SNAPSHOT_DELETE events got generated for 
> both the snapshots after deleting them. But parent snapshot is still 
> occupying the space in secondary storage since it is not deleted.
> User would not be charged for the storage usage since SNAPSHOT_DELETE event 
> was generated for both the snapshots.
> Snapshot details from cloud db are as follows:
> ===================================
> mysql> select * from snapshots where id in (54,55);
> +----+----------------+------------+-----------+-----------+------------------+-----------+------+----------------------------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------+----------------+----------+------------+--------------+-----------------+---------+-------+
> | 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 |
> +----+----------------+------------+-----------+-----------+------------------+-----------+------+----------------------------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------+----------------+----------+------------+--------------+-----------------+---------+-------+
> | 54 |              2 |          2 |         1 |        25 |                1 
> | Destroyed | NULL | Snap-Test_ROOT-15_20130731095856 | 
> 711a42b9-740a-473c-889d-55ba75d042e9 |             0 | MANUAL           | 
> 21474836480 | 2013-07-31 09:58:56 | NULL    | NULL           |     NULL |     
>   NULL |         NULL | XenServer       | 2.2     |  NULL |
> | 55 |              2 |          2 |         1 |        25 |                1 
> | Destroyed | NULL | Snap-Test_ROOT-15_20130731100641 | 
> 3ca96dd8-38fa-48f9-a331-d7e10bd45181 |             0 | MANUAL           | 
> 21474836480 | 2013-07-31 10:06:41 | NULL    | NULL           |     NULL |     
>   NULL |         NULL | XenServer       | 2.2     |  NULL |
> +----+----------------+------------+-----------+-----------+------------------+-----------+------+----------------------------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------+----------------+----------+------------+--------------+-----------------+---------+-------+
> 2 rows in set (0.00 sec)
> mysql> select * from snapshot_store_ref where snapshot_id in (54,55);
> +-----+----------+-------------+---------------------+--------------+--------+------------+------+---------------+--------------------+-----------------------------------------------------+-----------+--------------+---------+---------------------+-----------+
> | 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 |
> +-----+----------+-------------+---------------------+--------------+--------+------------+------+---------------+--------------------+-----------------------------------------------------+-----------+--------------+---------+---------------------+-----------+
> | 108 |        2 |          54 | 2013-07-31 09:58:58 | NULL         | NULL   
> | Image      |    0 |             0 |                  0 | 
> snapshots/2/25/cb3f5292-82dc-4521-956c-89c7aac0b9cc | Ready     |            
> 2 |       0 | 2013-07-31 10:00:50 |        25 |
> | 109 |        4 |          55 | 2013-07-31 10:06:41 | NULL         | NULL   
> | Primary    |    0 |             0 |                  0 | 
> de7acd9f-1a44-4e11-8bea-b575fa4f50b2                | Destroyed |            
> 2 |       0 | 2013-07-31 10:06:44 |        25 |
> +-----+----------+-------------+---------------------+--------------+--------+------------+------+---------------+--------------------+-----------------------------------------------------+-----------+--------------+---------+---------------------+-----------+
> 2 rows in set (0.00 sec)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to