Skip to content
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

Use libnvme helper to retrieve hostnqn/hostid #2394

Merged
merged 7 commits into from
Jul 12, 2024

Conversation

igaw
Copy link
Collaborator

@igaw igaw commented Jul 3, 2024

There are several places to lookup the default hostnqn/hostid. Add a helper which implements a canonical way to do this.

Fixes: ##1956
Depends: linux-nvme/libnvme#857

@igaw igaw changed the title Add helper to retrieve hostnqn/hostid Use libnvme helper to retrieve hostnqn/hostid Jul 3, 2024
@igaw igaw force-pushed the hostnqn-order branch from 2399384 to 65f938d Compare July 5, 2024 13:00
@igaw
Copy link
Collaborator Author

igaw commented Jul 5, 2024

Well, there is some more to fix with the config.json connect all code path when there is only the config.json file around.

@igaw igaw marked this pull request as draft July 5, 2024 13:02
@igaw igaw force-pushed the hostnqn-order branch 2 times, most recently from 544c362 to 659f24b Compare July 11, 2024 11:57
@igaw igaw marked this pull request as ready for review July 11, 2024 11:58
igaw added 7 commits July 12, 2024 10:20
Fetch hostnqn changes.

Signed-off-by: Daniel Wagner <[email protected]>
Simplify the error handling path by using the cleanup helpers.

Signed-off-by: Daniel Wagner <[email protected]>
The 'already connected' message only contains the traddr as info. Add
the missing information so that it's possible to figure out what
combination is already in use.

Signed-off-by: Daniel Wagner <[email protected]>
libnvme provides a handy new helper to lookup the hostnqn and hostid.

Signed-off-by: Daniel Wagner <[email protected]>
The topology scanning will create nodes in the internal libnvme tree. As
we rely on the order of the nodes in the tree, we need to read the
config before we scan. This makes sure the first node is the one we have
defined in the config.json. This is important because the first node
provides default hosnqn configuration in absents of /etc/nvme/hostnqn.

Signed-off-by: Daniel Wagner <[email protected]>
Move the connect logic out of the subsystem, ctrl loop. Too much
indention.

Signed-off-by: Daniel Wagner <[email protected]>
Iterate over all hosts defined in the config.json configuration file,
instead just the default controller.

Signed-off-by: Daniel Wagner <[email protected]>
@igaw igaw merged commit 927aac9 into linux-nvme:master Jul 12, 2024
17 checks passed
@igaw igaw deleted the hostnqn-order branch July 12, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant