[
https://issues.apache.org/jira/browse/CLOUDSTACK-5283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sangeetha Hariharan closed CLOUDSTACK-5283.
-------------------------------------------
Currently , when there are issues when backing up the snapshot on secondary ,
CS sets the state of snapshots to "Error" state as part of bug
-CLOUDSTACK-5446.
For such snapshots , we have only 1 primary entry and no image entry in
snapshot_store_ref table.
mysql> select * from snapshots where id=337;
+-----+----------------+------------+-----------+-----------+------------------+--------+------+------------------------------+--------------------------------------+---------------+------------------+------------+---------------------+---------+----------------+----------+------------+--------------+-----------------+---------+-------+
| 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 |
+-----+----------------+------------+-----------+-----------+------------------+--------+------+------------------------------+--------------------------------------+---------------+------------------+------------+---------------------+---------+----------------+----------+------------+--------------+-----------------+---------+-------+
| 337 | 1 | 2 | 1 | 33 | 12
| Error | NULL | hello_ROOT-33_20140103232449 |
87677b80-70f5-4bf6-84a2-e8103a85d904 | 0 | MANUAL |
8589934592 | 2014-01-03 23:24:49 | NULL | NULL | NULL |
NULL | NULL | KVM | 2.2 | NULL |
+-----+----------------+------------+-----------+-----------+------------------+--------+------+------------------------------+--------------------------------------+---------------+------------------+------------+---------------------+---------+----------------+----------+------------+--------------+-----------------+---------+-------+
1 row in set (0.00 sec)
mysql> select * from snapshot_store_ref where snapshot_id=337;
+-----+----------+-------------+---------------------+--------------+--------+------------+------+---------------+--------------------+---------------------------------------------------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+
| 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
|
+-----+----------+-------------+---------------------+--------------+--------+------------+------+---------------+--------------------+---------------------------------------------------------------------------------------------------------------------+-------+--------------+---------+---------------------+-----------+
| 337 | 1 | 2 | 1 | 33 | 12
| Error | NULL | hello_ROOT-33_20140103232449 |
87677b80-70f5-4bf6-84a2-e8103a85d904 | 0 | MANUAL |
8589934592 | 2014-01-03 23:24:49 | NULL | NULL |
NULL | NULL | NULL | KVM | 2.2 | NULL |
+-----+----------------+------------+-----------+-----------+------------------+-----------+------+-------------------------------------------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------------------+----------------+----------+------------+--------------+-----------------+---------+-------+
We are able to list snapshots when we have snapshots in "Error" state:
{"id":"87677b80-70f5-4bf6-84a2-e8103a85d904","account":"admin","domainid":"63d7960e-7188-11e3-a5ee-4adf980f9414","domain":"ROOT","snapshottype":"MANUAL","volumeid":"a90e68e2-6b9c-4ddf-9435-746dffe030de","volumename":"ROOT-33","volumetype":"ROOT","created":"2014-01-03T18:24:49-0500","name":"hello_ROOT-33_20140103232449","intervaltype":"MANUAL","state":"Error","tags":[],"revertable":false}
Closing this issue.
> Not able to list snapshots when few snapshots are in "CreatedOnPrimary" state.
> ------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-5283
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5283
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.3.0
> Environment: Build frpm 4.3.0
> Reporter: Sangeetha Hariharan
> Assignee: Nitin Mehta
> Priority: Critical
> Fix For: 4.3.0
>
> Attachments: cloud.sql, management-server.log
>
>
> Not able to list snapshots when few snapshots are in "CreatedOnPrimary" state.
> Deploy 10 Vms in each of the hosts , so we start with 20 Vms.
> We will be constantly writing to the ROOT volume ( print timestamp every 1
> minute).
> Start concurrent snapshots for ROOT volumes for all the Vms by creating
> "Hourly" snapshot policy at the same time.
> Some of the snapshot creation fails , leaving behind Vms in
> "CreatedOnPrimary" state.
> When listing snapshot , we see the following error message:
> http://10.223.49.6:8080/client/api?command=listSnapshots&response=json&sessionkey=elVWw%2Bt7r%2BIn8qoB0bx2S5G43gE%3D&listAll=true&page=1&pagesize=20&_=1385520897726
> Response:
> "Unable to find info for image store snapshot with uuid
> '3e1d21b4-35bc-4e8b-91d2-8321b19d7bcf'"
> mysql> select * from snapshots where
> uuid="3e1d21b4-35bc-4e8b-91d2-8321b19d7bcf";
> +----+----------------+------------+-----------+-----------+------------------+------------------+------+-------------------------------------------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------+----------------+----------+------------+--------------+-----------------+---------+-------+
> | 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 |
> +----+----------------+------------+-----------+-----------+------------------+------------------+------+-------------------------------------------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------+----------------+----------+------------+--------------+-----------------+---------+-------+
> | 26 | 1 | 3 | 1 | 26 | 14
> | CreatedOnPrimary | NULL | TestVM-tiny-host-1ps-0-5_ROOT-26_20131127004142 |
> 3e1d21b4-35bc-4e8b-91d2-8321b19d7bcf | 3 | HOURLY |
> 21474836480 | 2013-11-27 00:41:42 | NULL | NULL | NULL |
> NULL | NULL | KVM | 2.2 | NULL |
> +----+----------------+------------+-----------+-----------+------------------+------------------+------+-------------------------------------------------+--------------------------------------+---------------+------------------+-------------+---------------------+---------+----------------+----------+------------+--------------+-----------------+---------+-------+
> 1 row in set (0.00 sec)
> mysql> select * from snapshot_store_ref where
> snapshot_id="3e1d21b4-35bc-4e8b-91d2-8321b19d7bcf";
> Empty set, 1 warning (0.00 sec)
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)