mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
fix(storages): pool sources take real device and export paths, a leading special character is refused
The source check of a new logical or NFS pool accepted only letters, digits and "/", which refused paths such as /dev/mapper/vg0-data, /dev/disk/by-id/wwn-..., /dev/disk/by-path/pci-0000:00:1f.2-ata-1 or /export/vm_images. The target check let any first character but "-" through, so a quote, "<" or "&" reached the pool XML and libvirt failed on it. Target and source now share one expression: letters, digits, "/", "_", ".", ":" and "-" (not first, not right after "/"), still in linear time. The Vagrant computes' NFS export becomes /srv/wvc-nfs, created through the page in the live pool test.
This commit is contained in:
parent
baeb023da2
commit
c8b0cb3a4a
4 changed files with 44 additions and 12 deletions
6
Vagrantfile
vendored
6
Vagrantfile
vendored
|
|
@ -4,7 +4,7 @@
|
|||
# key for root (SASL user wvc, password wvc-test). The empty second disk
|
||||
# /dev/vdb is for the LVM tests (TEST_LIBVIRT_LVM_DEVICE); each also serves a
|
||||
# 1 GiB iSCSI LUN on 127.0.0.1 for the iSCSI tests (TEST_LIBVIRT_ISCSI_TARGET),
|
||||
# exports /srv/wvcnfs to 127.0.0.1 for the NFS pool test (TEST_LIBVIRT_NFS_EXPORT),
|
||||
# exports /srv/wvc-nfs to 127.0.0.1 for the NFS pool test (TEST_LIBVIRT_NFS_EXPORT),
|
||||
# and accepts TLS logins (SASL) with a certificate from a throwaway CA.
|
||||
|
||||
# The CA is made here once; each compute signs its own certificate with it.
|
||||
|
|
@ -62,8 +62,8 @@ Vagrant.configure(2) do |config|
|
|||
targetcli saveconfig
|
||||
}
|
||||
dnf -y install nfs-utils
|
||||
install -d /srv/wvcnfs
|
||||
echo "/srv/wvcnfs 127.0.0.1(rw,no_root_squash)" > /etc/exports.d/wvc.exports
|
||||
install -d /srv/wvc-nfs
|
||||
echo "/srv/wvc-nfs 127.0.0.1(rw,no_root_squash)" > /etc/exports.d/wvc.exports
|
||||
systemctl enable --now nfs-server
|
||||
exportfs -r
|
||||
install -D -m 644 /tmp/wvc/cacert.pem /etc/pki/CA/cacert.pem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue