scripts/vagrant: fix namespace condition
There should be no Qemu param "namespace" added for emulated nvme drive (i.e. default should be used). This condition was faulty because ENV variable storing this information is a text and we check for != 1 as for and integer. Change-Id: Ic87aadbbc7eb1ba1ec700bccdb8864726a6562e1 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4159 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com> Reviewed-by: Mellanox Build Bot
This commit is contained in:
parent
fba93b3311
commit
357c9580a1
2
scripts/vagrant/Vagrantfile
vendored
2
scripts/vagrant/Vagrantfile
vendored
@ -150,7 +150,7 @@ def setup_nvme_disk(libvirt, disk, index)
|
|||||||
libvirt.qemuargs :value => "format=raw,file=#{nvme_disk},if=none,id=#{nvme_disk_id}"
|
libvirt.qemuargs :value => "format=raw,file=#{nvme_disk},if=none,id=#{nvme_disk_id}"
|
||||||
libvirt.qemuargs :value => "-device"
|
libvirt.qemuargs :value => "-device"
|
||||||
nvme_drive = "nvme,drive=#{nvme_disk_id},serial=1234#{index}"
|
nvme_drive = "nvme,drive=#{nvme_disk_id},serial=1234#{index}"
|
||||||
if !nvme_namespaces[index].nil? && nvme_namespaces[index] != 1
|
if !nvme_namespaces[index].nil? && nvme_namespaces[index] != "1"
|
||||||
nvme_drive << ",namespaces=#{nvme_namespaces[index]}"
|
nvme_drive << ",namespaces=#{nvme_namespaces[index]}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user