cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjeev N (JIRA)" <>
Subject [jira] [Created] (CLOUDSTACK-2586) [Object_Store_Refactor] Extract template does not give proper URL to download the template
Date Mon, 20 May 2013 12:19:15 GMT
Sanjeev N created CLOUDSTACK-2586:

             Summary: [Object_Store_Refactor] Extract template does not give proper URL to
download the template
                 Key: CLOUDSTACK-2586
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Template
    Affects Versions: 4.2.0
         Environment: Build from object_store feature branch
            Reporter: Sanjeev N
            Priority: Critical
             Fix For: 4.2.0

[Object_Store_Refactor] Extract template does not give proper URL to download the template

Steps to Reproduce:
1. Bring up CS in advanced zone with S3 as secondary storage provider
2. Register a template to CS and make sure it is in ready state
3. Extract template

Extract template command gives the following URL to download the template:

To download the template it should be copied to /var/www/html/userdata location on SSVM and
the URL should have SSVMs public IP address instead of mgmt server IP address. 
Template was not copied to /var/www/html/userdata location on SSVM.

Downloading template with the given url failed with following Error message:
HTTP Status 404 - /client/template/tmpl/2/206/206-2-73592258-559a-3b38-8f66-b667aab143eb

type Status report

message /client/template/tmpl/2/206/206-2-73592258-559a-3b38-8f66-b667aab143eb

description The requested resource (/client/template/tmpl/2/206/206-2-73592258-559a-3b38-8f66-b667aab143eb)
is not available.

API Fired to extract template:
2013-05-20 13:24:45,934 DEBUG [cloud.api.ApiServlet] (catalina-exec-2:null) ===START===
-- GET  command=extractTemplate&mode=HTTP_DOWNLOAD&id=7e4ca941-cb1b-4113-ab9e-043960d0fb10&zoneid=b030eb90-53a5-4dda-942d-c7b13b50c54d&response=json&sessionkey=R6B02dSeoRFzL6CVp2PX3UbfsGg%3D&_=1369050974723
2013-05-20 13:24:46,056 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-2:null) submit
async job-24, details: AsyncJobVO {id:24, userId: 2, accountId: 2, sessionKey: null, instanceType:
Template, instanceId: 206, cmd: org.apache.cloudstack.api.command.user.template.ExtractTemplateCmd,
cmdOriginator: null, cmdInfo: {"response":"json","id":"7e4ca941-cb1b-4113-ab9e-043960d0fb10","sessionkey":"R6B02dSeoRFzL6CVp2PX3UbfsGg\u003d","ctxUserId":"2","zoneid":"b030eb90-53a5-4dda-942d-c7b13b50c54d","httpmethod":"GET","_":"1369050974723","ctxAccountId":"2","ctxStartEventId":"92","mode":"HTTP_DOWNLOAD"},
cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, resultCode:
0, result: null, initMsid: 7332683579487, completeMsid: null, lastUpdated: null, lastPolled:
null, created: null}
2013-05-20 13:24:46,059 DEBUG [cloud.api.ApiServlet] (catalina-exec-2:null) ===END===
-- GET  command=extractTemplate&mode=HTTP_DOWNLOAD&id=7e4ca941-cb1b-4113-ab9e-043960d0fb10&zoneid=b030eb90-53a5-4dda-942d-c7b13b50c54d&response=json&sessionkey=R6B02dSeoRFzL6CVp2PX3UbfsGg%3D&_=1369050974723
2013-05-20 13:24:46,062 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-11:job-24) Executing
org.apache.cloudstack.api.command.user.template.ExtractTemplateCmd for job-24
2013-05-20 13:24:46,097 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-11:job-24) Complete
async job-24, jobStatus: 1, resultCode: 0, result: org.apache.cloudstack.api.response.ExtractResponse@af5b203
2013-05-20 13:24:46,103 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-11:job-24) Done
executing org.apache.cloudstack.api.command.user.template.ExtractTemplateCmd for job-24

Template status in vm_template and template_store_ref tables:
mysql> select * from vm_template where id=206\G;
*************************** 1. row ***************************
                id: 206
       unique_name: 206-2-73592258-559a-3b38-8f66-b667aab143eb
              name: OS031
              uuid: 7e4ca941-cb1b-4113-ab9e-043960d0fb10
            public: 1
          featured: 1
              type: USER
               hvm: 1
              bits: 64
            format: VHD
           created: 2013-05-20 16:58:50
           removed: NULL
        account_id: 2
          checksum: NULL
      display_text: OS031
   enable_password: 0
     enable_sshkey: 0
       guest_os_id: 12
          bootable: 1
       prepopulate: 0
       cross_zones: 1
       extractable: 1
   hypervisor_type: XenServer
source_template_id: NULL
      template_tag: NULL
          sort_key: 0
              size: 225178543
             state: Ready
      update_count: 3
           updated: 2013-05-20 16:59:34
1 row in set (0.00 sec)

No query specified

mysql> select * from template_store_ref where template_id=206\G;
*************************** 1. row ***************************
            id: 13
      store_id: 1
   template_id: 206
       created: 2013-05-20 16:58:50
  last_updated: 2013-05-20 16:59:33
        job_id: dd90f485-75a6-414d-b8e1-a4133878581c
  download_pct: 100
          size: 225178543
    store_role: Image
 physical_size: 225178543
download_state: DOWNLOADED
    local_path: template/tmpl/2/206/206-2-73592258-559a-3b38-8f66-b667aab143eb/5d67394c-4efd-4b62-966b-51aa53b35277.vhd.bz2
  install_path: template/tmpl/2/206/206-2-73592258-559a-3b38-8f66-b667aab143eb
           url: NULL
         state: Ready
     destroyed: 0
       is_copy: 0
  update_count: 3
       updated: 2013-05-20 16:59:34
1 row in set (0.00 sec)

No query specified

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:

View raw message