On Thu, Sep 21, 2017 at 1:35 AM, ashish mittal <ashmit602@gmail.com> wrote:


On Thu, Sep 21, 2017 at 12:58 AM, Peter Krempa <pkrempa@redhat.com> wrote:
On Wed, Sep 20, 2017 at 16:32:45 -0700, ashish mittal wrote:
> Hi,
>
> I have done TLS testing with this patch series and the tests passed fine
> with the secAlias fix in place.
>
> (1) Applied all the v9 patches.
> (2) make install. Reload and restart the libvirtd daemon.
> (3) Make sure able to start guest with TLS enabled VxHS disk in the domain
> XML.
> (4) Try to hot-plug another TLS disk. libvirtd crashes.
>
> [root@audi libvirt] 2017-09-20 15:59:25# virsh attach-device myfc24
> ../../hotplug_disk_1.xml
> error: Disconnected from qemu:///system due to end of file
> error: Failed to attach device from ../../hotplug_disk_1.xml
> error: End of file while reading data: Input/output error

So it's clearly ridiculous to write code without having a way how to
test it. How can we (upstream) get a VxHS server so that we can properly
test the code?

Fair ask :)
VxHS test server is a part of the libqnio GitHub repo. It can be downloaded from https://github.com/VeritasHyperScale/libqnio.git

To run the test server with lots of debug messages - 
make debug, make install (optional - just copies the library and test server to a particular location)
./src/qnio_server -v -l /dev/stdout

For running the server in TLS mode, the following files are needed before test server is started -
    CACERT                        "/var/lib/libvxhs/cacert.pem"
    Enable SSL mode by touching   "/var/lib/libvxhs/secure"
    SERVER_KEY                    "/var/lib/libvxhs/server.key"
    SERVER_CERT                   "/var/lib/libvxhs/server.cert"

Regards,
Ashish

To create the backing file that is added to the domain XML -
[amittal@localhost libqnio]$ ./src/test/create_vdisk.sh
Usage: create_vdisk <filename> <size in MB>

I just use -
./src/test/create_vdisk.sh /tmp/vxhs_testfile 1