kdumpctl: make reload fail proof

When large amount of memory, about 1TB, is removed with DLPAR memory
remove operation, kdump reload could fail due to race condition with
device tree property update. In such scenario, the subsequent kdump
reload requests would also fail as reload() only proceeds if current
load status is active. Since the possibility of this race condition
couldn't be wished away due to the nature of the scenario, workaround
it by proceeding to load even if current load status is not active as
long as kdump service is active, which kdump udev rules already check
for.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
Hari Bathini 2019-10-30 17:02:29 +05:30 committed by Kairui Song
parent d9d4483b7a
commit 0a9aabaadd

View File

@ -1116,8 +1116,7 @@ reload()
{ {
check_current_status check_current_status
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Kdump is not running: [WARNING]" echo "Kdump was not running: [WARNING]"
return 0
fi fi
if [ $DEFAULT_DUMP_MODE == "fadump" ]; then if [ $DEFAULT_DUMP_MODE == "fadump" ]; then