weizhouapache commented on pull request #4137:
URL: https://github.com/apache/cloudstack/pull/4137#issuecomment-781672771


   > > @ggoodrich-ipp cool, thanks for update.
   > > I think you need to revert the change below in setup/db/create-schema.sql
   > > ```
   > >   `ike_version` varchar(5) NOT NULL DEFAULT 'ike' COMMENT 'one of ike, 
ikev1, ikev2',
   > >   `split_connections` int(1) NOT NULL DEFAULT 0,
   > > ```
   > > 
   > > 
   > > all travis test failed with error
   > > ```
   > > [ERROR] Failed to execute goal 
org.codehaus.mojo:exec-maven-plugin:1.2.1:java (create-schema) on project 
cloud-developer: An exception occured while executing the Java class. null: 
InvocationTargetException: Unable to upgrade the database: Unable to execute 
upgrade script: Duplicate column name 'ike_version' -> [Help 1]
   > > ```
   > 
   > Shouldn't these SQL changes be in both places? I guess I'm confused. If 
you were doing a fresh installation, and not an upgrade, how would you get the 
columns?
   
   @ggoodrich-ipp 
   when setup a fresh installation, we need to setup database via 
cloudstack-setup-databases.
   ```
   Using specified cluster management server node IP 10.135.122.40              
   [ ^[[92mOK^[[0m ]
   Checking Cloud database files ...                                            
   [ ^[[92mOK^[[0m ]
   Checking local machine hostname ...                                          
   [ ^[[92mOK^[[0m ]
   Checking SELinux setup ...                                                   
   [ ^[[92mOK^[[0m ]
   Preparing /etc/cloudstack/management/db.properties                           
   [ ^[[92mOK^[[0m ]
   Applying /usr/share/cloudstack-management/setup/create-database.sql          
   [ ^[[92mOK^[[0m ]
   Applying /usr/share/cloudstack-management/setup/create-schema.sql            
   [ ^[[92mOK^[[0m ]
   Applying /usr/share/cloudstack-management/setup/create-database-premium.sql  
   [ ^[[92mOK^[[0m ]
   Applying /usr/share/cloudstack-management/setup/create-schema-premium.sql    
   [ ^[[92mOK^[[0m ]
   Applying /usr/share/cloudstack-management/setup/server-setup.sql             
   [ ^[[92mOK^[[0m ]
   Applying /usr/share/cloudstack-management/setup/templates.sql                
   [ ^[[92mOK^[[0m ]
   Processing encryption ...                                                    
   [ ^[[92mOK^[[0m ]
   Finalizing setup ...                                                         
   [ ^[[92mOK^[[0m ]
   ```
   it will create some tables.
   when restart mgt server, cloudstack will perform database upgrade.
   ```
   2021-02-16 14:58:47,736 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade40to41 to upgrade from 4.0.0-4.1.0 to 4.1.0
   2021-02-16 14:58:55,307 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade410to420 to upgrade from 4.1.0-4.2.0 to 4.2.0
   2021-02-16 14:59:05,234 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade420to421 to upgrade from 4.2.0-4.2.1 to 4.2.1
   2021-02-16 14:59:05,348 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade421to430 to upgrade from 4.2.1-4.3.0 to 4.3.0
   2021-02-16 14:59:10,576 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade430to440 to upgrade from 4.3.0-4.4.0 to 4.4.0
   2021-02-16 14:59:17,909 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade440to441 to upgrade from 4.4.0-4.4.1 to 4.4.1
   2021-02-16 14:59:18,179 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade441to442 to upgrade from 4.4.1-4.4.2 to 4.4.2
   2021-02-16 14:59:18,203 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade442to450 to upgrade from 4.4.2-4.5.0 to 4.5.0
   2021-02-16 14:59:24,759 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade443to444 to upgrade from 4.4.3-4.4.4 to 4.4.4
   2021-02-16 14:59:24,792 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade450to451 to upgrade from 4.5.0-4.5.1 to 4.5.1
   2021-02-16 14:59:24,917 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade451to452 to upgrade from 4.5.1-4.5.2 to 4.5.2
   2021-02-16 14:59:25,149 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade452to453 to upgrade from 4.5.2-4.5.3 to 4.5.3
   2021-02-16 14:59:25,173 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade453to460 to upgrade from 4.5.3-4.6.0 to 4.6.0
   2021-02-16 14:59:26,139 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade460to461 to upgrade from 4.6.0-4.6.1 to 4.6.1
   2021-02-16 14:59:26,180 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade461to470 to upgrade from 4.6.1-4.7.0 to 4.7.0
   2021-02-16 14:59:26,608 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade470to471 to upgrade from 4.7.0-4.7.1 to 4.7.1
   2021-02-16 14:59:26,716 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade471to480 to upgrade from 4.7.1-4.8.0 to 4.8.0
   2021-02-16 14:59:26,848 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade480to481 to upgrade from 4.8.0-4.8.1 to 4.8.1
   2021-02-16 14:59:26,884 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade481to490 to upgrade from 4.8.1-4.9.0 to 4.9.0
   2021-02-16 14:59:29,859 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade490to4910 to upgrade from 4.9.0-4.9.1.0 to 
4.9.1.0
   2021-02-16 14:59:30,392 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade4910to4920 to upgrade from 4.9.1.0-4.9.2.0 to 
4.9.2.0
   2021-02-16 14:59:30,681 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade4920to4930 to upgrade from 4.9.2.0-4.9.3.0 to 
4.9.3.0
   2021-02-16 14:59:30,797 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade4930to41000 to upgrade from 4.9.3.0-4.10.0.0 to 
4.10.0.0
   2021-02-16 14:59:32,061 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41000to41100 to upgrade from 4.10.0.0-4.11.0.0 
to 4.11.0.0
   2021-02-16 14:59:33,903 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41100to41110 to upgrade from 4.11.0.0-4.11.1.0 
to 4.11.1.0
   2021-02-16 14:59:34,096 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41110to41120 to upgrade from 4.11.1.0-4.11.2.0 
to 4.11.2.0
   2021-02-16 14:59:34,320 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41120to41130 to upgrade from 4.11.2.0-4.11.3.0 
to 4.11.3.0
   2021-02-16 14:59:34,348 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41120to41200 to upgrade from 4.11.2.0-4.12.0.0 
to 4.12.0.0
   2021-02-16 14:59:35,463 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41200to41300 to upgrade from 4.12.0.0-4.13.0.0 
to 4.13.0.0
   2021-02-16 14:59:36,613 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41300to41310 to upgrade from 4.13.0.0-4.13.1.0 
to 4.13.1.0
   2021-02-16 14:59:36,635 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41310to41400 to upgrade from 4.13.1.0-4.14.0.0 
to 4.14.0.0
   2021-02-16 14:59:37,499 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41400to41500 to upgrade from 4.14.0.0-4.15.0.0 
to 4.15.0.0
   2021-02-16 14:59:39,493 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41500to41510 to upgrade from 4.15.0.0-4.15.1.0 
to 4.15.1.0
   2021-02-16 14:59:39,529 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade41510to41600 to upgrade from 4.15.1.0-4.16.0.0 
to 4.16.0.0
   ```
   
   
   hope it is clear to you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to