You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bs...@apache.org on 2026/01/30 06:42:50 UTC

(cloudstack) branch main updated: Fixed: unnecessary regeneration of SSH keys in developer mode when they already existed. (#12059)

This is an automated email from the ASF dual-hosted git repository.

bstoyanov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new bac3421da43  Fixed: unnecessary regeneration of SSH keys in developer mode when they already existed. (#12059)
bac3421da43 is described below

commit bac3421da437d0d3415e83fb3350a8584756e4a7
Author: Dattu <ar...@gmail.com>
AuthorDate: Fri Jan 30 12:12:41 2026 +0530

     Fixed: unnecessary regeneration of SSH keys in developer mode when they already existed. (#12059)
---
 server/src/main/java/com/cloud/server/ConfigurationServerImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/src/main/java/com/cloud/server/ConfigurationServerImpl.java b/server/src/main/java/com/cloud/server/ConfigurationServerImpl.java
index 51793f22e90..8f10dd84b54 100644
--- a/server/src/main/java/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/main/java/com/cloud/server/ConfigurationServerImpl.java
@@ -614,7 +614,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
             }
             // FIXME: take a global database lock here for safety.
             boolean onWindows = isOnWindows();
-            if(!onWindows) {
+            if (!onWindows && !(privkeyfile.exists() && pubkeyfile.exists())) {
                 Script.runSimpleBashScript("if [ -f " + privkeyfile + " ]; then rm -f " + privkeyfile + "; fi; ssh-keygen -t ecdsa -m PEM -N '' -f " + privkeyfile + " -q 2>/dev/null || ssh-keygen -t ecdsa -N '' -f " + privkeyfile + " -q");
             }