[LU-6132] Unable to unload ib drivers with lustre loaded Created: 18/Jan/15 Updated: 28/May/19 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.7.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Yan Burman | Assignee: | Dmitry Eremin (Inactive) |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | llnl | ||
| Environment: |
RHEL 6.5 with MLNX_OFED 2.3 and ConnectX3/ConnectX3 Pro/ConnectIB HW (but I'm guessing is reproducible with any OS and any OFED/upstream kernel). |
||
| Issue Links: |
|
||||||||||||||||||||||||
| Severity: | 4 | ||||||||||||||||||||||||
| Rank (Obsolete): | 17090 | ||||||||||||||||||||||||
| Description |
|
Unloading IB drivers results in hung task message and driver unloading is stuck forever. Steps to reproduce: LNetError: 131-3: Received notification of device removal The cause of this is that ko2iblnd does not handle device removal (should probably handle it the same as disconnected event). |
| Comments |
| Comment by Liang Zhen (Inactive) [ 19/Jan/15 ] |
|
Release 2.7 will have Dynamic LNet Config (DLC) which allows user to dynamically add/remove LNet NI in userspace, after that you should be able to unload ib drivers. So far we don’t plan to handle this event and trigger NI removal in kernel space. |
| Comment by Andreas Dilger [ 19/Jan/15 ] |
|
Could you please explain why you would want to be able to unload the IB module while Lustre is up and running? |
| Comment by Yan Burman [ 20/Jan/15 ] |
|
One scenario would be reboot. Also, device removal event will be received upon PCI reset to device or unbind/hotplug. |
| Comment by Andreas Dilger [ 26/Feb/15 ] |
|
It seems to me that the correct solution here is during shutown to clean up the LNET routes/modules before unconfiguring IB. That should happen via the /etc/init.d/lnet script. Not clear why that isn't happening? |
| Comment by Yan Burman [ 02/Mar/15 ] |
|
The problem would happen if the mlx4/mlx5 drivers are unloaded before LNET is cleaned up or if device is removed (which is easily simulated by unloading mlx {4,5}_* modules). |
| Comment by Isaac Huang (Inactive) [ 02/Mar/15 ] |
|
I think the shutdown scripts should be fixed to honor the correct dependency - i.e. shutdown the IB users (e.g. LNet) before any attempts to shutdown any part of IB. As to LNet support of device removal, if there's a valid use case for that we should certainly support it. But I'd tend to say incorrect shutdown order isn't a valid use case. If there's other scenarios where LNet would need to handle device removal, please point it out. |
| Comment by Yan Burman [ 04/Mar/15 ] |
|
Other use cases where you may get device removal event are: |
| Comment by Isaac Huang (Inactive) [ 04/Mar/15 ] |
|
2-4 could be handled by removing the IB NI first with DLC, since they are all admin actions. Case 1 could probably be cleaned up with DLC NI shutdown after it has happened. |
| Comment by Gregoire Pichon [ 20/Jul/15 ] |
|
This issue has been reported by one of our customer. It usually occurs when shutting down a Lustre client while Lustre file systems are still mounted. |
| Comment by Giuseppe Di Natale (Inactive) [ 18/Jan/17 ] |
|
We've encountered this problem as well on both lustre clients and lustre servers. Problem usually occurs, as Gregoire mentioned, when a lustre fs is mounted on a client or a lustre server has a target mounted during shut down. |
| Comment by Dmitry Eremin (Inactive) [ 18/Jan/17 ] |
|
This happens when you have Lustre share mounted but try to unload OFED drivers. The shutdown sequence should be following:
We can make first 2 steps in our shutdown script but cannot guarantee that OFED drivers will not be unloaded first.
|
| Comment by James A Simmons [ 18/Jan/17 ] |
|
It is possible to make lustre aware when the IB core is unloaded but i haven't had cycles to implement this. I guess in that case we would have to force evictions of clients if that happens. |
| Comment by Andreas Dilger [ 19/Jan/17 ] |
|
I don't see why the client would need to be evicted, per-se if the IB interface is stopped. In theory, if the client has some other form of communication with the server (e.g. TCP or OPA) it could continue to work after the IB interface is stopped. Handling that cleanly would definitely need some development work, and is best left until after the LNet Multi-Rail code is landed, since I suspect it will need to deal with that situation in any case. One simple option for handling this in the short term is adding an /sbin/umount.lustre script which tries lustre_rmmod to unload the modules, but fails silently if the modules are in use (i.e. another filesystem is mounted). That would drop the LNet references and disconnect the client, allowing the IB modules to be unloaded. However, this depends on the client unmount happening before the IB modules are cleaned up. The other option is a systemd script (see patch http://review.whamcloud.com/21457 " |