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

Donal Lafferty commented on CLOUDSTACK-3919:
--------------------------------------------

Okay, but I am using latest db upgrade script.  E.g. 

root@mgmtserver:~/github/cshv3# grep -n -R "dynamically_scalable" * 
--include=*.sql
client/target/utilities/scripts/db/db/schema-410to420.sql:45:ALTER TABLE 
`cloud`.`vm_template` ADD COLUMN `dynamically_scalable` tinyint(1) unsigned NOT 
NULL DEFAULT 0  COMMENT 'true if template contains XS/VMWare tools inorder to 
support dynamic scaling of VM cpu/memory';
client/target/utilities/scripts/db/db/schema-410to420.sql:46:ALTER TABLE 
`cloud`.`vm_instance` ADD COLUMN `dynamically_scalable` tinyint(1) unsigned NOT 
NULL DEFAULT 0  COMMENT 'true if VM contains XS/VMWare tools inorder to support 
dynamic scaling of VM cpu/memory';
client/target/utilities/scripts/db/db/schema-410to420.sql:47:UPDATE 
`cloud`.`vm_template` SET dynamically_scalable = 1 WHERE name = "CentOS 
5.6(64-bit) no GUI (XenServer)" AND type = "BUILTIN";
client/target/utilities/scripts/db/db/schema-410to420.sql:48:UPDATE 
`cloud`.`vm_template` SET dynamically_scalable = 1 WHERE name = "SystemVM 
Template (vSphere)" AND type = "SYSTEM";
client/target/utilities/scripts/db/db/schema-410to420.sql:1625:        
vm_instance.dynamically_scalable dynamically_scalable
client/target/utilities/scripts/db/db/schema-410to420.sql:1824:        
vm_template.dynamically_scalable,
developer/target/db/db/schema-410to420.sql:45:ALTER TABLE `cloud`.`vm_template` 
ADD COLUMN `dynamically_scalable` tinyint(1) unsigned NOT NULL DEFAULT 0  
COMMENT 'true if template contains XS/VMWare tools inorder to support dynamic 
scaling of VM cpu/memory';
developer/target/db/db/schema-410to420.sql:46:ALTER TABLE `cloud`.`vm_instance` 
ADD COLUMN `dynamically_scalable` tinyint(1) unsigned NOT NULL DEFAULT 0  
COMMENT 'true if VM contains XS/VMWare tools inorder to support dynamic scaling 
of VM cpu/memory';
developer/target/db/db/schema-410to420.sql:47:UPDATE `cloud`.`vm_template` SET 
dynamically_scalable = 1 WHERE name = "CentOS 5.6(64-bit) no GUI (XenServer)" 
AND type = "BUILTIN";
developer/target/db/db/schema-410to420.sql:48:UPDATE `cloud`.`vm_template` SET 
dynamically_scalable = 1 WHERE name = "SystemVM Template (vSphere)" AND type = 
"SYSTEM";
developer/target/db/db/schema-410to420.sql:1625:        
vm_instance.dynamically_scalable dynamically_scalable
developer/target/db/db/schema-410to420.sql:1824:        
vm_template.dynamically_scalable,
setup/db/db/schema-410to420.sql:45:ALTER TABLE `cloud`.`vm_template` ADD COLUMN 
`dynamically_scalable` tinyint(1) unsigned NOT NULL DEFAULT 0  COMMENT 'true if 
template contains XS/VMWare tools inorder to support dynamic scaling of VM 
cpu/memory';
setup/db/db/schema-410to420.sql:46:ALTER TABLE `cloud`.`vm_instance` ADD COLUMN 
`dynamically_scalable` tinyint(1) unsigned NOT NULL DEFAULT 0  COMMENT 'true if 
VM contains XS/VMWare tools inorder to support dynamic scaling of VM 
cpu/memory';
setup/db/db/schema-410to420.sql:47:UPDATE `cloud`.`vm_template` SET 
dynamically_scalable = 1 WHERE name = "CentOS 5.6(64-bit) no GUI (XenServer)" 
AND type = "BUILTIN";
setup/db/db/schema-410to420.sql:48:UPDATE `cloud`.`vm_template` SET 
dynamically_scalable = 1 WHERE name = "SystemVM Template (vSphere)" AND type = 
"SYSTEM";
setup/db/db/schema-410to420.sql:1625:        vm_instance.dynamically_scalable 
dynamically_scalable
setup/db/db/schema-410to420.sql:1824:        vm_template.dynamically_scalable,


This script is not adding the column properly.  E.g. 

root@mgmtserver:~/github/cshv3# mysql --user=root --password="" cloud -e "show 
columns from vm_instance;"
+---------------------+---------------------+------+-----+---------+-------+
| Field               | Type                | Null | Key | Default | Extra |
+---------------------+---------------------+------+-----+---------+-------+
| id                  | bigint(20) unsigned | NO   | PRI | NULL    |       |
| name                | varchar(255)        | NO   |     | NULL    |       |
| uuid                | varchar(40)         | YES  | UNI | NULL    |       |
| instance_name       | varchar(255)        | NO   |     | NULL    |       |
| state               | varchar(32)         | NO   | MUL | NULL    |       |
| vm_template_id      | bigint(20) unsigned | YES  | MUL | NULL    |       |
| guest_os_id         | bigint(20) unsigned | NO   |     | NULL    |       |
| private_mac_address | varchar(17)         | YES  |     | NULL    |       |
| private_ip_address  | char(40)            | YES  |     | NULL    |       |
| pod_id              | bigint(20) unsigned | YES  | MUL | NULL    |       |
| data_center_id      | bigint(20) unsigned | NO   | MUL | NULL    |       |
| host_id             | bigint(20) unsigned | YES  | MUL | NULL    |       |
| last_host_id        | bigint(20) unsigned | YES  | MUL | NULL    |       |
| proxy_id            | bigint(20) unsigned | YES  |     | NULL    |       |
| proxy_assign_time   | datetime            | YES  |     | NULL    |       |
| vnc_password        | varchar(255)        | NO   |     | NULL    |       |
| ha_enabled          | tinyint(1)          | NO   |     | 0       |       |
| limit_cpu_use       | tinyint(1) unsigned | NO   |     | 0       |       |
| update_count        | bigint(20) unsigned | NO   | MUL | 0       |       |
| update_time         | datetime            | YES  | MUL | NULL    |       |
| created             | datetime            | NO   |     | NULL    |       |
| removed             | datetime            | YES  | MUL | NULL    |       |
| type                | varchar(32)         | NO   | MUL | NULL    |       |
| vm_type             | varchar(32)         | NO   |     | NULL    |       |
| account_id          | bigint(20) unsigned | NO   | MUL | NULL    |       |
| domain_id           | bigint(20) unsigned | NO   |     | NULL    |       |
| service_offering_id | bigint(20) unsigned | NO   | MUL | NULL    |       |
| reservation_id      | char(40)            | YES  |     | NULL    |       |
| hypervisor_type     | char(32)            | YES  |     | NULL    |       |
| disk_offering_id    | bigint(20) unsigned | YES  |     | NULL    |       |
| cpu                 | int(10) unsigned    | YES  |     | NULL    |       |
| ram                 | bigint(20) unsigned | YES  |     | NULL    |       |
| owner               | varchar(255)        | YES  |     | NULL    |       |
| speed               | int(10) unsigned    | YES  |     | NULL    |       |
| host_name           | varchar(255)        | YES  |     | NULL    |       |
| display_name        | varchar(255)        | YES  |     | NULL    |       |
| desired_state       | varchar(32)         | YES  |     | NULL    |       |
| display_vm          | tinyint(1)          | NO   |     | 1       |       |
+---------------------+---------------------+------+-----+---------+-------+

Could it be because I'm using S3 for my templates?

                
> Unknown column 'vm_instance.dynamically_scalable' in 'field list'
> -----------------------------------------------------------------
>
>                 Key: CLOUDSTACK-3919
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3919
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>         Environment: Running in jetty environment
>            Reporter: Donal Lafferty
>            Assignee: Alena Prokharchyk
>
> ERROR [AgentManagerImpl] (AgentTaskPool-1:ctx-d50085a9) Monitor 
> ClusteredVirtualMachineManagerImpl_EnhancerByCloudStack_c2fe87fe says there 
> is an error in the connect process for 1 due to DB Exception on: 
> com.mysql.jdbc.JDBC4PreparedStatement@4ae33037: SELECT vm_instance.id, 
> vm_instance.name, vm_instance.vnc_password, vm_instance.proxy_id, 
> vm_instance.proxy_assign_time, vm_instance.state, 
> vm_instance.private_ip_address, vm_instance.instance_name, 
> vm_instance.vm_template_id, vm_instance.guest_os_id, vm_instance.host_id, 
> vm_instance.last_host_id, vm_instance.pod_id, 
> vm_instance.private_mac_address, vm_instance.data_center_id, 
> vm_instance.vm_type, vm_instance.ha_enabled, vm_instance.display_vm, 
> vm_instance.limit_cpu_use, vm_instance.update_count, vm_instance.created, 
> vm_instance.removed, vm_instance.update_time, vm_instance.domain_id, 
> vm_instance.account_id, vm_instance.service_offering_id, 
> vm_instance.reservation_id, vm_instance.hypervisor_type, 
> vm_instance.dynamically_scalable, vm_instance.uuid, 
> vm_instance.disk_offering_id FROM vm_instance  INNER JOIN host ON 
> vm_instance.host_id=host.id WHERE vm_instance.removed IS NULL  AND  
> (host.cluster_id = 1 )
> com.cloud.utils.exception.CloudRuntimeException: DB Exception on: 
> com.mysql.jdbc.JDBC4PreparedStatement@4ae33037: SELECT vm_instance.id, 
> vm_instance.name, vm_instance.vnc_password, vm_instance.proxy_id, 
> vm_instance.proxy_assign_time, vm_instance.state, 
> vm_instance.private_ip_address, vm_instance.instance_name, 
> vm_instance.vm_template_id, vm_instance.guest_os_id, vm_instance.host_id, 
> vm_instance.last_host_id, vm_instance.pod_id, 
> vm_instance.private_mac_address, vm_instance.data_center_id, 
> vm_instance.vm_type, vm_instance.ha_enabled, vm_instance.display_vm, 
> vm_instance.limit_cpu_use, vm_instance.update_count, vm_instance.created, 
> vm_instance.removed, vm_instance.update_time, vm_instance.domain_id, 
> vm_instance.account_id, vm_instance.service_offering_id, 
> vm_instance.reservation_id, vm_instance.hypervisor_type, 
> vm_instance.dynamically_scalable, vm_instance.uuid, 
> vm_instance.disk_offering_id FROM vm_instance  INNER JOIN host ON 
> vm_instance.host_id=host.id WHERE vm_instance.removed IS NULL  AND  
> (host.cluster_id = 1 )
>         at 
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:415)
>         at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at 
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:350)
>         at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at 
> com.cloud.utils.db.GenericDaoBase.listIncludingRemovedBy(GenericDaoBase.java:905)
>         at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at com.cloud.utils.db.GenericDaoBase.listBy(GenericDaoBase.java:882)
>         at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at com.cloud.utils.db.GenericDaoBase.listBy(GenericDaoBase.java:895)
>         at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at 
> com.cloud.vm.dao.VMInstanceDaoImpl.listByClusterId(VMInstanceDaoImpl.java:274)
>         at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at 
> com.cloud.vm.VirtualMachineManagerImpl.fullSync(VirtualMachineManagerImpl.java:2100)
>         at 
> com.cloud.vm.VirtualMachineManagerImpl.processConnect(VirtualMachineManagerImpl.java:2616)
>         at 
> com.cloud.agent.manager.AgentManagerImpl.notifyMonitorsOfConnection(AgentManagerImpl.java:589)
>         at 
> com.cloud.agent.manager.AgentManagerImpl.handleDirectConnectAgent(AgentManagerImpl.java:1485)
>         at 
> com.cloud.resource.ResourceManagerImpl.createHostAndAgent(ResourceManagerImpl.java:1749)
>         at 
> com.cloud.resource.ResourceManagerImpl.createHostAndAgent(ResourceManagerImpl.java:1911)
>         at 
> com.cloud.agent.manager.AgentManagerImpl$SimulateStartTask.run(AgentManagerImpl.java:1133)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:724)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown 
> column 'vm_instance.dynamically_scalable' in 'field list'
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>         at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>         at com.mysql.jdbc.Util.getInstance(Util.java:386)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
>         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
>         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
>         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
>         at 
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
>         at 
> com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2318)
>         at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
>         at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
>         at 
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:409)
>         ... 45 more

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