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

jfthomps pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/vcl.git


The following commit(s) were added to refs/heads/develop by this push:
     new 3e1bfe5  VCL-1084 - set cache mode for libvirt VMs
3e1bfe5 is described below

commit 3e1bfe562b0c4bc4e905b14ae2c4392afe83ce58
Author: Josh Thompson <[email protected]>
AuthorDate: Tue May 28 14:34:13 2019 -0400

    VCL-1084 - set cache mode for libvirt VMs
    
    libvirt.pm: modified generate_domain_xml: oops, had logic backwards in last 
commit - disk cache should be set to none when on NFS (rather than on local 
disk), updated code for correct logic
---
 managementnode/lib/VCL/Module/Provisioning/libvirt.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/managementnode/lib/VCL/Module/Provisioning/libvirt.pm 
b/managementnode/lib/VCL/Module/Provisioning/libvirt.pm
index e45e2bc..7f4bf1a 100644
--- a/managementnode/lib/VCL/Module/Provisioning/libvirt.pm
+++ b/managementnode/lib/VCL/Module/Provisioning/libvirt.pm
@@ -1738,8 +1738,8 @@ sub generate_domain_xml {
        my $image_type = $self->data->get_vmhost_datastore_imagetype_name();
        my $vmhost_vmpath = $self->data->get_vmhost_profile_vmpath();
        my $add_disk_cache = 0;
-       if ($self->os->nathost_os->is_file_on_local_disk($vmhost_vmpath)) {
-               # set disk cache to none if vmpath on local disk so live 
migration will work
+       if (! $self->os->nathost_os->is_file_on_local_disk($vmhost_vmpath)) {
+               # set disk cache to none if vmpath on NFS so live migration 
will work
                $add_disk_cache = 1;
        }
 
@@ -1921,7 +1921,7 @@ EOF
        };
 
        if ($add_disk_cache) {
-               notify($ERRORS{'DEBUG'}, 0, "vmpath ($vmhost_vmpath) is on 
local disk; setting disk cache to none");
+               notify($ERRORS{'DEBUG'}, 0, "vmpath ($vmhost_vmpath) is on NFS; 
setting disk cache to none");
                $xml_hashref->{'devices'}[0]{'disk'}[0]{'driver'}{'cache'} = 
'none';
        }
        

Reply via email to