Commit Graph

169 Commits

Author SHA1 Message Date
Maciej Szwed
cb5178ea40 lvol: set default cluster size to 4MiB
Blobstore default cluster size is currently 4MiB,
but default lvol cluster size overrides it to 1GiB.

Additionally add -c flag in lvol tests to set cluster
size for tests.

1GiB was fine without thin provisioning, but we do not
want to allocate and copy 1GiB of data for newly allocated
clusters on thin provisioned logical volumes.

Note that 4MiB is same as default for Linux LVM.

lvol test case 601 had to be modified to create a malloc
LUN less than size of default cluster size.  This test is
supposed to fail - without the change here, creating the
lvolstore would work, but the script still considered it a
PASS.  Defer fixing that to a separate patch - for now just
keep the same test process.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic05defbf8e641f613f0ec74175a37bc25986e496

Reviewed-on: https://review.gerrithub.io/397562
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-31 15:37:26 -05:00
Pawel Kaminski
4ab8589ba3 test/lvol: Test plan for provisioning
Change-Id: Ia1ccf8091fb2dbbb97a7acecc230d9f6cb7c1002
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/391257
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-26 14:43:14 -05:00
Tomasz Zawadzki
b6aaba0852 bdev: remove vbdevs during spdk_bdev_unregister()
spdk_vbdev_unregister() is part of internal bdev API,
yet bdev module that uses spdk_vbdev_register() directly
will not be removed correctly when using delete_bdev RPC.
spdk_vbdev_unregister() is now consolidated with
spdk_bdev_unregister().

This comes up when deleting lvol bdev, as it does not use
spdk_bdev_part_* functions.
base_bdev->vbdevs entry was not removed for bdev that lvs
is created on.

Additionally patch expands test to create lvol bdev,
after removing it using delete_bdev RPC.
With ASAN enabled this would report accessing
already freed memory previously.

Change-Id: I9547e83862e2daa50355d56a1c9f453aaa6cfdb8
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/395711
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-24 15:50:04 -05:00
Pawel Niedzwiecki
62dc3292f5 test/lvol: update help message
update help message to match reordered and new test cases

Change-Id: Id85391cfc84c1ee1567cae07da9ff797a95a6f68
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392675
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-28 11:42:56 -05:00
Jim Harris
d8b8bc4353 test/lvol: wait for lvolstore tasting after nvme bdev construction
A couple of the lvol tests delete the nvme bdev, then construct
it again to test lvolstore tasting.  But constructing the nvme
bdev and then the tasting can take a tiny bit of time, and if
we check for the lvolstore too soon, it could fail.  There are
a large number of intermittent test failures in the test pool
that show this signature.

So sleep one second to allow time for the tasting to complete.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iebabe09458302d8300e704f232fdbb245b562268

Reviewed-on: https://review.gerrithub.io/392559
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2017-12-21 10:42:17 -05:00
Pawel Kaminski
56905c3877 test/lvol: Replace stop/start vhost with add/delete bdev
Change-Id: Ic960f2fe6966ae6eeb027a7c6a1d6929c741080d
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/388642
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-13 11:26:54 -05:00
Pawel Kaminski
3effc335eb test/lvol: Check if lvol store exists after vhost reboot
Change-Id: I65c25842b9e965ea0816f9dfc8ef62b820da001e
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/388813
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-01 17:08:35 -05:00
Pawel Kaminski
08ff0eaa9e test/lvol: Check if lvol store is removed after vhost reboot
Fix: Add condition to some test cases
because there are more possible return values
in check_get_lvol_stores function.

Change-Id: Id035d1edc52252f009277c9afd5f07f8875e0dcc
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/388242
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-01 17:08:35 -05:00
Pawel Kaminski
23782bc43c test/lvol: Reordering existing test cases.
It will allow to put another test cases
in specifig group.

Change-Id: Id352aa516676f78cdb102f8eac70144f115976a5
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/389098
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-30 16:02:54 -05:00
Karol Latecki
bc6540ad05 test/lvol: add friendly name specific tests
Adding positive and negative lvol friendly names specific tests.
Test plan updated.
Also fix some test naming discrepancies between plan and
script while at it

Change-Id: Ifb1a62d6a231f4f4ebfb5bb6178d941fc2b9770d
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/385552
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-11-17 18:24:08 -05:00
Lukasz Galka
3a6f8dc856 test/lvol: Add lvol tasting test
Add lvol tasting positive test case.
Adding new autotest config option for better control
where test is executed

Change-Id: Ic08b2395bd14e15072711b97c77b7e1ce26dd2b7
Signed-off-by: Lukasz Galka <lukaszx.galka@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/383432
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-11-17 18:24:08 -05:00
Jim Harris
6bef902ca5 rpc: add default UNIX domain socket listen address
RPC is a default feature required for almost all usages,
so enable RPC by default, but with a UNIX domain socket
for security reasons.

-r can now be used from the command line to specify
an alternative RPC listen address from the default
/var/tmp/spdk.sock.

Remove the Enable parameter from the Rpc config section
but still allow specifying an alternative listen address
using the Listen parameter as an alternative to the
command line option.  This keeps backward compatibility
for this release for anyone using the configuration file
still.

Remove the Rpc sections from all configuration files
that were using them, except for those that specified
alternate TCP ports for multi-process test cases.  We
can fix these later to use an alternate UNIX domain
socket and to use the command line instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ife0d03fcab638c67b659f1eb85348ddc2b55c4c4
Reviewed-on: https://review.gerrithub.io/386561
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-13 14:57:49 -05:00
Lukasz Galka
d88fa70e58 test/lvol: update test plan with tasting test
Postivive test case for testing lvol tasting feature.

Change-Id: Ifa8b87978e40a719ca59603cfd41a8fd1b22c6f9
Signed-off-by: Lukasz Galka <lukaszx.galka@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/382687
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-27 15:42:47 -04:00
Piotr Pelplinski
511adde02f lvol: add lvs name in rpc calls
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ic6770371d9d62cbdd40ae0612eb4f7dceccd507f
Reviewed-on: https://review.gerrithub.io/383771
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-27 13:10:21 -04:00
Daniel Verkamp
2120e4d3e7 test/lvol: fix typo in log message
Change-Id: I467f1b41b7f412bbc906e58da5c7db0c9b527beb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383142
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2017-10-24 18:02:21 -04:00
Lukasz Galka
9fb50ad867 test/lvol: adding test cases for lvol store cluster size
Added "-c" argument for construct_lvol_store calls in tests.
Added 2 additional test cases for checking cluster_size=0
and cluster_size>base_bdev_size.

Commit also includes small PEP8 fixes for additional empty lines
between class and function definitions.

Change-Id: Ibdfb3312a61828ad4aa0f79327b648b6ea67899b
Signed-off-by: Lukasz Galka <lukaszx.galka@intel.com>
Reviewed-on: https://review.gerrithub.io/381294
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-23 15:52:29 -04:00
Karol Latecki
392fdc8a89 test/lvol: Remove unsupported test
Removing test for lvol bdev resize as it is not supported

Change-Id: I73284f2260e595bfa5db2c24d2e37fcd1b255bd8
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/383086
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-23 15:52:29 -04:00
Lukasz Galka
e0b220b56d test/lvol: RPC lvol tests
Functional negative and positive lvol tests using RPC calls

Change-Id: I9b8d8501b8ab3087e786886ef1e78abe287f8820
Signed-off-by: Lukasz Galka <lukaszx.galka@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/375114
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-18 12:38:24 -04:00
Karol Latecki
f5e27c45da test/lvol: Logical volumes RPC test plan
Change-Id: I48b59deb9d119963961427db75e79609060777b9
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/372290
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-06 17:21:28 -04:00