Commit Graph

946 Commits

Author SHA1 Message Date
Maciej Wawryk
27ef3373a6 test: Shellcheck - ignore SC2164 warnings
Add to permanently excluded in shellcheck:
	SC2164: Use cd ... || exit in case cd fails.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ic8091de0cdc7bba441ea1715699ca5bd170ece59
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472176
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-01 14:36:25 +00:00
Artur Paszkiewicz
445e667f41 module/raid: make raid_level an enum instead of plain integer
Also add functions to convert it to/from string.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I6f7964d832c308b815150fff39eb3dc5c5ae5853
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471079
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-11-01 14:34:32 +00:00
Tomasz Kulasek
74906b01b6 lib/nvme: add RPC for interacting with CUSE devices
Added RPC commands to register/unregister CUSE devices
to NVMe controllers:

 - bdev_nvme_cuse_register
 - bdev_nvme_cuse_unregister

Additionally two RPC now return CUSE device names:

 - bdev_get_bdevs for namespaces
 - bdev_nvme_get_controllers for controllers


Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I69c4bf41ec8f78a7522894268a67dd733881712f
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472211
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 23:43:59 +00:00
Tomasz Kulasek
805d994281 lib/nvme: add NVMe character device
NVMe character device implementation. This patch adds implementation
of IO producer using CUSE library. It allows to create nvme device
nodes in linux kernel for controller as well as for namespace and
process ioctl requests as usual from linux environment.

Both devices (controller and namespaces) are exposed as character
devices.

To compile NVMe CUSE module use "./configure --with-nvme-cuse".

Names for created CUSE devices can be retrieved using
spdk_nvme_cuse_get_ctrlr_name() and spdk_nvme_cuse_get_ns_name().


Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I0fc9a9a1ef3c9c2b3112d07c2b4b1f8d49665ee1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466917
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 23:43:59 +00:00
Maciej Wawryk
faedb24952 test: Shellcheck - include check SC2165
Remove from shellcheck excluded SC2165: This nested loop
overrides the index variable of its parent.
This warning is not actually present in any of spdk/spdk scripts.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Idbef5f5e11467e389c7b965bb394a71d2d0d2566
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472174
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-24 17:36:52 +00:00
Maciej Wawryk
79e5668173 test: Shellcheck - correct rule: Prefer [ p ] && [ q ]
Correct shellcheck rule SC2166: Prefer [ p ] && [ q ]
as [ p -a q ] is not well defined.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I3fb2fb0e790bbdd296b64673c301324632d7c37b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472173
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 17:36:52 +00:00
Maciej Wawryk
e82eef5482 test: Shellcheck - include check SC2167
Remove from shellcheck excluded SC2167: This parent
loop has its index variable overridden.
This warning is not actually present in any of spdk/spdk scripts.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I066f7fa856581377ee8370ebe9167841a18b0787
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472172
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-24 17:36:52 +00:00
Maciej Wawryk
6ed525207f test: Shellcheck - include check SC2230
Remove from shellcheck excluded SC2230: which is non-standard.
Use builtin 'command -v' instead.
This warning is not actually present in any of spdk/spdk scripts.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I1e535b44ea54999736206aeb3906ce3cf670bc21
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472171
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-24 17:36:52 +00:00
Maciej Wawryk
f3b3fa7753 test: Shellcheck - correct rule: Use "${var:?}"\
Correct shellcheck rule SC2115: Use "${var:?}" to
ensure this never expands to /* .

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I4a6beef338b7a3c496f1b74a0cdbbdff83403ddc
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471464
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-24 17:36:52 +00:00
Maciej Wawryk
a8dee6d1b9 test: Shellcheck - correct rule: Useless echo?
Correct shellcheck rule SC2116: Useless echo?
Instead of 'cmd $(echo foo)', just use 'cmd foo'.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I940eb1ec72ba00ecb89ca770300f5d37e90e8a86
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471452
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-24 17:36:52 +00:00
Maciej Wawryk
64d0c173cd test: Shellcheck - correct rule: Use a ( subshell ) to avoid having to cd back
Correct shellcheck rule SC2103: Use a ( subshell ) to avoid having to cd back.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I474e11f5753c3482c7924548ab7c0183d4ac419d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-24 17:36:52 +00:00
John Kariuki
c8b6a884fd bdev/uring: add rpc calls
added rpc calls for configuring uring bdevs

Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Change-Id: I6c8273fd6e869402fcc244c9a08226d0c2db025c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471323
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 17:31:06 +00:00
Ziye Yang
7d60b02c8d scripts/ceph: Always update the admin key config file.
/etc/ceph/ceph.client.admin.keyring is used by
the liborados client, if keyring is udpated, we should
update this file.

If we see:

librados: client.admin authentication error (1) Operation not permitted

Usually, we should set the read privilge for the file.

Change-Id: I34967844a5d0578f740e601def4b0cbd297a95dc
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471947
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-24 17:11:31 +00:00
Chunyang Hui
bc40f5f661 bdev/opal: Add rpc commands for multiuser
Add rpc commands bdev_opal_lock_unlock, bdev_opal_new_user.
Admin can add new user for opal bdev created and the user can
lock/unlock the bdev by himself.

Change-Id: I9a1e360399617b5a039dc5353097ab525c7eb964
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471475
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 17:09:57 +00:00
Chunyang Hui
36c9ac2dde bdev/opal: Add rpc for init, revert and get info
Add bdev_nvme_opal_init, bdev_nvme_opal_revert,
bdev_opal_get_info rpc commands.

Change-Id: Ib53492c02a1c18603834640d23f9fb2e7eb08657
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468917
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-24 17:09:57 +00:00
Chunyang Hui
0a18f228c3 opal: Add rpc for create and delete opal bdev
Change-Id: Ic2cbe079aa16d839b92fc4d0b3ee64c061fa2d3e
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468191
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-24 17:09:57 +00:00
Karol Latecki
2f05fbb6d1 spdkcli: fix pylint warnings
Fix Python code for warning produced by pylint.

- C1801: Do not use `len(SEQUENCE)` to determine
	if a sequence is empty (len-as-condition)
- W0611: Unused import * (unused-import)
- C0411: standard import should be placed before X
	(wrong-import-order)
- C0411: third party import X should be placed before X
	(wrong-import-order)
- C0412: Imports from package X are not grouped
	(ungrouped-imports)
- W0212: Access to a protected member _exit of a
	client class (protected-access)

Change-Id: I2c0e8379f962eb2957b428617836867b2e725aeb
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471482
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-22 17:23:00 +00:00
Marcin Dziegielewski
20894340f2 lib/bdev/ocf: update of ocf library to version 19.06
This path updates ocf library to version 19.06 and also introduces
all necessary changes required to integrate ocf bdev adapter with
new version of ocf.

Summary of changes introduces with new OCF in ocf bdev:
- ocf_env.h increased limit for memory operations, changed behaviour
of strncpy to less restrictive, both changes are required to run new OCF
- ctx.c changed functions to new from new OCF
- added new cache mode "write only"
- added missed cache modes wa and wi to RPC scripts
- rewritten spdk_rpc_bdev_ocf_get_stats function to use asynhronus
ocf_mngt_cache_read_lock
- used new asynhronus ocf_mngt_cache_flush instead of waiting for request
- removed no longer valid filed - cfg->device.min_free_ram
- changed expected result in metadata_probe_cb

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: I83e4335e16600e4d22e6bb517931102de42d39e9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468132
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-22 17:22:41 +00:00
Maciej Wawryk
c73eb6a02a test: Shellcheck - correct rule: read lines rather than words
Correct shellcheck rule SC2013: To read lines rather than
words, pipe/redirect to a 'while read' loop.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I01c0dcf045fc131ce0cfa672e5ede0b881a47406
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471433
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-10-17 16:22:50 +00:00
Pawel Kaminski
e0f2a6e3ea test: Shellcheck - move rule SC2174 to exception list
When used mkdir with -p, -m only applies to the deepest directory.

Change-Id: Ibbc2dc47cdae82d38e3141c8a7df59ed709fe334
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468367
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-10-17 16:21:32 +00:00
Maciej Wawryk
7c4bb5e2c3 test: Shellcheck - correct rule: Argument mixes string and array
Correct shellcheck rule SC2145: Argument mixes string and
array. Use * or separate argument.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I45102ead2e97cc1d6b11c21f269e58a235055c35
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470926
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-10-16 15:51:31 +00:00
Maciej Wawryk
60bb3b3e2f test: Shellcheck - include check SC2146
Remove from shellcheck excluded SC2146: This action ignores
everything before the -o. Use \( \) to group.
This warning is not actually present in any of spdk/spdk scripts.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I62549107516853d8394fff8bcb36584df9e39ac1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470924
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-10-16 15:51:31 +00:00
Maciej Wawryk
9d3742e0cb test: Shellcheck - include check SC1001
Remove from shellcheck excluded SC1001: This \o will
be a regular 'o' in this context.
This warning is not actually present in any of spdk/spdk scripts.
Additionally clean up shellcheck exclude list.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ia9a9ec9383df02702397072172830fb147effe81
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470913
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-10-16 15:51:31 +00:00
Maciej Wawryk
782f587703 test: Shellcheck - include check SC1003
Remove from shellcheck excluded SC1003: Want to escape
a single quote? echo 'This is how it'\''s done'.
This warning is not actually present in any of spdk/spdk scripts.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ib5175941178e4d1b46c3835a98d90d6dd427a035
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470912
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-10-16 15:51:31 +00:00
Maciej Wawryk
349611fd09 test: Shellcheck - include check SC1113
Remove from shellcheck excluded SC1113: Use #!, not just #, for the shebang.
This warning is not actually present in any of spdk/spdk scripts.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I77cc1bd3ca6817823bf6fabf82a2991d734cd824
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470906
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-10-16 15:51:31 +00:00
Maciej Wawryk
28021d2af3 test: Shellcheck - ignore SC2001 warnings
Add to permanently excluded in shellcheck:
	^SC2001: See if you can use ${variable//search/replace} instead.
In some cases we need more complex sed substitution than only replacing string.
For example: test_stack=$(echo "$test_stack" | sed -e 's@;[^;]*$@@')

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I3e997af5232d8b15518fd54528b2e51e75a19d8c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470903
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-16 15:51:31 +00:00
Maciej Wawryk
a3c90994bd test: Shellcheck - correct rule: expr is antiquated
Correct shellcheck rule SC2003: expr is antiquated.
Consider rewriting this using $((..)), ${} or .

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I98a677cce7a1ffdfa5e1cf417a128900fba64124
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470902
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-16 15:51:31 +00:00
Maciej Wawryk
4b3a6e876c test: Shellcheck - correct rule: Useless echo
Correct shellcheck rule SC2005: Useless echo?
Instead of echo $(cmd), just use cmd

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I60c05915691a339cced6d4e3694514857b2d1c4e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470899
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-16 15:51:31 +00:00
Maciej Wawryk
f1131f1d19 test: Shellcheck - correct rule: loops over find output are fragile
Correct shellcheck rule SC2044: For loops over find output
are fragile. Use find -exec or a while read loop.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I3fd84ab60daab7c6971769ff4dee8a24d5d3e1bb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470746
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-16 15:51:31 +00:00
yidong0635
912ddafe94 test/ceph : Update script to fix some issues.
1. Remove created dir name with "/".
2. Compatible with upper version of ceph-authtool without --set-uid, let it run as default.
3. Fix error on ceph 12.*.*

This is to fix issue #980 which blocks by ceph-authtool.
If there's still other issue, should append fix.

Change-Id: Icd7fb4177a75a731ae3d4d5fc51cef16eeab282f
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470915
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-15 16:30:30 +00:00
Pawel Kaminski
1c2291bab9 test: Shellcheck - move rule SC2206 to permanent exception list
Quote to prevent word splitting/globbing,
or split robustly with mapfile or read -a.

Change-Id: I8d971216056580921ce07baa24e6ceaceffcceae
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467679
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2019-10-15 16:28:00 +00:00
Pawel Kaminski
f62c4d23f2 test: Shellcheck - move rule SC2207 to permanent exception list
Prefer mapfile or read -a to split
command output (or quote to avoid splitting).

We know the behaviour of commands that break the SC2207 rule.
They shouldn't invoke the shell's sloppy word splitting and glob expansion.
E.g. Code: stats=($(cat /sys/block/$dev/stat))
according to SC2207 rule could look like:
IFS=" " read -r -a stats <<< "$(cat /sys/block/$dev/stat))"
Stat file contains one simple line with entries separated by commas
so present code is enough to define statistics for dev.

Change-Id: Ia929d76461c9fcff425f69d2faf4405631e60239
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467325
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-15 16:28:00 +00:00
Pawel Kaminski
4d6ff5a868 test: Shellcheck - remove rule SC2231 from exception list
There was no occurrences in code that doesn't meet this rule

SC2231: Quote expansions in this for loop glob
to prevent wordsplitting, e.g. "$dir"/*.txt .

Change-Id: I9293459dd6bea401f675a7af379db25f48664f25
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469106
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-15 16:28:00 +00:00
Pawel Kaminski
117710eed1 test: Shellcheck - move rule SC2223 to permanent exception list.
This rule won't be used in bash scripts and will be added to exception list.
SC2223 - This default assignment may cause DoS due to globbing. Quote it.

Change-Id: I0d4b0bc697e42bb4bc1d77db5b28a469cdb887ec
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466836
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-10-15 16:28:00 +00:00
Xiaodong Liu
9c6e742679 blobfs: add blobfs_mount RPC as FUSE
This RPC method will mount blobfs on bdev to one host
path through FUSE. Then on the host path, user can
directly do some file operations which will be mapped
to blobfs.

Note:
* The FUSE mount of blobfs can be umounted directly by
SHELL umount or fusermount command.

Change-Id: I7c322d978b39bbc7255fced345a749ad5bfa7077
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468777
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-10-15 16:25:09 +00:00
Pawel Kaminski
4c13df5116 test: Shellcheck - apply rule SC2214
This case is not specified by getopts.

Change-Id: Id292af4f926856af849d2f97fd0a570e4505832b
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467288
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-11 18:46:21 +00:00
Maciej Wawryk
1220a78c6e test: Shellcheck - correct rule: This loop will only ever run once
Correct shellcheck rule SC2043: This loop will only ever
run once for a constant value. Did you perhaps mean to
loop over dir/*, $var or $(cmd)?"

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If8de0a81ea889a04b8fea646fedc0a2cfe49d5f7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470737
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-11 18:46:07 +00:00
Maciej Wawryk
ee8299caa0 scripts: fixed failing ceph on fedora29
There was issue with failing rbd_autotest on vm fedora29.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ic8db722903d483d288b62c8b7c54671a4142be01
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470855
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-11 18:45:30 +00:00
Pawel Kaminski
d7c00c1725 rpc: Rename construct_vhost_blk_controller to vhost_create_blk_controller
Change-Id: I49e5a24f89566ecf95e2df15e43d589f7ef3badb
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469861
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-10 16:19:56 +00:00
Pawel Kaminski
31e77a7331 rpc: Rename delete_nvme_controller to bdev_nvme_detach_controller
Change-Id: I1402fcb24a779e7af3d108c91a0abcc09082410b
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466144
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-10-10 16:19:33 +00:00
John Kariuki
f161e76dff scripts/perf/nvmf: remove hard-coded fio directory
Added Initiator configuration option to point to the
fio source directory used when compiling SPDK with the --with-fio
option and run SPDK test with the fio plugin.

Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Change-Id: I097cb17691a72d7c2a0e198dccd12cf3d1c3474c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468890
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-10-10 16:19:23 +00:00
paul luse
ae80025286 iscsi: minor grammar fixup
In a couple of docs and a .py file, saw while reviewing name changes.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I6a8b579ca692cdf6df1024e42eee76de5bde1227
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467715
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-09 14:38:59 +00:00
Pawel Kaminski
08278bf97f test: Shellcheck - apply rule SC1010.
Use semicolon or linefeed before 'done' (or quote to make it literal).

Change-Id: I90c01e643fae41dd9961f2314a076a0bac1e6aff
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466904
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-09 14:37:40 +00:00
Pawel Kaminski
2976fbd2a3 rpc: rename get_vhost_controllers to vhost_get_controllers
Change-Id: I597da89241c221e82f11cf843d1e726613b9a768
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469869
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-09 14:36:41 +00:00
Maciej Wawryk
cb061b8e2b test: Shellcheck - include check SC2039
Remove from shellcheck excluded SC2039: In POSIX sh, something is undefined.
This warning is not actually present in any of spdk/spdk scripts.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I473e9307d909695184969563ef082720fa593759
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470732
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-09 14:28:21 +00:00
Maciej Wawryk
b854d55806 test: Shellcheck - correct rule: Use ./*glob*
Correct shellcheck rule SC2035: Use ./*glob* or
-- *glob* so names with dashes won't become options.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If41cc6c4571b78ab7533a8156239bc879fab0216
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470731
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-09 14:28:21 +00:00
Maciej Wawryk
f724ce0caa test: Shellcheck - include check SC2031
Remove from shellcheck excluded SC2031: var was modified in
a subshell. That change might be lost.
This warning is not actually present in any of spdk/spdk scripts.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I17ec872ee5571089bbe40e8d51b06d70be70feb2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470729
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-09 14:28:21 +00:00
Maciej Wawryk
e65518d1a0 test: Shellcheck - include check SC2030
Remove from shellcheck excluded SC2030: Modification
of var is local (to subshell caused by pipeline).
This warning is not actually present in any of spdk/spdk scripts.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I3bcf6857a9fa5edfcdfa1b7f13eb704ac552d3f7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470645
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-09 14:28:21 +00:00
Maciej Wawryk
1db9e184e7 test: Shellcheck - correct rule: surrounding quotes actually unquote this
Correct shellcheck rule SC2027: The surrounding quotes actually
unquote this. Remove or escape them.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ib17ee98920790da6aa1c8e02abc58c9365bb0e91
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470634
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-09 14:28:21 +00:00
Xiaodong Liu
6433c1037d blobfs: add blobfs_create RPC as mkfs
Following test/blobfs/mkfs case, add it as one RPC
method to let build a new blobfs on given block
device.

Change-Id: I0ffbb1add95dfbc8655e0238ed6f3cd519dd945b
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466485
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-10-09 05:02:00 +00:00