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

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

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

CLOUDSTACK-4015: don't insert the fake template record when upgrade from 304 to 
305

                
> [Upgrade][2.2.16 to 4.2] Invalid DB entry after upgrade 
> --------------------------------------------------------
>
>                 Key: CLOUDSTACK-4015
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4015
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Upgrade
>    Affects Versions: 4.2.0
>            Reporter: Abhinav Roy
>            Assignee: Alena Prokharchyk
>            Priority: Critical
>             Fix For: 4.2.0
>
>         Attachments: DB_DUMP_2216_cloud-31jul.sql, 
> DB_DUMP_2216_cloud_usage-31jul.sql, DB_DUMP_420_cloud-1Aug.sql, 
> DB_DUMP_420_cloud_usage-1stAug.sql
>
>
> After upgrade from 2.2.16 to 4.2 there is a invalid entry in the DB. 
> mysql> select * from vm_template where id=205;
> +-----+--------------------------------------------+---------------------------------------+--------+----------+---------+-----+------+------------------------------------------------------------------------------------------+-------------+---------------------+---------------------+------------+----------------------------------+---------------------------------------+-----------------+-------------+----------+-------------+-------------+-------------+-----------------+--------------------+--------------+--------------------------------------+---------------+----------+-------------+-----------+--------------+---------+----------------------+
> | id  | unique_name                                | name                     
>              | public | featured | type    | hvm | bits | url                 
>                                                                      | format 
>      | created             | removed             | account_id | checksum      
>                    | display_text                          | enable_password 
> | guest_os_id | bootable | prepopulate | cross_zones | extractable | 
> hypervisor_type | source_template_id | template_tag | uuid                    
>              | enable_sshkey | sort_key | size        | state     | 
> update_count | updated | dynamically_scalable |
> +-----+--------------------------------------------+---------------------------------------+--------+----------+---------+-----+------+------------------------------------------------------------------------------------------+-------------+---------------------+---------------------+------------+----------------------------------+---------------------------------------+-----------------+-------------+----------+-------------+-------------+-------------+-----------------+--------------------+--------------+--------------------------------------+---------------+----------+-------------+-----------+--------------+---------+----------------------+
>           
> | 205 | systemvm-vmware-3.0.5                      | systemvm-vmware-3.0.5    
>              |      1 |        1 | SYSTEM  |   0 |   64 | fake url            
>                                                                      | fake 
> format | 2013-07-31 16:11:01 | NULL                |          1 | NULL        
>                      | fake text                             |               
> 0 |          99 |        1 |           0 |           1 |           0 | VMware 
>          |               NULL | NULL         | 205                            
>       |             0 |        0 |        NULL | Allocated |            0 | 
> NULL    |                    0 |
> -------------------------------------------------------------------+-------------+---------------------+---------------------+------------+----------------------------------+---------------------------------------+-----------------+-------------+----------+-------------+-------------+-------------+-----------------+--------------------+--------------+--------------------------------------+---------------+----------+-------------+-----------+--------------+---------+----------------------+
> mysql> SELECT * FROM cloud.template_store_ref;
> +----+----------+-------------+---------------------+---------------------+--------------------------------------+--------------+-------------+------------+---------------+----------------+----------------------------------------------------+------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------+------------------------------------------------------------------------------------------+--------------+----------------------+-------+-----------+---------+--------------+---------+---------------------+
> | id | store_id | template_id | created             | last_updated        | 
> job_id                               | download_pct | size        | 
> store_role | physical_size | download_state | error_str                       
>                    | local_path                                               
>                                             | install_path                    
>                                    | url                                      
>                                                 | download_url | 
> download_url_created | state | destroyed | is_copy | update_count | ref_cnt | 
> updated             |
> +----+----------+-------------+---------------------+---------------------+--------------------------------------+--------------+-------------+------------+---------------+----------------+----------------------------------------------------+------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------+------------------------------------------------------------------------------------------+--------------+----------------------+-------+-----------+---------+--------------+---------+---------------------+
>                                                                               
>     | NULL         | NULL                 | Ready |         0 |       0 |     
>        2 |       0 | 2013-08-01 09:08:01 |
> | 27 |        3 |         205 | 2013-08-01 10:44:25 | 2013-08-01 10:44:25 | 
> NULL                                 |          100 |           0 | Image     
>  |             0 | DOWNLOADED     | NULL                                      
>          | NULL                                                               
>                                   | template/tmpl/1/205/                      
>                          | fake url                                           
>                                       | NULL         | NULL                 | 
> Ready |         0 |       0 |            0 |       0 | NULL                |
> Here we see that the template_id =205 was added by itself, not added manually 
> before/after upgrade.
> Now this leads to an issue when we try to add a vmware host (in a zone or 
> cluster) , because it tries to pick from this template but never finds it.

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