docs: add CLI package manager detection note #1294
Merged
+12
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The CLI preflight flow could not reliably proceed on newer or unrecognized Linux distributions because OS detection relied only on
/etc/os-release. The update documents the new compatibility-mode behavior that probes package managers and warns about support boundaries.Example note excerpt:
Longhorn v{{< current-version >}} improves the Longhorn command-line tool by attempting to detect common package managers ... The CLI warns that the operating system is not officially supported and proceeds in a compatibility mode ...Original prompt
This section details on the original issue you should resolve
<issue_title>[FEATURE] Guess Linux distro from the package manager</issue_title>
<issue_description>### Is your feature request related to a problem? Please describe (👍 if you like this request)
Currently to Longhorn CLI and node controller, it detect the platform from the os-release file and compare with a fixed list of keywords. However, there is still some chance to check the dependencies on such platform by detecting the supported package manager commands.
Describe the solution you'd like
If os-release does not matches any of the listed OS keyword, given a list of package manager commands:
zypperfor SUSE-based distrostransactional-updatefor SUSE microaptfor DEB distrosyumordnformicrodnffor RPM distrospacmanfor Arch Linux familyIf the command is available, warn the user for the risk of compatibility, and then check the environment using the detected package manager.
Describe alternatives you've considered
No response
Additional context
No response</issue_description>
<agent_instructions>Review the ticket and add a "Command Line Tool" section after the "Access Mode Supportability" section in the important note https://github.com/longhorn/website/blob/master/content/docs/1.11.0/important-notes/_index.md and add an important note for the improvement.</agent_instructions>
Comments on the Issue (you are @copilot in this section)
@derekbit @NamrathShetty Could we assign the ticket to you because you are working on the improvement? Thanks. @derekbit @roger-ryao Can you test OpenEurler as well? @yangchiu Tested on master-head (longhorn/cli 63745e4). `longhornctl` fails to run on `sle-micro 6.1`:cc @derekbit </comment_new>
<comment_new>@derekbit
@yangchiu
For sles-micro, please check longhorn/longhorn#9256 (comment) instead and it is not in the scope of the ticket.
Please test the feature using OpenEuler or other OSs.</comment_new>
<comment_new>@yangchiu
Sure! I won't verify this ticket on
sle-microanymore.</comment_new><comment_new>@yangchiu
Tested on master-head (longhorn/cli 63745e4).
longhornctlfails to run onopenEuler 24.03: