I have allready run master against this dev env, and added the
mentioned entry in the upgrade map. Now I cannot access the database
using 4.1.1 anymore because of
ERROR [agent.manager.AgentManagerImpl] (AgentTaskPool-1:) Monitor
StoragePoolMonitor says there is an error in the connect process for 3
due to DB Exception on:
com.mysql.jdbc.JDBC4PreparedStatement@4171352e: SELECT
storage_pool.id, storage_pool.name, storage_pool.uuid,
storage_pool.pool_type, storage_pool.created, storage_pool.removed,
storage_pool.update_time, storage_pool.data_center_id,
storage_pool.pod_id, storage_pool.available_bytes,
storage_pool.capacity_bytes, storage_pool.status, storage_pool.scope,
storage_pool.storage_provider_id, storage_pool.host_address,
storage_pool.path, storage_pool.port, storage_pool.user_info,
storage_pool.cluster_id FROM storage_pool WHERE
storage_pool.data_center_id = 1  AND  ( storage_pool.pod_id IS NULL
OR storage_pool.pod_id = 1  )  AND  ( storage_pool.cluster_id IS NULL
OR storage_pool.cluster_id = 1  )  AND storage_pool.removed IS NULL
com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
com.mysql.jdbc.JDBC4PreparedStatement@4171352e: SELECT
storage_pool.id, storage_pool.name, storage_pool.uuid,
storage_pool.pool_type, storage_pool.created, storage_pool.removed,
storage_pool.update_time, storage_pool.data_center_id,
storage_pool.pod_id, storage_pool.available_bytes,
storage_pool.capacity_bytes, storage_pool.status, storage_pool.scope,
storage_pool.storage_provider_id, storage_pool.host_address,
storage_pool.path, storage_pool.port, storage_pool.user_info,
storage_pool.cluster_id FROM storage_pool WHERE
storage_pool.data_center_id = 1  AND  ( storage_pool.pod_id IS NULL
OR storage_pool.pod_id = 1  )  AND  ( storage_pool.cluster_id IS NULL
OR storage_pool.cluster_id = 1  )  AND storage_pool.removed IS NULL
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)
...
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
Unknown column 'storage_pool.available_bytes' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

any change I can salvage this installation to run with master? I.E.
add the templates outside cloudstack somehow? (and promise I will
never do it again)


On Thu, Aug 1, 2013 at 4:43 PM, Harikrishna Patnala
<harikrishna.patn...@citrix.com> wrote:
> My comments inline.
>
> Thanks
> Harikrishna
> On 01-Aug-2013, at 7:05 PM, Daan Hoogland <daan.hoogl...@gmail.com>
>  wrote:
>
>> Harikrishna,
>>
>> I suppose I have to register those templates before upgrading; i.e. in
>> the 4.1.1 version management server.
> Yes. in 4.1.1 these templates are registered as USER templates. During 
> upgrade to 4.2 these are converted to SYSTEM templates
>
>> Is this procedure described somewhere?
> Usually upgrade instructions are given in the release notes.
> For 4.1 upgrade you can look at Chapter 4 
> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.1.0/html/Release_Notes/upgrade-instructions.html#upgrade-from-4.0-to-4.1
>
>> Do I bake the templates myself first or should I use publicly offered 
>> templates?
> No need to prepare templates. I guess there is some discussion happening for 
> place to download system templates.
> You can download these templates from jenkins URL 
> http://jenkins.cloudstack.org/view/master/job/build-systemvm-master/
>
>>
>> thanks,
>> Daan
>>
>> On Thu, Aug 1, 2013 at 3:16 PM, Harikrishna Patnala
>> <harikrishna.patn...@citrix.com> wrote:
>>> Hi Daan,
>>> Before upgrading to 4.2 we need to register the new system templates for 
>>> each hypervisor with specific names so that during upgrade these new 
>>> templates are set to the system vms.
>>> It is mandatory to upgrade the system vm template if we want upgrade to 4.2.
>>>
>>> Here seems like you have a Xen cluster. So you need to register xen system 
>>> template with name systemvm-xenserver-4.2.
>>> So for the existing clusters you need to register system vm template per 
>>> hypervisor.
>>> System template names are for each hypervisor are
>>> 1) systemvm-xenserver-4.2
>>> 2) systemvm-kvm-4.2
>>> 3) systemvm-vmware-4.2
>>> 4) systemvm-hyperv-4.2
>>> 5) systemvm-lxc-4.2
>>>
>>> Thank you
>>> Harikrishna
>>>
>>> On 01-Aug-2013, at 5:29 PM, Daan Hoogland <daan.hoogl...@gmail.com> wrote:
>>>
>>>> H,
>>>>
>>>> I am testing an upgrade of my code for sdn based vpc private gateways
>>>> (not in the mainstream code). It runs on a custom 4.1.1 based on the
>>>> 4.1 branch. I have tested it against a 4.0 database and it upgrades
>>>> fine.
>>>>
>>>> Now I try to have a master version to which I applied my code to run
>>>> against the same environment. I added
>>>>       _upgradeMap.put("4.1.1", new DbUpgrade[] {new Upgrade410to420()});
>>>> to the class com.cloud.upgrade.DatabaseUpgradeChecker.
>>>> I have the systemvm.iso ready on the hypervisors, but not on my
>>>> (windows) development machine. When I start my version in eclipse I
>>>> get
>>>>
>>>> INFO  [c.c.u.DatabaseUpgradeChecker] (Timer-2:null) Database upgrade
>>>> must be performed from 4.1.1 to 4.2.0-SNAPSHOT
>>>> WARN  [c.c.u.d.Upgrade410to420] (Timer-2:null) 4.2.0 Hyperv SystemVm
>>>> template not found. Hyperv hypervisor is not used, so not failing
>>>> upgrade
>>>> WARN  [c.c.u.d.Upgrade410to420] (Timer-2:null) 4.2.0 KVM SystemVm
>>>> template not found. KVM hypervisor is not used, so not failing upgrade
>>>> ERROR [c.c.u.DatabaseUpgradeChecker] (Timer-2:null) Unable to upgrade
>>>> the database
>>>> com.cloud.utils.exception.CloudRuntimeException: 4.2.0 XenServer
>>>> SystemVm template not found. Cannot upgrade system Vms
>>>> at 
>>>> com.cloud.upgrade.dao.Upgrade410to420.updateSystemVmTemplates(Upgrade410to420.java:259)
>>>> ...
>>>> ERROR [c.c.u.c.ComponentContext] (Timer-2:null) System integrity check
>>>> failed. Refuse to startup
>>>> com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the 
>>>> database
>>>> at 
>>>> com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:296)
>>>> ...
>>>> Caused by: com.cloud.utils.exception.CloudRuntimeException: 4.2.0
>>>> XenServer SystemVm template not found. Cannot upgrade system Vms
>>>> at 
>>>> com.cloud.upgrade.dao.Upgrade410to420.updateSystemVmTemplates(Upgrade410to420.java:259)
>>>> ...
>>>> ... 5 more
>>>> 2013-07-31 21:50:50.802:INFO::Shutdown hook executing
>>>>
>>>> I found that vm_template should contain a line for this;
>>>>
>>>>                   //Get 4.2.0 system Vm template Id for
>>>> corresponding hypervisor
>>>>                   pstmt = conn.prepareStatement("select id from
>>>> `cloud`.`vm_template` where name = ? and removed is null order by id
>>>> desc limit 1");
>>>>                   pstmt.setString(1, hypervisorAndTemplateName.getValue());
>>>>                   rs = pstmt.executeQuery();
>>>>
>>>> Should I add a row by hand?
>>>> Is there a readme/howto-upgrade, I should read (or create using my 
>>>> findings)?
>>>> Why is this not automatic this time?
>>>>
>>>> sorry if I missed the mail thread explaining all of this,
>>>> Daan Hoogland
>>>
>

Reply via email to