GitHub user rongage closed a discussion: New install - 4.19.1 on Centos Stream 
9, database upgrade fails.

<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete the 
comments.
-->

##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
 * Bug Report

##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
Core startup
~~~

##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main 
branch.
-->

~~~
4.19.1
~~~

##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network, advanced 
networking, etc.  N/A otherwise
-->
Separate database server:
mysql> select @@version
    -> ;
+-----------------+
| @@version       |
+-----------------+
| 10.5.22-MariaDB |
+-----------------+
1 row in set (0.00 sec)
 


##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
CentOS Stream 9

##### SUMMARY
<!-- Explain the problem/feature briefly -->
First startup, system detects that database is not correct revision ...
2024-09-06 22:05:47,734 INFO  [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) DB version = 4.0.0 Code Version = 4.19.1.1
2024-09-06 22:05:47,735 INFO  [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Database upgrade must be performed from 4.0.0 to 4.19.1.1
2024-09-06 22:05:47,751 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Running upgrade Upgrade40to41 to upgrade from 4.0.0-4.1.0 to 4.1.0

During the upgrade of the database schema, there is an invalid operation 
attempted (altering a foreign key column) which is not allowed unless you turn 
of foreign key constraints.

2024-09-06 22:05:47,796 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) alter 
table storage_pool modify id bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL
2024-09-06 22:05:47,817 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error 
executing: alter table storage_pool modify id bigint unsigned AUTO_INCREMENT 
UNIQUE NOT NULL
2024-09-06 22:05:47,817 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) 
java.sql.SQLException: Cannot change column 'id': used in a foreign key 
constraint 'fk_storage_pool_details__pool_id' of table 
'cloud.storage_pool_details'
2024-09-06 22:05:47,819 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Unable to execute upgrade script
java.sql.SQLException: Cannot change column 'id': used in a foreign key 
constraint 'fk_storage_pool_details__pool_id' of table 
'cloud.storage_pool_details'
        at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)


##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal test-case. 
Use Screenshots if accurate.

For new features, show how the feature would be used.
-->

<!-- Paste example playbooks or commands between quotes below -->
~~~

~~~

<!-- You can also paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->

~~~
I expected the web site to come available.
~~~

##### ACTUAL RESULTS
<!-- What actually happened? -->

<!-- Paste verbatim command output between quotes below -->
~~~
<html>
<body>
<!--StartFragment--><h2 style="color: rgb(0, 0, 0); font-family: &quot;Times 
New Roman&quot;; font-style: normal; font-variant-ligatures: normal; 
font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: 
start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; 
-webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: 
initial; text-decoration-style: initial; text-decoration-color: initial;">HTTP 
ERROR 503 Service Unavailable</h2>
URI: | /client/
-- | --
503
Service Unavailable
-

<!--EndFragment-->
</body>
</html>
~~~


GitHub link: https://github.com/apache/cloudstack/discussions/9913

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscr...@cloudstack.apache.org

Reply via email to