-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage: Powerflex use Connect
and Disconnect
for NVMe/TCP
#14900
base: main
Are you sure you want to change the base?
Conversation
e9ca332
to
3d3ea60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already looking good, just a few early comments/questions from my side.
@@ -858,6 +858,11 @@ func (d *powerflex) deleteNVMeHost() error { | |||
return client.deleteHost(host.ID) | |||
} | |||
|
|||
// targetQN returns the unique NQN of the target SDTs using PowerFlex's system ID. | |||
func (d *powerflex) targetQN(systemID string) string { | |||
return fmt.Sprintf("nqn.1988-11.com.dell:powerflex:00:%s", systemID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the nqn prefix is the same for all PF system, just wanted to point out if we are sure this is true? Because if the prefix does not match, the connection will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had the same thoughts. Unfortunately this string doesn't seem to be returned by any PowerFlex API. I tried querying the relevant ones with no luck.
Also all the online examples always use nqn.1988-11.com.dell:powerflex:00:
so I suspect this to be the same every time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC in case of pure you get it straight from the API right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC in case of pure you get it straight from the API right?
Yes.
Unfortunately this string doesn't seem to be returned by any PowerFlex API. I tried querying the relevant ones with no luck.
I think the prefix should be the same on all PF arrays, as the prefix is constructed as:
<protocol>.<year_of_company_creation?>.<domain_in_reverse>:<system_id>
Just not sure if this is really a standard, or if it can vary for unknown reasons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative would be to keep ConnectAll
to make use of the discovery. This way we don't need to craft the target's nqn as we get it from NVMe discovery.
But then ConnectAll
should support multiple addresses, the same as Connect
in case one of them is down.
And Disconnect
already supports just providing a string that is contained in any of the current session so in case of PowerFlex we can just pass the system id.
3d3ea60
to
317049f
Compare
317049f
to
c46f72f
Compare
c46f72f
to
554c35d
Compare
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Instead of ConnectAll and DisconnectAll use the Connect and Disconnect functions to connect and disconnect to and from individual NVMe/TCP targets (SDTs). If no SDTs (powerflex.sdt) are provided discover them by querying the PowerFlex REST API. Signed-off-by: Julian Pelizäus <[email protected]>
…g key Don't anymore set powerflex.sdt config key if not provided. If it's not set the driver will discover the list of NVMe/TCP targets (SDTs) from the PowerFlex REST API. Signed-off-by: Julian Pelizäus <[email protected]>
…ing place Signed-off-by: Julian Pelizäus <[email protected]>
This allows using the connectors functionality to conveniently check if the respective SDC kernel module got already loaded outside of LXD. Signed-off-by: Julian Pelizäus <[email protected]>
…ation Rely on the already existing check in Validate() to check if the SDC kernel module got loaded outside of LXD. Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
ec263cc
to
ae4cc7c
Compare
Signed-off-by: Julian Pelizäus <[email protected]>
ae4cc7c
to
66a477f
Compare
Closes #14814
This aligns the PowerFlex driver with the implementation of Pure in #14599 to use the NVMe/TCP
Connect
andDisconnect
functions instead of their(Connect|Disconnect)All
counterparts.Furthermore a patch is introduced to remove the
powerflex.sdt
config key from already existing storage pools.Currently only a single address is stored in the key and using
nvme connect-all
all of the other targets (SDTs) are discovered anyway.As the driver is now querying for all the SDTs in case
powerflex.sdt
config key is not set, the behavior is the exact same.In addition
powerflex.sdt
now accepts multiple addresses separated by comma which allows overriding the addresses discovered by asking the PowerFlex REST API.Some additional minor tweaks have been put into place to make more consistent use of the connector's
LoadModules
in case of SDC and to clean up some error messages.