Commit 297150f3 authored by Yankun Li's avatar Yankun Li Committed by Konrad Sztyber
Browse files

lib/app: resume rpc server after framework initialization fails



When the tgt process handles the framework_start_init request, the RPC
server is paused and stops accepting requests. If the initialization
fails, the failure path should resume the RPC server to report the error
back to the user.

Change-Id: I88792f2f90298104229e78b821b554ee329dcd44
Signed-off-by: default avatarYankun Li <yankun@staff.sina.com>
Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26136


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarGangCao <gang.cao@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeliu@tencent.com>
Tested-by: default avatarSPDK Automated Test System <spdkbot@gmail.com>
Reviewed-by: default avatarKonrad Sztyber <ksztyber@nvidia.com>
parent 4f6a498d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1503,6 +1503,9 @@ rpc_framework_start_init_cpl(int rc, void *arg1)
	assert(spdk_thread_is_app_thread(NULL));

	if (rc) {
		if (g_spdk_app.rpc_addr) {
			spdk_rpc_server_resume(g_spdk_app.rpc_addr);
		}
		spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
						 "framework_initialization failed");
		return;