Skip to content

plugins/config: add 'nvme config status' command - #3832

Merged
igaw merged 1 commit into
linux-nvme:masterfrom
martin-belanger:config-status
Aug 13, 2026
Merged

plugins/config: add 'nvme config status' command#3832
igaw merged 1 commit into
linux-nvme:masterfrom
martin-belanger:config-status

Conversation

@martin-belanger

Copy link
Copy Markdown

Add a command that reports on the legacy config files. It checks whether config.json/discovery.conf are present and whether they have already been converted to the new INI format (nvme-fabrics.conf), based on whether the rollback symlink is present next to each one. When a file has been converted, it hints that both the file and its symlink are safe to delete once rollback is no longer a concern.

@igaw

igaw commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Makes sense. The only thing I wonder if we should return an error code, so this command could be used in shell scripts without having to parse the output. The problem is no error is 0 and any error code is mapped to 1, because return codes in POSIX are a very difficult topic.

Add a command that reports on the legacy config files. It checks
whether config.json/discovery.conf are present and whether they have
already been converted to the new INI format (nvme-fabrics.conf),
based on whether the rollback symlink is present next to each one.
When a file has been converted, it hints that both the file and its
symlink are safe to delete once rollback is no longer a concern.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
@martin-belanger

Copy link
Copy Markdown
Author

I added a return code as follows:

EXIT STATUS
-----------
Returns 0 if neither legacy file has anything to report. Returns a
non-zero status if config.json or discovery.conf, or a '.converted'
marker for either, is present -- regardless of which of the states
listed above applies. Use the printed output, not the exit status, to
tell those states apart.

@igaw
igaw merged commit f98d02d into linux-nvme:master Aug 13, 2026
34 checks passed
@igaw

igaw commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

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.

2 participants