manasaveloori created CLOUDSTACK-7266:
-----------------------------------------
Summary: Deleting account is not cleaning the snaphot entries in
secondary storage
Key: CLOUDSTACK-7266
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7266
Project: CloudStack
Issue Type: Bug
Security Level: Public (Anyone can view this level - this is the default.)
Components: Snapshot
Affects Versions: 4.5.0
Reporter: manasaveloori
Priority: Critical
Fix For: 4.5.0
Steps:
1. Deployed CS with ESXi5.1
2. Created VM with data disk.
3. Created snapshots on both root and data disks.
4. Now deleted the account.
id: 4
account_name: test
uuid: c55b8251-7bb0-4531-bd7e-7811d55160e6
type: 0
domain_id: 1
state: enabled
removed: 2014-08-06 06:04:50
cleanup_needed: 0
network_domain: NULL
default_zone_id: NULL
default: 0
5. All the snapshots got deleted as apart of account clean up in DB
mysql> select * from snapshots where account_id=4\G;
*************************** 1. row ***************************
id: 38
data_center_id: 1
account_id: 4
domain_id: 1
volume_id: 18
disk_offering_id: 1
status: Destroyed
path: NULL
name: testvmacct1_ROOT-11_20140806054444
uuid: 716f0dd5-056e-4cab-b814-125fc6fe84e6
snapshot_type: 0
type_description: MANUAL
size: 2147483648
created: 2014-08-06 05:44:44
removed: NULL
backup_snap_id: NULL
swift_id: NULL
sechost_id: NULL
prev_snap_id: NULL
hypervisor_type: VMware
version: 2.2
s3_id: NULL
*************************** 2. row ***************************
id: 39
data_center_id: 1
account_id: 4
domain_id: 1
volume_id: 18
disk_offering_id: 1
status: Destroyed
path: NULL
name: testvmacct1_ROOT-11_20140806054650
uuid: ea949547-5ef7-40b0-99a6-152d346a0ad6
snapshot_type: 3
type_description: HOURLY
size: 2147483648
created: 2014-08-06 05:46:50
removed: NULL
backup_snap_id: NULL
swift_id: NULL
sechost_id: NULL
prev_snap_id: NULL
hypervisor_type: VMware
version: 2.2
s3_id: NULL
*************************** 3. row ***************************
id: 40
data_center_id: 1
account_id: 4
domain_id: 1
volume_id: 18
disk_offering_id: 1
status: Destroyed
path: NULL
name: testvmacct1_ROOT-11_20140806055150
uuid: b8af0810-b08a-40bd-a114-13a4d75907ca
snapshot_type: 4
type_description: DAILY
size: 2147483648
created: 2014-08-06 05:51:50
removed: NULL
backup_snap_id: NULL
swift_id: NULL
sechost_id: NULL
prev_snap_id: NULL
hypervisor_type: VMware
version: 2.2
s3_id: NULL
*************************** 4. row ***************************
id: 41
data_center_id: 1
account_id: 4
domain_id: 1
volume_id: 18
disk_offering_id: 1
status: Destroyed
path: NULL
name: testvmacct1_ROOT-11_20140806055150
uuid: dda5cfb7-f5ab-4bd0-bdd3-953932e77f5e
snapshot_type: 5
type_description: WEEKLY
size: 2147483648
created: 2014-08-06 05:51:50
removed: NULL
backup_snap_id: NULL
swift_id: NULL
sechost_id: NULL
prev_snap_id: NULL
hypervisor_type: VMware
version: 2.2
s3_id: NULL
*************************** 5. row ***************************
id: 42
data_center_id: 1
account_id: 4
domain_id: 1
volume_id: 19
disk_offering_id: 3
status: Destroyed
path: NULL
name: testvmacct1_DATA-11_20140806055150
uuid: 69c8b7d1-baab-42ac-9a7d-dbdb0688654f
snapshot_type: 3
type_description: HOURLY
size: 5368709120
created: 2014-08-06 05:51:50
removed: NULL
backup_snap_id: NULL
swift_id: NULL
sechost_id: NULL
prev_snap_id: NULL
hypervisor_type: VMware
version: 2.2
s3_id: NULL
*************************** 6. row ***************************
id: 44
data_center_id: 1
account_id: 4
domain_id: 1
volume_id: 19
disk_offering_id: 3
status: Destroyed
path: NULL
name: testvmacct1_DATA-11_20140806060150
uuid: d1a95e1b-7ed8-46a8-9762-3cac8bc7aaf6
snapshot_type: 4
type_description: DAILY
size: 5368709120
created: 2014-08-06 06:01:50
removed: NULL
backup_snap_id: NULL
swift_id: NULL
sechost_id: NULL
prev_snap_id: NULL
hypervisor_type: VMware
version: 2.2
s3_id: NULL
*************************** 7. row ***************************
id: 45
data_center_id: 1
account_id: 4
domain_id: 1
volume_id: 19
disk_offering_id: 3
status: Destroyed
path: NULL
name: testvmacct1_DATA-11_20140806060150
uuid: 21b5e820-5a77-4713-bd5c-882816806877
snapshot_type: 6
type_description: MONTHLY
size: 5368709120
created: 2014-08-06 06:01:50
removed: NULL
backup_snap_id: NULL
swift_id: NULL
sechost_id: NULL
prev_snap_id: NULL
hypervisor_type: VMware
version: 2.2
s3_id: NULL
7 rows in set (0.00 sec)
6. Observed that the snapshots folder for removed account in secondary storage
are not deleted:
[root@RHEL63testVM snapshots]# ls
2 4 5
[root@RHEL63testVM snapshots]# cd 4
[root@RHEL63testVM 4]# ls -lrt
total 8
drwxrwxrwx+ 5 root root 4096 Aug 6 2014 19
attching
the Mslogs and dumps
--
This message was sent by Atlassian JIRA
(v6.2#6252)