ef72f4c5 | 22-Mar-2024 |
Jim Harris <jim.harris@samsung.com> |
test/app/stub: try to unlink sentinel file on app start
For testing purposes, the stub app creates a sentinel file that scripts can look for to see when the stub is ready to start accepting secondar
test/app/stub: try to unlink sentinel file on app start
For testing purposes, the stub app creates a sentinel file that scripts can look for to see when the stub is ready to start accepting secondary processes. We need to wait until after spdk_nvme_probe() completes which can take a while depending on init time of the SSDs.
The stub app will unlink the file on normal shutdown, but if it crashes unexpectedly, the file will remain and prevent the stub app from starting again until user manually deletes it.
So immediately unlink the sentinel file at start of stub_start() - we know at this point that *if* the file still exists it must be left over from a crashed stub and not a currently running stub (since we can't get to this point if there's already a primary process at this shm_id). Then create the file after the spdk_nvme_probe() is complete.
Signed-off-by: Jim Harris <jim.harris@samsung.com> Change-Id: I46cfc9fb1b76d859c9af5c4bbb008ca16b529b28 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22477 Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
be619872 | 22-Mar-2024 |
Jim Harris <jim.harris@samsung.com> |
test/app/stub: enforce stub to only run as a primary process
The stub process is only meant to be run as a primary process, it is not useful at all as a secondary process. We can use spdk_app_opts::
test/app/stub: enforce stub to only run as a primary process
The stub process is only meant to be run as a primary process, it is not useful at all as a secondary process. We can use spdk_app_opts::env_context to specify to DPDK that the process should be initialized as a primary process. That way if a stub process is already running at the same shm_id it will exit with error immediately.
Signed-off-by: Jim Harris <jim.harris@samsung.com> Change-Id: I9091ebc4b996c55531e82fc6231aebb210e5810b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22476 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|