mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
infiniband: Fix the bug of wrongly checking whether the device exists
When the `p_key` is specified, the virtual infiniband device should be created automatically. And activating the connection on the virtual infiniband device should not require the users to create virtual infiniband device manually upfront. The previous implementation is wrong which validating the presence of virtual infiniband device upfront, as a result, the users have to create the virtual infiniband device manually in the target system in order to activate the connection on the virtual infiniband device through the role. This is an actual bug, the exception raised when the users do not pre-configured such a virtual infiniband device. To address the problem, only checking the existence of the device when the `p_key` is not specified. Signed-off-by: Wen Liang <liangwen12year@gmail.com>
This commit is contained in:
parent
84222cb610
commit
6dca796863
1 changed files with 1 additions and 1 deletions
|
|
@ -2012,7 +2012,7 @@ class Cmd(object):
|
|||
"interface exists" % (connection["interface_name"]),
|
||||
)
|
||||
elif connection["type"] == "infiniband":
|
||||
if connection["infiniband"]["p_key"] != -1:
|
||||
if connection["infiniband"]["p_key"] == -1:
|
||||
self.log_fatal(
|
||||
idx,
|
||||
"profile specifies interface_name '%s' but no such "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue