You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/04/02 11:06:17 UTC

[GitHub] rhtyd closed pull request #2518: CLOUDSTACK-10348: Don't specify cache mode for empty cdrom device

rhtyd closed pull request #2518: CLOUDSTACK-10348: Don't specify cache mode for empty cdrom device
URL: https://github.com/apache/cloudstack/pull/2518
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
index 7c12c0713c5..cd94b874cf6 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
@@ -819,8 +819,12 @@ public String toString() {
             diskBuilder.append(" type='" + _diskType + "'");
             diskBuilder.append(">\n");
             if(qemuDriver) {
-                diskBuilder.append("<driver name='qemu'" + " type='" + _diskFmtType
-                        + "' cache='" + _diskCacheMode + "' ");
+                if (_deviceType == DeviceType.CDROM && _sourcePath == null) {
+                    diskBuilder.append("<driver name='qemu'" + " type='" + _diskFmtType + "' ");
+                } else {
+                    diskBuilder.append("<driver name='qemu'" + " type='" + _diskFmtType
+                            + "' cache='" + _diskCacheMode + "' ");
+                }
                 if(_discard != null && _discard != DiscardType.IGNORE) {
                     diskBuilder.append("discard='" + _discard.toString() + "' ");
                 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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