venkata swamybabu budumuru created CLOUDSTACK-3896:
------------------------------------------------------

             Summary: [PrimaryStorage] deleteStoragePool is not kicking GC for 
the downloaded system vm templates on Primary Storage
                 Key: CLOUDSTACK-3896
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3896
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Storage Controller
    Affects Versions: 4.2.0
         Environment: commit # ca474d0e09f772cb22abf2802a308a2da5351592
            Reporter: venkata swamybabu budumuru
            Priority: Minor
             Fix For: 4.2.0


Steps to reproduce:

1. Have the latest cloudstack setup with at least 1 advanced zone using 
XenServer
2. make sure that system vm is up and running (which means the system vm is 
downloaded to the primary storage)
3. Disable zone and destroy the system vas
4. place the primary & secondary storages in maintenance mode.
5. delete both primary and secondary

# select * from storage_pool where id=12
*************************** 9. row ***************************
                   id: 12
                 name: primaryZone2
                 uuid: NULL
            pool_type: NetworkFilesystem
                 port: 2049
       data_center_id: 2
               pod_id: 2
           cluster_id: 2
           used_bytes: 1993387966464
       capacity_bytes: 5902284816384
         host_address: 10.147.28.7
            user_info: NULL
                 path: /export/home/swamy/primary.campo.xen.1.cluster
              created: 2013-07-29 07:19:06
              removed: 2013-07-29 09:14:19
          update_time: NULL
               status: Maintenance
storage_provider_name: DefaultPrimary
                scope: CLUSTER
           hypervisor: NULL
              managed: 0
        capacity_iops: NULL

6. check cloud.template_spool_ref for the above system vm template.

Observations:

(i) template_spool_ref still shows that system vm template as "Ready"
(ii) storage GC didn't happen for the above template.


mysql> select * from template_spool_ref where pool_id=12\G
*************************** 1. row ***************************
            id: 10
       pool_id: 12
   template_id: 1
       created: 2013-07-29 07:22:12
  last_updated: NULL
        job_id: NULL
  download_pct: 100
download_state: DOWNLOADED
     error_str: NULL
    local_path: 332cedca-b187-4af8-9d0a-ac3379741211
  install_path: 332cedca-b187-4af8-9d0a-ac3379741211
 template_size: 0
 marked_for_gc: 0
         state: Ready
  update_count: 2
       updated: 2013-07-29 07:36:24
1 row in set (0.00 sec)

(iii) Storage.cleanup.interval is enabled and set to 10 in my setup.

Attaching all the required logs along with db dump to the bug.

--
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