winterhazel commented on code in PR #14151:
URL: https://github.com/apache/cloudstack/pull/14151#discussion_r4053466026


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtPostCertificateRenewalCommandWrapper.java:
##########
@@ -29,18 +32,82 @@
 @ResourceWrapper(handles =  PostCertificateRenewalCommand.class)
 public final class LibvirtPostCertificateRenewalCommandWrapper extends 
CommandWrapper<PostCertificateRenewalCommand, Answer, LibvirtComputingResource> 
{
 
+    /**
+     * QMP {@code display-reload} command asking QEMU to reload the VNC 
display's TLS credentials off disk.
+     * {@code tls-certs: true} is required, otherwise QEMU reloads the display 
without touching the certificates.
+     * Added in QEMU 6.0 by commit 9cc07651655ee86eca41059f5ead8c4e5607c734 
("qmp: add new qmp display-reload",
+     * merged 2021-03-23) - 
https://github.com/qemu/qemu/commit/9cc07651655ee86eca41059f5ead8c4e5607c734
+     */
+    private static final String 
QEMU_MONITOR_DISPLAY_RELOAD_VNC_TLS_CERTS_COMMAND =
+            
"{\"execute\":\"display-reload\",\"arguments\":{\"type\":\"vnc\",\"tls-certs\":true}}";
+
+    /** Minimum QEMU version supporting {@link 
#QEMU_MONITOR_DISPLAY_RELOAD_VNC_TLS_CERTS_COMMAND}. */
+    private static final long MIN_QEMU_VERSION_FOR_VNC_TLS_CERT_RELOAD = 
6000000L;
 
     @Override
     public Answer execute(final PostCertificateRenewalCommand command, final 
LibvirtComputingResource serverResource) {
         logger.info("Restarting libvirt after certificate 
provisioning/renewal");

Review Comment:
   Can we move this log inside `restartLibvirtd`?



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