RPC: rename rpc destroy_lvol_store to bdev_lvol_delete_lvstore
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com> Change-Id: I4d10a4908c49366117e0e40d15a646716c7adcbf Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466723 Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> 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>
This commit is contained in:
parent
c57cd922a4
commit
4c04961853
@ -450,13 +450,13 @@ Example response
|
||||
}
|
||||
~~~
|
||||
|
||||
To delete lvol store user should use `destroy_lvol_store` RPC command.
|
||||
To delete lvol store user should use `bdev_lvol_delete_lvstore` RPC command.
|
||||
|
||||
Example commands
|
||||
|
||||
`rpc.py destroy_lvol_store -u 330a6ab2-f468-11e7-983e-001e67edf35d`
|
||||
`rpc.py bdev_lvol_delete_lvstore -u 330a6ab2-f468-11e7-983e-001e67edf35d`
|
||||
|
||||
`rpc.py destroy_lvol_store -l lvs`
|
||||
`rpc.py bdev_lvol_delete_lvstore -l lvs`
|
||||
|
||||
## Lvols {#bdev_ug_lvols}
|
||||
|
||||
|
@ -309,7 +309,7 @@ Example response:
|
||||
"bdev_lvol_clone",
|
||||
"bdev_lvol_snapshot",
|
||||
"bdev_lvol_create",
|
||||
"destroy_lvol_store",
|
||||
"bdev_lvol_delete_lvstore",
|
||||
"rename_lvol_store",
|
||||
"construct_lvol_store"
|
||||
]
|
||||
@ -4814,7 +4814,7 @@ Example response:
|
||||
}
|
||||
~~~
|
||||
|
||||
## destroy_lvol_store {#rpc_destroy_lvol_store}
|
||||
## bdev_lvol_delete_lvstore {#rpc_bdev_lvol_delete_lvstore}
|
||||
|
||||
Destroy a logical volume store.
|
||||
|
||||
@ -4834,7 +4834,7 @@ Example request:
|
||||
~~~
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "destroy_lvol_store",
|
||||
"method": "bdev_lvol_delete_lvstore",
|
||||
"id": 1
|
||||
"params": {
|
||||
"uuid": "a9959197-b5e2-4f2d-8095-251ffb6985a5"
|
||||
|
@ -90,7 +90,7 @@ construct_lvol_store [-h] [-c CLUSTER_SZ] bdev_name lvs_name
|
||||
-h show help
|
||||
-c CLUSTER_SZ Specifies the size of cluster. By default its 4MiB.
|
||||
--clear-method specify data region clear method "none", "unmap" (default), "write_zeroes"
|
||||
destroy_lvol_store [-h] [-u UUID] [-l LVS_NAME]
|
||||
bdev_lvol_delete_lvstore [-h] [-u UUID] [-l LVS_NAME]
|
||||
Destroy lvolstore on specified bdev. Removes lvolstore along with lvols on
|
||||
it. User can identify lvol store by UUID or its name. Note that destroying
|
||||
lvolstore requires using this call, while deleting single lvol requires
|
||||
|
@ -237,21 +237,21 @@ cleanup:
|
||||
}
|
||||
SPDK_RPC_REGISTER("rename_lvol_store", spdk_rpc_rename_lvol_store, SPDK_RPC_RUNTIME)
|
||||
|
||||
struct rpc_destroy_lvol_store {
|
||||
struct rpc_bdev_lvol_delete_lvstore {
|
||||
char *uuid;
|
||||
char *lvs_name;
|
||||
};
|
||||
|
||||
static void
|
||||
free_rpc_destroy_lvol_store(struct rpc_destroy_lvol_store *req)
|
||||
free_rpc_bdev_lvol_delete_lvstore(struct rpc_bdev_lvol_delete_lvstore *req)
|
||||
{
|
||||
free(req->uuid);
|
||||
free(req->lvs_name);
|
||||
}
|
||||
|
||||
static const struct spdk_json_object_decoder rpc_destroy_lvol_store_decoders[] = {
|
||||
{"uuid", offsetof(struct rpc_destroy_lvol_store, uuid), spdk_json_decode_string, true},
|
||||
{"lvs_name", offsetof(struct rpc_destroy_lvol_store, lvs_name), spdk_json_decode_string, true},
|
||||
static const struct spdk_json_object_decoder rpc_bdev_lvol_delete_lvstore_decoders[] = {
|
||||
{"uuid", offsetof(struct rpc_bdev_lvol_delete_lvstore, uuid), spdk_json_decode_string, true},
|
||||
{"lvs_name", offsetof(struct rpc_bdev_lvol_delete_lvstore, lvs_name), spdk_json_decode_string, true},
|
||||
};
|
||||
|
||||
static void
|
||||
@ -275,15 +275,15 @@ invalid:
|
||||
}
|
||||
|
||||
static void
|
||||
spdk_rpc_destroy_lvol_store(struct spdk_jsonrpc_request *request,
|
||||
spdk_rpc_bdev_lvol_delete_lvstore(struct spdk_jsonrpc_request *request,
|
||||
const struct spdk_json_val *params)
|
||||
{
|
||||
struct rpc_destroy_lvol_store req = {};
|
||||
struct rpc_bdev_lvol_delete_lvstore req = {};
|
||||
struct spdk_lvol_store *lvs = NULL;
|
||||
int rc;
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_destroy_lvol_store_decoders,
|
||||
SPDK_COUNTOF(rpc_destroy_lvol_store_decoders),
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_delete_lvstore_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_delete_lvstore_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
@ -300,9 +300,10 @@ spdk_rpc_destroy_lvol_store(struct spdk_jsonrpc_request *request,
|
||||
vbdev_lvs_destruct(lvs, _spdk_rpc_lvol_store_destroy_cb, request);
|
||||
|
||||
cleanup:
|
||||
free_rpc_destroy_lvol_store(&req);
|
||||
free_rpc_bdev_lvol_delete_lvstore(&req);
|
||||
}
|
||||
SPDK_RPC_REGISTER("destroy_lvol_store", spdk_rpc_destroy_lvol_store, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("bdev_lvol_delete_lvstore", spdk_rpc_bdev_lvol_delete_lvstore, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_lvol_delete_lvstore, destroy_lvol_store)
|
||||
|
||||
struct rpc_bdev_lvol_create {
|
||||
char *uuid;
|
||||
|
@ -1277,15 +1277,16 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
p.add_argument('name', help='lvol bdev name')
|
||||
p.set_defaults(func=bdev_lvol_delete)
|
||||
|
||||
def destroy_lvol_store(args):
|
||||
rpc.lvol.destroy_lvol_store(args.client,
|
||||
def bdev_lvol_delete_lvstore(args):
|
||||
rpc.lvol.bdev_lvol_delete_lvstore(args.client,
|
||||
uuid=args.uuid,
|
||||
lvs_name=args.lvs_name)
|
||||
|
||||
p = subparsers.add_parser('destroy_lvol_store', help='Destroy an logical volume store')
|
||||
p = subparsers.add_parser('bdev_lvol_delete_lvstore', aliases=['destroy_lvol_store'],
|
||||
help='Destroy an logical volume store')
|
||||
p.add_argument('-u', '--uuid', help='lvol store UUID', required=False)
|
||||
p.add_argument('-l', '--lvs-name', help='lvol store name', required=False)
|
||||
p.set_defaults(func=destroy_lvol_store)
|
||||
p.set_defaults(func=bdev_lvol_delete_lvstore)
|
||||
|
||||
def bdev_lvol_get_lvstores(args):
|
||||
print_dict(rpc.lvol.bdev_lvol_get_lvstores(args.client,
|
||||
|
@ -184,7 +184,8 @@ def bdev_lvol_decouple_parent(client, name):
|
||||
return client.call('bdev_lvol_decouple_parent', params)
|
||||
|
||||
|
||||
def destroy_lvol_store(client, uuid=None, lvs_name=None):
|
||||
@deprecated_alias('destroy_lvol_store')
|
||||
def bdev_lvol_delete_lvstore(client, uuid=None, lvs_name=None):
|
||||
"""Destroy a logical volume store.
|
||||
|
||||
Args:
|
||||
@ -201,7 +202,7 @@ def destroy_lvol_store(client, uuid=None, lvs_name=None):
|
||||
params['uuid'] = uuid
|
||||
if lvs_name:
|
||||
params['lvs_name'] = lvs_name
|
||||
return client.call('destroy_lvol_store', params)
|
||||
return client.call('bdev_lvol_delete_lvstore', params)
|
||||
|
||||
|
||||
@deprecated_alias('get_lvol_stores')
|
||||
|
@ -92,7 +92,7 @@ class UILvolStores(UINode):
|
||||
if name is None and uuid is None:
|
||||
self.shell.log.error("Please specify one of the identifiers: "
|
||||
"lvol store name or UUID")
|
||||
self.get_root().delete_lvol_store(lvs_name=name, uuid=uuid)
|
||||
self.get_root().bdev_lvol_delete_lvstore(lvs_name=name, uuid=uuid)
|
||||
|
||||
def ui_command_create(self, name, bdev_name, cluster_size=None):
|
||||
"""
|
||||
|
@ -202,8 +202,8 @@ class UIRoot(UINode):
|
||||
return response
|
||||
|
||||
@verbose
|
||||
def delete_lvol_store(self, **kwargs):
|
||||
rpc.lvol.destroy_lvol_store(self.client, **kwargs)
|
||||
def bdev_lvol_delete_lvstore(self, **kwargs):
|
||||
rpc.lvol.bdev_lvol_delete_lvstore(self.client, **kwargs)
|
||||
|
||||
@verbose
|
||||
def create_pmem_pool(self, **kwargs):
|
||||
|
@ -65,7 +65,7 @@ $rootdir/test/bdev/bdevperf/bdevperf.py perform_tests
|
||||
|
||||
# now cleanup the vols, deleting the compression vol also deletes the pmem file
|
||||
$rpc_py bdev_compress_delete COMP_lvs0/lv0
|
||||
$rpc_py destroy_lvol_store -l lvs0
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvs0
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
killprocess $bdevperf_pid
|
||||
|
@ -19,7 +19,7 @@ function remove_backends() {
|
||||
$rpc_py bdev_lvol_delete "lvs_0/lbd_0"
|
||||
|
||||
echo "INFO: Removing lvol stores"
|
||||
$rpc_py destroy_lvol_store -l lvs_0
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvs_0
|
||||
|
||||
echo "INFO: Removing NVMe"
|
||||
$rpc_py delete_nvme_controller Nvme0
|
||||
|
@ -25,7 +25,7 @@ function remove_backends() {
|
||||
sleep 1
|
||||
|
||||
echo "INFO: Removing lvol stores"
|
||||
$rpc_py destroy_lvol_store -l lvs0
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvs0
|
||||
echo "INFO: lvol store lvs0 removed"
|
||||
|
||||
echo "INFO: Removing NVMe"
|
||||
|
@ -255,7 +255,7 @@ function cleanup_bdev_subsystem_config() {
|
||||
tgt_rpc bdev_lvol_delete lvs_test/clone0
|
||||
tgt_rpc bdev_lvol_delete lvs_test/lvol0
|
||||
tgt_rpc bdev_lvol_delete lvs_test/snapshot0
|
||||
tgt_rpc destroy_lvol_store -l lvs_test
|
||||
tgt_rpc bdev_lvol_delete_lvstore -l lvs_test
|
||||
fi
|
||||
|
||||
if [[ $(uname -s) = Linux ]]; then
|
||||
|
@ -32,13 +32,13 @@ function usage() {
|
||||
150: 'bdev_lvol_resize_positive',
|
||||
200: 'resize_logical_volume_nonexistent_logical_volume',
|
||||
201: 'resize_logical_volume_with_size_out_of_range',
|
||||
250: 'destroy_lvol_store_positive',
|
||||
251: 'destroy_lvol_store_use_name_positive',
|
||||
252: 'destroy_lvol_store_with_lvol_bdev_positive',
|
||||
250: 'bdev_lvol_delete_lvstore_positive',
|
||||
251: 'bdev_lvol_delete_lvstore_use_name_positive',
|
||||
252: 'bdev_lvol_delete_lvstore_with_lvol_bdev_positive',
|
||||
253: 'destroy_multi_logical_volumes_positive',
|
||||
254: 'destroy_after_bdev_lvol_resize_positive',
|
||||
255: 'delete_lvol_store_persistent_positive',
|
||||
300: 'destroy_lvol_store_nonexistent_lvs_uuid',
|
||||
300: 'bdev_lvol_delete_lvstore_nonexistent_lvs_uuid',
|
||||
301: 'delete_lvol_store_underlying_bdev',
|
||||
350: 'nested_destroy_logical_volume_negative',
|
||||
400: 'nested_construct_logical_volume_positive',
|
||||
@ -48,7 +48,7 @@ function usage() {
|
||||
500: 'nested_bdev_lvol_create_on_full_lvol_store',
|
||||
550: 'delete_bdev_positive',
|
||||
551: 'delete_lvol_bdev',
|
||||
552: 'destroy_lvol_store_with_clones',
|
||||
552: 'bdev_lvol_delete_lvstore_with_clones',
|
||||
553: 'unregister_lvol_bdev',
|
||||
600: 'construct_lvol_store_with_cluster_size_max',
|
||||
601: 'construct_lvol_store_with_cluster_size_min',
|
||||
|
@ -139,14 +139,14 @@ class Commands_Rpc(object):
|
||||
output = self.rpc.bdev_lvol_create(name_opt, uuid, lbd_name, size, thin_provisioned)[0]
|
||||
return output.rstrip('\n')
|
||||
|
||||
def destroy_lvol_store(self, uuid):
|
||||
print("INFO: RPC COMMAND destroy_lvol_store")
|
||||
def bdev_lvol_delete_lvstore(self, uuid):
|
||||
print("INFO: RPC COMMAND bdev_lvol_delete_lvstore")
|
||||
try:
|
||||
uuid_obj = UUID(uuid)
|
||||
name_opt = "-u"
|
||||
except ValueError:
|
||||
name_opt = "-l"
|
||||
output, rc = self.rpc.destroy_lvol_store(name_opt, uuid)
|
||||
output, rc = self.rpc.bdev_lvol_delete_lvstore(name_opt, uuid)
|
||||
return rc
|
||||
|
||||
def delete_malloc_bdev(self, base_name):
|
||||
|
@ -126,15 +126,15 @@ def case_message(func):
|
||||
# resize lvol store - negative tests
|
||||
200: 'resize_logical_volume_nonexistent_logical_volume',
|
||||
201: 'resize_logical_volume_with_size_out_of_range',
|
||||
# destroy_lvol_store - positive tests
|
||||
250: 'destroy_lvol_store_positive',
|
||||
251: 'destroy_lvol_store_use_name_positive',
|
||||
252: 'destroy_lvol_store_with_lvol_bdev_positive',
|
||||
# bdev_lvol_delete_lvstore - positive tests
|
||||
250: 'bdev_lvol_delete_lvstore_positive',
|
||||
251: 'bdev_lvol_delete_lvstore_use_name_positive',
|
||||
252: 'bdev_lvol_delete_lvstore_with_lvol_bdev_positive',
|
||||
253: 'destroy_multi_logical_volumes_positive',
|
||||
254: 'destroy_after_bdev_lvol_resize_positive',
|
||||
255: 'delete_lvol_store_persistent_positive',
|
||||
# destroy_lvol_store - negative tests
|
||||
300: 'destroy_lvol_store_nonexistent_lvs_uuid',
|
||||
# bdev_lvol_delete_lvstore - negative tests
|
||||
300: 'bdev_lvol_delete_lvstore_nonexistent_lvs_uuid',
|
||||
301: 'delete_lvol_store_underlying_bdev',
|
||||
# construct_lvol_store - negative tests
|
||||
450: 'construct_lvs_nonexistent_bdev',
|
||||
@ -144,7 +144,7 @@ def case_message(func):
|
||||
500: 'nested_bdev_lvol_create_on_full_lvol_store',
|
||||
550: 'delete_bdev_positive',
|
||||
551: 'delete_lvol_bdev',
|
||||
552: 'destroy_lvol_store_with_clones',
|
||||
552: 'bdev_lvol_delete_lvstore_with_clones',
|
||||
553: 'unregister_lvol_bdev',
|
||||
600: 'construct_lvol_store_with_cluster_size_max',
|
||||
601: 'construct_lvol_store_with_cluster_size_min',
|
||||
@ -332,7 +332,7 @@ class TestCases(object):
|
||||
# Check correct uuid values in response bdev_lvol_get_lvstores command
|
||||
fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store,
|
||||
self.cluster_size)
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
self.c.delete_malloc_bdev(base_name)
|
||||
if self.c.check_bdev_lvol_get_lvstores("", "", "") == 1:
|
||||
fail_count += 1
|
||||
@ -371,7 +371,7 @@ class TestCases(object):
|
||||
fail_count += self.c.check_get_bdevs_methods(uuid_bdev,
|
||||
lvs_size)
|
||||
self.c.bdev_lvol_delete(uuid_bdev)
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
# Expected result:
|
||||
@ -417,7 +417,7 @@ class TestCases(object):
|
||||
for uuid_bdev in uuid_bdevs:
|
||||
self.c.bdev_lvol_delete(uuid_bdev)
|
||||
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
# Expected result:
|
||||
@ -454,7 +454,7 @@ class TestCases(object):
|
||||
lvs_size)
|
||||
|
||||
fail_count += self.c.bdev_lvol_delete(uuid_bdev)
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
# Expected result:
|
||||
@ -503,8 +503,8 @@ class TestCases(object):
|
||||
|
||||
fail_count += self.c.bdev_lvol_delete(uuid_bdev_1)
|
||||
fail_count += self.c.bdev_lvol_delete(uuid_bdev_2)
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store_1)
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store_2)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store_1)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store_2)
|
||||
fail_count += self.c.delete_malloc_bdev(base_name_1)
|
||||
fail_count += self.c.delete_malloc_bdev(base_name_2)
|
||||
|
||||
@ -568,7 +568,7 @@ class TestCases(object):
|
||||
fail_count += 1
|
||||
|
||||
self.c.bdev_lvol_delete(uuid_bdev)
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
# Expected result:
|
||||
@ -611,7 +611,7 @@ class TestCases(object):
|
||||
fail_count += 1
|
||||
|
||||
self.c.bdev_lvol_delete(uuid_bdev)
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
# Expected results:
|
||||
@ -667,7 +667,7 @@ class TestCases(object):
|
||||
fail_count += self.c.check_get_bdevs_methods(uuid_bdev, size)
|
||||
|
||||
self.c.bdev_lvol_delete(uuid_bdev)
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
self.c.delete_malloc_bdev(base_name)
|
||||
# Expected result:
|
||||
# - lvol bdev should change size after resize operations
|
||||
@ -725,7 +725,7 @@ class TestCases(object):
|
||||
fail_count += 1
|
||||
|
||||
self.c.bdev_lvol_delete(uuid_bdev)
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
# Expected result:
|
||||
@ -738,10 +738,10 @@ class TestCases(object):
|
||||
@case_message
|
||||
def test_case250(self):
|
||||
"""
|
||||
destroy_lvol_store_positive
|
||||
bdev_lvol_delete_lvstore_positive
|
||||
|
||||
Positive test for destroying a logical volume store.
|
||||
Call destroy_lvol_store with correct logical_volumes name
|
||||
Call bdev_lvol_delete_lvstore with correct logical_volumes name
|
||||
"""
|
||||
# Construct malloc bdev
|
||||
base_name = self.c.bdev_malloc_create(self.total_size,
|
||||
@ -753,7 +753,7 @@ class TestCases(object):
|
||||
fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store,
|
||||
self.cluster_size)
|
||||
# Destroy lvol store
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Check correct response bdev_lvol_get_lvstores command
|
||||
if self.c.check_bdev_lvol_get_lvstores("", "", "") == 1:
|
||||
fail_count += 1
|
||||
@ -768,11 +768,11 @@ class TestCases(object):
|
||||
@case_message
|
||||
def test_case251(self):
|
||||
"""
|
||||
destroy_lvol_store_use_name_positive
|
||||
bdev_lvol_delete_lvstore_use_name_positive
|
||||
|
||||
Positive test for destroying a logical volume store using
|
||||
lvol store name instead of uuid for reference.
|
||||
Call destroy_lvol_store with correct logical volume name
|
||||
Call bdev_lvol_delete_lvstore with correct logical volume name
|
||||
"""
|
||||
# Create malloc bdev
|
||||
base_name = self.c.bdev_malloc_create(self.total_size,
|
||||
@ -784,7 +784,7 @@ class TestCases(object):
|
||||
fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store,
|
||||
self.cluster_size)
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(self.lvs_name)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(self.lvs_name)
|
||||
# Check correct response bdev_lvol_get_lvstores command
|
||||
if self.c.check_bdev_lvol_get_lvstores("", "", "") == 1:
|
||||
fail_count += 1
|
||||
@ -799,11 +799,11 @@ class TestCases(object):
|
||||
@case_message
|
||||
def test_case252(self):
|
||||
"""
|
||||
destroy_lvol_store_with_lvol_bdev_positive
|
||||
bdev_lvol_delete_lvstore_with_lvol_bdev_positive
|
||||
|
||||
Positive test for destroying a logical volume store with lvol bdev
|
||||
created on top.
|
||||
Call destroy_lvol_store with correct logical_volumes name
|
||||
Call bdev_lvol_delete_lvstore with correct logical_volumes name
|
||||
"""
|
||||
# Create malloc bdev
|
||||
base_name = self.c.bdev_malloc_create(self.total_size,
|
||||
@ -823,7 +823,7 @@ class TestCases(object):
|
||||
fail_count += self.c.check_get_bdevs_methods(uuid_bdev,
|
||||
lvs_size)
|
||||
# Destroy lvol store
|
||||
if self.c.destroy_lvol_store(uuid_store) != 0:
|
||||
if self.c.bdev_lvol_delete_lvstore(uuid_store) != 0:
|
||||
fail_count += 1
|
||||
|
||||
# Check correct response bdev_lvol_get_lvstores command
|
||||
@ -866,7 +866,7 @@ class TestCases(object):
|
||||
fail_count += self.c.check_get_bdevs_methods(uuid_bdev, size)
|
||||
|
||||
# Destroy lvol store
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Check correct response bdev_lvol_get_lvstores command
|
||||
if self.c.check_bdev_lvol_get_lvstores("", "", "") == 1:
|
||||
fail_count += 1
|
||||
@ -885,7 +885,7 @@ class TestCases(object):
|
||||
destroy_resize_logical_volume_positive
|
||||
|
||||
Positive test for destroying a logical_volume after resizing.
|
||||
Call destroy_lvol_store with correct logical_volumes name.
|
||||
Call bdev_lvol_delete_lvstore with correct logical_volumes name.
|
||||
"""
|
||||
# Create malloc bdev
|
||||
base_name = self.c.bdev_malloc_create(self.total_size,
|
||||
@ -935,7 +935,7 @@ class TestCases(object):
|
||||
fail_count += self.c.check_get_bdevs_methods(uuid_bdev, sz)
|
||||
|
||||
# Destroy lvol store
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
if self.c.check_bdev_lvol_get_lvstores("", "", "") == 1:
|
||||
fail_count += 1
|
||||
self.c.delete_malloc_bdev(base_name)
|
||||
@ -965,7 +965,7 @@ class TestCases(object):
|
||||
fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store,
|
||||
self.cluster_size)
|
||||
# Destroy lvol store
|
||||
if self.c.destroy_lvol_store(self.lvs_name) != 0:
|
||||
if self.c.bdev_lvol_delete_lvstore(self.lvs_name) != 0:
|
||||
fail_count += 1
|
||||
|
||||
# Delete aio bdev
|
||||
@ -991,14 +991,14 @@ class TestCases(object):
|
||||
@case_message
|
||||
def test_case300(self):
|
||||
"""
|
||||
destroy_lvol_store_nonexistent_lvs_uuid
|
||||
bdev_lvol_delete_lvstore_nonexistent_lvs_uuid
|
||||
|
||||
Call destroy_lvol_store with nonexistent logical_volumes name
|
||||
Call bdev_lvol_delete_lvstore with nonexistent logical_volumes name
|
||||
exist in configuration.
|
||||
"""
|
||||
fail_count = 0
|
||||
# try to call destroy_lvol_store with lvs_uuid which does not exist
|
||||
if self.c.destroy_lvol_store(self._gen_lvs_uuid()) == 0:
|
||||
# try to call bdev_lvol_delete_lvstore with lvs_uuid which does not exist
|
||||
if self.c.bdev_lvol_delete_lvstore(self._gen_lvs_uuid()) == 0:
|
||||
fail_count += 1
|
||||
|
||||
# Expected result:
|
||||
@ -1011,7 +1011,7 @@ class TestCases(object):
|
||||
"""
|
||||
delete_lvol_store_underlying_bdev
|
||||
|
||||
Call destroy_lvol_store after deleting it's base bdev.
|
||||
Call bdev_lvol_delete_lvstore after deleting it's base bdev.
|
||||
Lvol store should be automatically removed on deleting underlying bdev.
|
||||
"""
|
||||
# Create malloc bdev
|
||||
@ -1030,11 +1030,11 @@ class TestCases(object):
|
||||
|
||||
# Try to destroy lvol store. This call should fail as lvol store
|
||||
# is no longer present
|
||||
if self.c.destroy_lvol_store(uuid_store) == 0:
|
||||
if self.c.bdev_lvol_delete_lvstore(uuid_store) == 0:
|
||||
fail_count += 1
|
||||
|
||||
# Expected result:
|
||||
# - destroy_lvol_store return code != 0
|
||||
# - bdev_lvol_delete_lvstore return code != 0
|
||||
# - Error code: ENODEV ("No such device") response printed to stdout
|
||||
# - no other operation fails
|
||||
return fail_count
|
||||
@ -1080,7 +1080,7 @@ class TestCases(object):
|
||||
if self.c.construct_lvol_store(base_name,
|
||||
self.lvs_name) == 0:
|
||||
fail_count += 1
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
self.c.delete_malloc_bdev(base_name)
|
||||
return fail_count
|
||||
|
||||
@ -1114,7 +1114,7 @@ class TestCases(object):
|
||||
self.lvs_name) == 0:
|
||||
fail_count += 1
|
||||
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store_1)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store_1)
|
||||
fail_count += self.c.delete_malloc_bdev(base_name_1)
|
||||
fail_count += self.c.delete_malloc_bdev(base_name_2)
|
||||
|
||||
@ -1249,7 +1249,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(snapshot_bdev['name'])
|
||||
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
|
||||
# Check response bdev_lvol_get_lvstores command
|
||||
if self.c.check_bdev_lvol_get_lvstores("", "", "") == 1:
|
||||
@ -1265,7 +1265,7 @@ class TestCases(object):
|
||||
@case_message
|
||||
def test_case552(self):
|
||||
"""
|
||||
destroy_lvol_store_with_clones
|
||||
bdev_lvol_delete_lvstore_with_clones
|
||||
|
||||
Test for destroying lvol store with clones present,
|
||||
without removing them first.
|
||||
@ -1309,7 +1309,7 @@ class TestCases(object):
|
||||
fail_count += 1
|
||||
|
||||
# Destroy lvol store without deleting lvol bdevs
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
|
||||
# Check response bdev_lvol_get_lvstores command
|
||||
if self.c.check_bdev_lvol_get_lvstores("", "", "") == 1:
|
||||
@ -1534,7 +1534,7 @@ class TestCases(object):
|
||||
if free_clusters_start != free_clusters_end:
|
||||
fail_count += 1
|
||||
# destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# destroy malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
# Expected result:
|
||||
@ -1592,7 +1592,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev0['name'])
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev1['name'])
|
||||
# destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# destroy malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
# Expected result:
|
||||
@ -1634,7 +1634,7 @@ class TestCases(object):
|
||||
# destroy thin provisioned lvol bdev
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev['name'])
|
||||
# destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# destroy malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
# Expected result:
|
||||
@ -1707,7 +1707,7 @@ class TestCases(object):
|
||||
fail_count += 1
|
||||
|
||||
self.c.bdev_lvol_delete(uuid_bdev)
|
||||
self.c.destroy_lvol_store(uuid_store)
|
||||
self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
# Expected result:
|
||||
@ -1779,7 +1779,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev0['name'])
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev1['name'])
|
||||
# destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# destroy malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
# Expected result:
|
||||
@ -1837,7 +1837,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev0['name'])
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev1['name'])
|
||||
# destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# destroy malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
# Expected result:
|
||||
@ -1936,7 +1936,7 @@ class TestCases(object):
|
||||
for uuid_bdev in uuid_bdevs:
|
||||
self.c.bdev_lvol_delete(uuid_bdev)
|
||||
|
||||
if self.c.destroy_lvol_store(uuid_store) != 0:
|
||||
if self.c.bdev_lvol_delete_lvstore(uuid_store) != 0:
|
||||
fail_count += 1
|
||||
|
||||
uuid_bdevs = []
|
||||
@ -1957,7 +1957,7 @@ class TestCases(object):
|
||||
fail_count += self.c.check_get_bdevs_methods(uuid_bdev, size)
|
||||
|
||||
# Destroy lvol store
|
||||
if self.c.destroy_lvol_store(uuid_store) != 0:
|
||||
if self.c.bdev_lvol_delete_lvstore(uuid_store) != 0:
|
||||
fail_count += 1
|
||||
|
||||
self.c.bdev_aio_delete(base_name)
|
||||
@ -1991,7 +1991,7 @@ class TestCases(object):
|
||||
self.cluster_size) != 0:
|
||||
fail_count += 1
|
||||
# destroy lvol store from aio bdev
|
||||
if self.c.destroy_lvol_store(uuid_store) != 0:
|
||||
if self.c.bdev_lvol_delete_lvstore(uuid_store) != 0:
|
||||
fail_count += 1
|
||||
|
||||
self.c.bdev_aio_delete(base_name)
|
||||
@ -2110,10 +2110,10 @@ class TestCases(object):
|
||||
for uuid_bdev in uuid_bdevs:
|
||||
self.c.bdev_lvol_delete(uuid_bdev)
|
||||
|
||||
if self.c.destroy_lvol_store(uuid_store_1M) != 0:
|
||||
if self.c.bdev_lvol_delete_lvstore(uuid_store_1M) != 0:
|
||||
fail_count += 1
|
||||
|
||||
if self.c.destroy_lvol_store(uuid_store_32M) != 0:
|
||||
if self.c.bdev_lvol_delete_lvstore(uuid_store_32M) != 0:
|
||||
fail_count += 1
|
||||
|
||||
self.c.bdev_aio_delete(base_name_1M)
|
||||
@ -2163,7 +2163,7 @@ class TestCases(object):
|
||||
# Destroy snapshot
|
||||
fail_count += self.c.bdev_lvol_delete(snapshot_bdev['name'])
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Delete malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
@ -2238,7 +2238,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(self.lvs_name + "/" + snapshot_name0)
|
||||
fail_count += self.c.bdev_lvol_delete(self.lvs_name + "/" + snapshot_name1)
|
||||
# Destroy snapshot
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Delete malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
@ -2296,7 +2296,7 @@ class TestCases(object):
|
||||
# Delete snapshot
|
||||
fail_count += self.c.bdev_lvol_delete(self.lvs_name + "/" + snapshot_name)
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Delete malloc bdevs
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
@ -2341,7 +2341,7 @@ class TestCases(object):
|
||||
# Destroy snapshot
|
||||
fail_count += self.c.bdev_lvol_delete(self.lvs_name + "/" + snapshot_name0)
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Delete malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
@ -2403,7 +2403,7 @@ class TestCases(object):
|
||||
# Delete snapshot
|
||||
fail_count += self.c.bdev_lvol_delete(self.lvs_name + "/" + snapshot_name)
|
||||
# Delete lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Destroy malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
@ -2475,7 +2475,7 @@ class TestCases(object):
|
||||
# Delete snapshot
|
||||
fail_count += self.c.bdev_lvol_delete(snapshot_bdev['name'])
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Delete malloc
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
@ -2565,7 +2565,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(snapshot_bdev['name'])
|
||||
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
|
||||
# Delete malloc
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
@ -2655,7 +2655,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev['name'])
|
||||
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
|
||||
# Delete malloc
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
@ -2725,7 +2725,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev['name'])
|
||||
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
|
||||
# Delete malloc
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
@ -2828,7 +2828,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(snapshot_bdev['name'])
|
||||
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
|
||||
# Delete malloc
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
@ -2893,7 +2893,7 @@ class TestCases(object):
|
||||
# Destroy lvol bdev
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev['name'])
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Delete malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
@ -2971,7 +2971,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev['name'])
|
||||
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Delete malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
@ -3092,7 +3092,7 @@ class TestCases(object):
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_bdev['name'])
|
||||
|
||||
# Destroy lvol store
|
||||
fail_count += self.c.destroy_lvol_store(uuid_store)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store)
|
||||
# Delete malloc bdev
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
@ -3176,7 +3176,7 @@ class TestCases(object):
|
||||
# Delete configuration using names after rename operation
|
||||
for bdev in new_bdev_aliases:
|
||||
fail_count += self.c.bdev_lvol_delete(bdev)
|
||||
fail_count += self.c.destroy_lvol_store(new_lvs_name)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(new_lvs_name)
|
||||
fail_count += self.c.delete_malloc_bdev(base_name)
|
||||
|
||||
# Expected results:
|
||||
@ -3294,8 +3294,8 @@ class TestCases(object):
|
||||
# Clean configuration
|
||||
for lvol_uuid in bdev_uuids_1 + bdev_uuids_2:
|
||||
fail_count += self.c.bdev_lvol_delete(lvol_uuid)
|
||||
fail_count += self.c.destroy_lvol_store(lvs_uuid_1)
|
||||
fail_count += self.c.destroy_lvol_store(lvs_uuid_2)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(lvs_uuid_1)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(lvs_uuid_2)
|
||||
fail_count += self.c.delete_malloc_bdev(base_bdev_1)
|
||||
fail_count += self.c.delete_malloc_bdev(base_bdev_2)
|
||||
|
||||
@ -3369,7 +3369,7 @@ class TestCases(object):
|
||||
|
||||
fail_count += self.c.bdev_lvol_delete(bdev_uuid_1)
|
||||
fail_count += self.c.bdev_lvol_delete(bdev_uuid_2)
|
||||
fail_count += self.c.destroy_lvol_store(lvs_uuid)
|
||||
fail_count += self.c.bdev_lvol_delete_lvstore(lvs_uuid)
|
||||
fail_count += self.c.delete_malloc_bdev(base_bdev)
|
||||
|
||||
# Expected results:
|
||||
|
@ -71,9 +71,9 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
sync
|
||||
# Delete lvol_bdev and destroy lvol_store.
|
||||
$rpc_py bdev_lvol_delete lvs_n_0/lbd_nest_0
|
||||
$rpc_py destroy_lvol_store -l lvs_n_0
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvs_n_0
|
||||
$rpc_py bdev_lvol_delete lvs_0/lbd_0
|
||||
$rpc_py destroy_lvol_store -l lvs_0
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvs_0
|
||||
$rpc_py delete_nvme_controller Nvme0
|
||||
fi
|
||||
|
||||
|
@ -78,9 +78,9 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
# Delete subsystems, lvol_bdev and destroy lvol_store.
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1
|
||||
$rpc_py bdev_lvol_delete "$lb_nested_guid"
|
||||
$rpc_py destroy_lvol_store -l lvs_n_0
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvs_n_0
|
||||
$rpc_py bdev_lvol_delete "$lb_guid"
|
||||
$rpc_py destroy_lvol_store -l lvs_0
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvs_0
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -60,7 +60,7 @@ wait $perf_pid
|
||||
# Clean up
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode0
|
||||
$rpc_py bdev_lvol_delete $lvol
|
||||
$rpc_py destroy_lvol_store -u $lvs
|
||||
$rpc_py bdev_lvol_delete_lvstore -u $lvs
|
||||
|
||||
rm -f ./local-job*
|
||||
|
||||
|
@ -10,7 +10,7 @@ TEST_TRANSPORT='rdma'
|
||||
nvmftestinit
|
||||
|
||||
function finish_test {
|
||||
$rpc_py destroy_lvol_store -l lvs0
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvs0
|
||||
kill -9 $rpc_proxy_pid
|
||||
killprocess $nvmfpid
|
||||
rm $testdir/conf.json
|
||||
@ -33,7 +33,7 @@ timing_exit run_rpc_proxy
|
||||
|
||||
timing_enter configure_spdk
|
||||
$rpc_py get_bdevs
|
||||
$rpc_py destroy_lvol_store -l lvs0 || true
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvs0 || true
|
||||
$rpc_py construct_lvol_store Nvme0n1 lvs0
|
||||
$rpc_py get_bdevs
|
||||
timing_exit configure_spdk
|
||||
|
@ -246,7 +246,7 @@ if ! $no_shutdown; then
|
||||
if [[ $disk == "RaidBdev2" ]]; then
|
||||
notice "Removing lvol bdev and lvol store"
|
||||
$rpc_py bdev_lvol_delete lvs_0/lbd_0
|
||||
$rpc_py destroy_lvol_store -l lvs_0
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvs_0
|
||||
fi
|
||||
done
|
||||
done <<< "${conf[2]}"
|
||||
|
@ -29,7 +29,7 @@ function clean_lvol_cfg()
|
||||
{
|
||||
notice "Removing lvol bdev and lvol store"
|
||||
$rpc_py bdev_lvol_delete lvol_store/lvol_bdev
|
||||
$rpc_py destroy_lvol_store -l lvol_store
|
||||
$rpc_py bdev_lvol_delete_lvstore -l lvol_store
|
||||
}
|
||||
|
||||
while getopts 'xh-:' optchar; do
|
||||
|
@ -57,7 +57,7 @@ function clean_lvol_cfg()
|
||||
|
||||
notice "Removing nested lvol stores"
|
||||
for lvol_store in "${nest_lvol_stores[@]}"; do
|
||||
$rpc_py destroy_lvol_store -u $lvol_store
|
||||
$rpc_py bdev_lvol_delete_lvstore -u $lvol_store
|
||||
notice "nested lvol store $lvol_store removed"
|
||||
done
|
||||
|
||||
@ -69,7 +69,7 @@ function clean_lvol_cfg()
|
||||
|
||||
notice "Removing lvol stores"
|
||||
for lvol_store in "${lvol_stores[@]}"; do
|
||||
$rpc_py destroy_lvol_store -u $lvol_store
|
||||
$rpc_py bdev_lvol_delete_lvstore -u $lvol_store
|
||||
notice "lvol store $lvol_store removed"
|
||||
done
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ function cleanup_lvol_cfg()
|
||||
|
||||
notice "Removing lvol stores"
|
||||
for lvol_store in "${lvol_stores[@]}"; do
|
||||
$rpc_py destroy_lvol_store -u $lvol_store
|
||||
$rpc_py bdev_lvol_delete_lvstore -u $lvol_store
|
||||
notice "lvol store $lvol_store removed"
|
||||
done
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ function err_clean
|
||||
$rpc_py remove_vhost_scsi_target naa.vhost_vm.$vm_no 0
|
||||
$rpc_py remove_vhost_controller naa.vhost_vm.$vm_no
|
||||
$rpc_py bdev_lvol_delete $lvb_u
|
||||
$rpc_py destroy_lvol_store -u $lvs_u
|
||||
$rpc_py bdev_lvol_delete_lvstore -u $lvs_u
|
||||
vhost_kill 0
|
||||
exit 1
|
||||
}
|
||||
@ -118,7 +118,7 @@ timing_enter clean_vhost
|
||||
$rpc_py remove_vhost_scsi_target naa.vhost_vm.$vm_no 0
|
||||
$rpc_py remove_vhost_controller naa.vhost_vm.$vm_no
|
||||
$rpc_py bdev_lvol_delete $lvb_u
|
||||
$rpc_py destroy_lvol_store -u $lvs_u
|
||||
$rpc_py bdev_lvol_delete_lvstore -u $lvs_u
|
||||
vhost_kill 0
|
||||
timing_exit clean_vhost
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user