weizhouapache commented on code in PR #12059:
URL: https://github.com/apache/cloudstack/pull/12059#discussion_r2556840578
##########
server/src/main/java/com/cloud/server/ConfigurationServerImpl.java:
##########
@@ -617,7 +617,9 @@ public void updateKeyPairs() {
// FIXME: take a global database lock here for safety.
boolean onWindows = isOnWindows();
if(!onWindows) {
- 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");
+ if (!(privkeyfile.exists() && pubkeyfile.exists())) {
Review Comment:
code lgtm
line 619 and 620 can be merged into 1 line
--
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]