RPC: rename wait_subsystem_init to framework_wait_init
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com> Change-Id: Ib9bb2de327a3461081f5f0dfc359b53f61019e28 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468133 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> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
e85d47123c
commit
fb3918a0ca
@ -170,7 +170,7 @@ Example response:
|
||||
}
|
||||
~~~
|
||||
|
||||
## wait_subsystem_init {#rpc_wait_subsystem_init}
|
||||
## framework_wait_init {#rpc_framework_wait_init}
|
||||
|
||||
Do not return until all subsystems have been initialized and the RPC system state is running.
|
||||
If the application is already running, this call will return immediately. This RPC can be called at any time.
|
||||
@ -191,7 +191,7 @@ Example request:
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1,
|
||||
"method": "wait_subsystem_init"
|
||||
"method": "framework_wait_init"
|
||||
}
|
||||
~~~
|
||||
|
||||
|
@ -1115,7 +1115,7 @@ spdk_rpc_subsystem_init_poller_ctx(void *ctx)
|
||||
}
|
||||
|
||||
static void
|
||||
spdk_rpc_wait_subsystem_init(struct spdk_jsonrpc_request *request,
|
||||
spdk_rpc_framework_wait_init(struct spdk_jsonrpc_request *request,
|
||||
const struct spdk_json_val *params)
|
||||
{
|
||||
struct spdk_json_write_ctx *w;
|
||||
@ -1136,5 +1136,6 @@ spdk_rpc_wait_subsystem_init(struct spdk_jsonrpc_request *request,
|
||||
ctx->init_poller = spdk_poller_register(spdk_rpc_subsystem_init_poller_ctx, ctx, 0);
|
||||
}
|
||||
}
|
||||
SPDK_RPC_REGISTER("wait_subsystem_init", spdk_rpc_wait_subsystem_init,
|
||||
SPDK_RPC_REGISTER("framework_wait_init", spdk_rpc_framework_wait_init,
|
||||
SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(framework_wait_init, wait_subsystem_init)
|
||||
|
@ -46,11 +46,12 @@ if __name__ == "__main__":
|
||||
help='Start initialization of subsystems')
|
||||
p.set_defaults(func=framework_start_init)
|
||||
|
||||
def wait_subsystem_init(args):
|
||||
rpc.wait_subsystem_init(args.client)
|
||||
def framework_wait_init(args):
|
||||
rpc.framework_wait_init(args.client)
|
||||
|
||||
p = subparsers.add_parser('wait_subsystem_init', help='Block until subsystems have been initialized')
|
||||
p.set_defaults(func=wait_subsystem_init)
|
||||
p = subparsers.add_parser('framework_wait_init', aliases=['wait_subsystem_init'],
|
||||
help='Block until subsystems have been initialized')
|
||||
p.set_defaults(func=framework_wait_init)
|
||||
|
||||
def rpc_get_methods(args):
|
||||
print_dict(rpc.rpc_get_methods(args.client,
|
||||
|
@ -27,9 +27,10 @@ def framework_start_init(client):
|
||||
return client.call('framework_start_init')
|
||||
|
||||
|
||||
def wait_subsystem_init(client):
|
||||
@deprecated_alias('wait_subsystem_init')
|
||||
def framework_wait_init(client):
|
||||
"""Block until subsystems have been initialized"""
|
||||
return client.call('wait_subsystem_init')
|
||||
return client.call('framework_wait_init')
|
||||
|
||||
|
||||
@deprecated_alias("get_rpc_methods")
|
||||
|
@ -32,21 +32,21 @@ echo "Process pid: $pid"
|
||||
trap 'killprocess $pid; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
$rpc_py wait_subsystem_init &
|
||||
$rpc_py framework_wait_init &
|
||||
rpc_wait_pid=$!
|
||||
$rpc_py iscsi_set_options -o 30 -a 16
|
||||
|
||||
# RPC wait_subsystem_init should be blocked, so its process must be existed
|
||||
# RPC framework_wait_init should be blocked, so its process must be existed
|
||||
ps $rpc_wait_pid
|
||||
|
||||
$rpc_py framework_start_init
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
# RPC wait_subsystem_init should be already returned, so its process must be non-existed
|
||||
# RPC framework_wait_init should be already returned, so its process must be non-existed
|
||||
! ps $rpc_wait_pid
|
||||
|
||||
# RPC wait_subsystem_init will directly returned after subsystem initialized.
|
||||
$rpc_py wait_subsystem_init &
|
||||
# RPC framework_wait_init will directly returned after subsystem initialized.
|
||||
$rpc_py framework_wait_init &
|
||||
rpc_wait_pid=$!
|
||||
sleep 1
|
||||
! ps $rpc_wait_pid
|
||||
|
@ -73,7 +73,7 @@ timing_enter test1
|
||||
$rootdir/test/app/bdev_svc/bdev_svc -m 0x1 -i 1 -r /var/tmp/bdevperf.sock -c $testdir/bdevperf.conf &
|
||||
perfpid=$!
|
||||
waitforlisten $perfpid /var/tmp/bdevperf.sock
|
||||
$rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init
|
||||
$rpc_py -s /var/tmp/bdevperf.sock framework_wait_init
|
||||
|
||||
# Kill bdev_svc
|
||||
kill -9 $perfpid || true
|
||||
@ -94,7 +94,7 @@ timing_enter test2
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -r /var/tmp/bdevperf.sock -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 10 &
|
||||
perfpid=$!
|
||||
waitforlisten $perfpid /var/tmp/bdevperf.sock
|
||||
$rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init
|
||||
$rpc_py -s /var/tmp/bdevperf.sock framework_wait_init
|
||||
|
||||
waitforio /var/tmp/bdevperf.sock Nvme1n1
|
||||
|
||||
@ -113,7 +113,7 @@ timing_enter test3
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -r /var/tmp/bdevperf.sock -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 10 &
|
||||
perfpid=$!
|
||||
waitforlisten $perfpid /var/tmp/bdevperf.sock
|
||||
$rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init
|
||||
$rpc_py -s /var/tmp/bdevperf.sock framework_wait_init
|
||||
|
||||
# Expand the trap to clean up bdevperf if something goes wrong
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID; kill -9 $perfpid || true; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
|
Loading…
Reference in New Issue
Block a user