cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nawawit Kessaraphong (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CLOUDSTACK-2183) Database upgrade from 3.0.2 to 4.0.1 failed
Date Thu, 25 Apr 2013 13:58:15 GMT

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

Nawawit Kessaraphong edited comment on CLOUDSTACK-2183 at 4/25/13 1:56 PM:
---------------------------------------------------------------------------

I had read the code, edit and getting it redeployed. I think i had found an issue in upgrade
path mapper.
The issue seems to arise from server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java on
this line

DbUpgrade[] upgrades = _upgradeMap.get(trimmedDbVersion);

This line of code should return a correct upgrade path. In my case, it should return list
of [Upgrade302to40(), Upgrade40to401()] 
But, from my code inspecting, it return a list of [Upgrade302to40()], which is clearly invalid
upgrade and result in the error as indicated by the log.

Can I make a quick fix over this by returning a correct upgrade path list? Does the code had
other assumption on database upgrading anywhere else ?
I wish to know as well why the upgrade path mapper does not work as it expected.
                
      was (Author: mekpro):
    I had read the code, edit and rebuilding. I think i found an issue in upgrade path mapper.
The issue seems to arise from server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java on
this line

DbUpgrade[] upgrades = _upgradeMap.get(trimmedDbVersion);

This line of code should return a correct upgrade path. In my case, it should return list
of [Upgrade302to40(), Upgrade40to401()] 
But, from my code inspecting, it return a list of [Upgrade302to40()], which is clearly invalid
upgrade and result in the error as indicated by the log.

Can I make a quick fix over this by returning a correct upgrade path list? Does the code had
other assumption on database upgrading anywhere else ?
I wish to know as well why the upgrade path mapper does not work as it expected.
                  
> Database upgrade from 3.0.2 to 4.0.1 failed
> -------------------------------------------
>
>                 Key: CLOUDSTACK-2183
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2183
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.0.1
>         Environment: CloudStack 3.0.2 upgrading to 4.0.1, CentOS 6.3, KVM Hypervisor,
 MySQL Server 5.1
>            Reporter: Nawawit Kessaraphong
>              Labels: database,, server,, upgrade
>
> I had cloudstack 3.0.2 deployed since last year and just upgraded to 4.0.1. Using this
repository  http://cloudstack.apt-get.eu/rhel/4.0/  and  following this guide  http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/Release_Notes/upgrade-instructions.html#upgrade-from-3.0.2-to-4.0.1
 which seems very good and descriptive.
> The upgrade process, however, had a problem. In step 9 where i try to start my management
again. 
> The server didn't seems to start, i investigated the log  and found that database upgrade
can not be performed
> """"""
> Database upgrade must be performed from 3.0.2.20120506223416 to 4.0.1.20130201075054
> The end upgrade version is actually at 4.0.0 but our management server code version is
at 4.0.1.2013020107505
> """"""
> I can confirmed that i had installed version 4.0.1 of all cloud components (except cloud-baremetal
where its doesn't work on CentOS 6) and the system once worked correctly on 3.0.2.
> Is there anything i can do to perform database upgrade to the new version.
> Best Regards
> Nawawit Kessaraphong
> part of /var/log/clod/management/managerment-server.log
> 2013-04-22 21:40:02,982 INFO  [cloud.upgrade.DatabaseUpgradeChecker] (main:null) DB version
= 3.0.2.20120506223416 Code Version = 4.0.1.20130201075054
> 2013-04-22 21:40:02,983 INFO  [cloud.upgrade.DatabaseUpgradeChecker] (main:null) Database
upgrade must be performed from 3.0.2.20120506223416 to 4.0.1.20130201075054
> 2013-04-22 21:40:02,983 ERROR [cloud.upgrade.DatabaseUpgradeChecker] (main:null) The
end upgrade version is actually at 4.0.0 but our management server code version is at 4.0.1.20130201075054
> 2013-04-22 21:40:02,985 ERROR [utils.component.ComponentLocator] (main:null) Problems
with running checker:DatabaseUpgradeChecker
> com.cloud.utils.exception.CloudRuntimeException: The end upgrade version is actually
at 4.0.0 but our management server code version is at 4.0.1.20130201075054
>   at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:200)
>   at com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:358)
>   at com.cloud.utils.component.ComponentLocator.runCheckers(ComponentLocator.java:273)
> ......
> ------------------------------------------

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

Mime
View raw message