Commit f656eed6 authored by Yifan Bian's avatar Yifan Bian Committed by Tomasz Zawadzki
Browse files

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: default avatarYifan Bian <yifan.bian@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13555


Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarXiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: default avatarDong Yi <dongx.yi@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 1318b3e4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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.

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

### sock
+2 −0
Original line number Diff line number Diff line
@@ -982,6 +982,8 @@ def bdev_rbd_create(client, pool_name, rbd_name, block_size, name=None, user=Non
        params['config'] = config
    if cluster_name is not None:
        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:
        params['uuid'] = uuid