DaanHoogland commented on code in PR #12140:
URL: https://github.com/apache/cloudstack/pull/12140#discussion_r2569315770


##########
engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java:
##########
@@ -448,39 +451,71 @@ public void check() {
                 throw new CloudRuntimeException("Unable to acquire lock to 
check for database integrity.");
             }
 
-            try {
-                initializeDatabaseEncryptors();
+            // not sure about the right moment to do this yet
+            checkIfStandalone();
+            doUpgrades(lock);
+        } finally {
+            lock.releaseRef();
+        }
+    }
+    private void checkIfStandalone() throws CloudRuntimeException {
+        boolean standalone = Transaction.execute(new TransactionCallback<>() {
+            @Override
+            public Boolean doInTransaction(TransactionStatus status) {
+                String sql = "SELECT COUNT(*) FROM `cloud`.`management_server` 
WHERE `status` = 'UP'";

Review Comment:
   ```suggestion
                   String sql = "SELECT COUNT(*) FROM `cloud`.`mshosts` WHERE 
`state` = 'UP'";
   ```



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to