bdev/rbd: add warning message for bdev_rbd_create without specifying -c
This patch will print warning message to help customer use rpc command bdev_rbd_create correctly. Fix issue #2189 Change-Id: I734516bef4c5471249dda6463d81be670d975566 Signed-off-by: Yifan Bian <yifan.bian@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13555 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
1318b3e434
commit
f656eed6e0
@ -21,6 +21,9 @@ Calculate num_md_pages from num_md_pages_per_cluster_ratio, and pass it to spdk_
|
|||||||
|
|
||||||
New options `ktls` and `tls_version` were added to the `spdk_sock_opts` structure.
|
New options `ktls` and `tls_version` were added to the `spdk_sock_opts` structure.
|
||||||
|
|
||||||
|
Added warning message for `bdev_rbd_create`, if it is used without -c.
|
||||||
|
`bdev_rbd_create()` API without specifying -c is deprecated and will be removed in future release.
|
||||||
|
|
||||||
## v22.05
|
## v22.05
|
||||||
|
|
||||||
### sock
|
### sock
|
||||||
|
@ -982,6 +982,8 @@ def bdev_rbd_create(client, pool_name, rbd_name, block_size, name=None, user=Non
|
|||||||
params['config'] = config
|
params['config'] = config
|
||||||
if cluster_name is not None:
|
if cluster_name is not None:
|
||||||
params['cluster_name'] = cluster_name
|
params['cluster_name'] = cluster_name
|
||||||
|
else:
|
||||||
|
print("WARNING:bdev_rbd_create should be used with specifying -c to have a cluster name after bdev_rbd_register_cluster.")
|
||||||
if uuid is not None:
|
if uuid is not None:
|
||||||
params['uuid'] = uuid
|
params['uuid'] = uuid
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user