Skip to content

Commit

Permalink
Do "lnet stop" instead of lustre_rmmod (#80)
Browse files Browse the repository at this point in the history
* Do "lnet stop" instead of lustre_rmmod

This should fix the hanging references from LU-11986

Signed-off-by: Nathaniel Clark <[email protected]>

* Fixup lnet start/stop

Signed-off-by: Nathaniel Clark <[email protected]>

* Update chroma_agent/action_plugins/manage_lnet.py

* Adjust stop/unload to not relay on sbin/lnet

/usr/sbin/lnet is not present on clients.
lustre_rmmod ptlrpc is not affected by LU-11986

Signed-off-by: Nathaniel Clark <[email protected]>

* fixups

Signed-off-by: Joe Grund <[email protected]>

* fixup logic error

Signed-off-by: Joe Grund <[email protected]>

* fix another logic bug

Signed-off-by: Joe Grund <[email protected]>

* load existing modprobe files

Signed-off-by: Joe Grund <[email protected]>
  • Loading branch information
utopiabound authored and jgrund committed Apr 24, 2019
1 parent 07e24fc commit d1deaa3
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions chroma_agent/action_plugins/manage_lnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ def start_lnet():
"""
console_log.info("Starting LNet")

# modprobe lustre is a hack for HYD-1263 - Fix or work around LU-1279 - failure trying to mount
# should be removed when LU-1279 is fixed
return agent_ok_or_error(
AgentShell.run_canned_error_message(["lctl", "net", "up"])
or AgentShell.run_canned_error_message(["modprobe", "lustre"])
return AgentShell.run_canned_error_message(
["lnetctl", "lnet", "configure", "--all"]
)


Expand All @@ -50,15 +47,10 @@ def stop_lnet():
"""

console_log.info("Stopping LNet")
# FIXME: Due to LU-11986 (partial lustre_rmmod leads to panic) and LU-9525 ("lctl
# network down" won't work...) call lustre_rmmod to shutdown network

# Teardown to ksocklnd - ignore error
result = AgentShell.run(["lustre_rmmod"])
if result.rc == 0:
return agent_result_ok
return agent_ok_or_error(
AgentShell.run_canned_error_message(["lctl", "network", "down"])
AgentShell.run_canned_error_message(["lustre_rmmod", "ptlrpc"])
or AgentShell.run_canned_error_message(["lnetctl", "lnet", "unconfigure"])
)


Expand Down

0 comments on commit d1deaa3

Please sign in to comment.