cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cloudstack] rafaelweingartner commented on a change in pull request #2995: KVM: Improvements on upload direct download certificates
Date Sun, 02 Jun 2019 19:27:00 GMT
rafaelweingartner commented on a change in pull request #2995: KVM: Improvements on upload
direct download certificates
URL: https://github.com/apache/cloudstack/pull/2995#discussion_r289654723
 
 

 ##########
 File path: server/src/org/apache/cloudstack/direct/download/DirectDownloadManagerImpl.java
 ##########
 @@ -331,14 +390,44 @@ public boolean uploadCertificateToHosts(String certificateCer, String
certificat
      * Upload and import certificate to hostId on keystore
      */
     protected boolean uploadCertificate(String certificate, String certificateName, long
hostId) {
-        String cert = certificate.replaceAll("(.{64})", "$1\n");
-        final String prettified_cert = BEGIN_CERT + LINE_SEPARATOR + cert + LINE_SEPARATOR
+ END_CERT;
-        SetupDirectDownloadCertificate cmd = new SetupDirectDownloadCertificate(prettified_cert,
certificateName);
+        SetupDirectDownloadCertificateCommand cmd = new SetupDirectDownloadCertificateCommand(certificate,
certificateName);
         Answer answer = agentManager.easySend(hostId, cmd);
         if (answer == null || !answer.getResult()) {
+            String msg = "Certificate " + certificateName + " could not be added to host
" + hostId;
+            if (answer != null) {
+                msg += " due to: " + answer.getDetails();
+            }
+            s_logger.info(msg);
 
 Review comment:
   It is an error, right?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message