nvmf: don't raise assertion when destroying an non-inactive subsystem
Sometimes VM may get a kernel panic when starting, and SPDK CI will kill `nvmf_tgt` after 60 seconds, and for this exception, SPDK will raise an assertion when destroying the subsystem, while here, we remove this assertion and print the error information. CI will still mark this case as a failed case, then we can use this error information to understand error subsystem state in vfio-user. Fix issue #2590. Change-Id: I20b16f9e96a566730eca2dd9ea165645bd9160bd Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13773 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
f5e5041dc2
commit
78ca4b27c5
@ -420,8 +420,8 @@ spdk_nvmf_subsystem_destroy(struct spdk_nvmf_subsystem *subsystem, nvmf_subsyste
|
||||
assert(spdk_get_thread() == subsystem->thread);
|
||||
|
||||
if (subsystem->state != SPDK_NVMF_SUBSYSTEM_INACTIVE) {
|
||||
SPDK_ERRLOG("Subsystem can only be destroyed in inactive state\n");
|
||||
assert(0);
|
||||
SPDK_ERRLOG("Subsystem can only be destroyed in inactive state, current state %d\n",
|
||||
subsystem->state);
|
||||
return -EAGAIN;
|
||||
}
|
||||
if (subsystem->destroying) {
|
||||
|
@ -232,7 +232,8 @@ nvmf_tgt_subsystem_stopped(struct spdk_nvmf_subsystem *subsystem,
|
||||
if (subsystem) {
|
||||
rc = spdk_nvmf_subsystem_stop(subsystem, nvmf_tgt_subsystem_stopped, NULL);
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("Unable to stop NVMe-oF subsystem. Trying others.\n");
|
||||
SPDK_ERRLOG("Unable to stop NVMe-oF subsystem %s with rc %d, Trying others.\n",
|
||||
spdk_nvmf_subsystem_get_nqn(subsystem), rc);
|
||||
nvmf_tgt_subsystem_stopped(subsystem, NULL, 0);
|
||||
}
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user