Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 18, 2026

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.

  • Documentation updates
    • Add a new “Command Line Tool” section in the 1.11.0 important notes covering package manager probing and compatibility warnings, with links to the related CLI PR and issue.

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:

  • zypper for SUSE-based distros
  • transactional-update for SUSE micro
  • apt for DEB distros
  • yum or dnf or microdnf for RPM distros
  • pacman for Arch Linux family

If 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`:
~> cat /etc/os-release 
NAME="SL-Micro"
VERSION="6.1"
VERSION_ID="6.1"
PRETTY_NAME="SUSE Linux Micro 6.1"
ID="sl-micro"
ID_LIKE="suse sle-micro opensuse-microos microos"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sl-micro:6.1"
HOME_URL="https://www.suse.com/products/micro/"
DOCUMENTATION_URL="https://documentation.suse.com/sl-micro/6.1/"
LOGO="distributor-logo"
$ ./longhornctl-linux-amd64 install preflight --enable-spdk
INFO[2025-12-15T13:18:01+08:00] Initializing preflight installer             
INFO[2025-12-15T13:18:01+08:00] Cleaning up preflight installer              
INFO[2025-12-15T13:18:03+08:00] Running preflight installer                  
INFO[2025-12-15T13:18:03+08:00] Installing dependencies with package manager 
ERRO[2025-12-15T13:18:33+08:00] Failed to run preflight installer: failed to install dependencies with package manager: failed DaemonSet condition check: pod container is in crash loop. View the logs using "kubectl -n longhorn-system logs longhorn-preflight-installer-5h9hm -c init-longhornctl" 
$ kubectl get pods -n longhorn-system
NAME                                 READY   STATUS                  RESTARTS      AGE
longhorn-preflight-installer-5h9hm   0/1     Init:CrashLoopBackOff   6 (66s ago)   6m42s
longhorn-preflight-installer-b2zfh   0/1     Init:CrashLoopBackOff   6 (52s ago)   6m42s
longhorn-preflight-installer-fz2lz   0/1     Init:CrashLoopBackOff   6 (58s ago)   6m42s
$ kubectl logs longhorn-preflight-installer-b2zfh -n longhorn-system -c init-longhornctl
time="2025-12-15T05:18:47Z" level=info msg="Updating package list"
time="2025-12-15T05:18:47Z" level=error msg="Failed to run preflight installer: failed to update package list: failed to execute: nsenter [--mount=/host/proc/3809/ns/mnt --net=/host/proc/3809/ns/net zypper update -y], output , stderr This is a transactional-server, please use transactional-update to update or modify the system.\n: exit status 5"

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

@yangchiu For sles-micro, please check #9256 (comment) instead and it is not in the scope of the ticket.

Please test the feature using OpenEuler or other OSs.

Sure! I won't verify this ticket on sle-micro anymore.</comment_new>
<comment_new>@yangchiu
Tested on master-head (longhorn/cli 63745e4). longhornctl fails to run on openEuler 24.03:

# cat /etc/os-release 
NAME="openEuler"
VERSION="24.03 (LTS)"
ID="openEuler"
VERSION_ID="24.03"
PRETTY_NAME="openEuler 24.03 (LTS)"
ANSI_COLOR="0;31"
# ./longhornctl insta...

</details>


> **Custom agent used: longhorn-important-notes-agent**
> Agent for automating Longhorn documentation updates and important notes.



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes longhorn/longhorn#12153

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

@netlify
Copy link

netlify bot commented Jan 18, 2026

Deploy Preview for longhornio ready!

Name Link
🔨 Latest commit e3af778
🔍 Latest deploy log https://app.netlify.com/projects/longhornio/deploys/696c7a508f080600082b6849
😎 Deploy Preview https://deploy-preview-1294--longhornio.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI changed the title [WIP] Add feature to guess Linux distro from package manager docs: add CLI package manager detection note Jan 18, 2026
Copilot AI requested a review from derekbit January 18, 2026 04:44
@derekbit derekbit force-pushed the copilot/add-guess-linux-distro-feature branch 2 times, most recently from 2a6744c to c57bcb6 Compare January 18, 2026 05:55
Longhorn 12153

Signed-off-by: Derek Su <derek.su@suse.com>
@derekbit derekbit force-pushed the copilot/add-guess-linux-distro-feature branch from c57bcb6 to e3af778 Compare January 18, 2026 06:14
@derekbit derekbit marked this pull request as ready for review January 18, 2026 06:15
@derekbit derekbit requested a review from a team as a code owner January 18, 2026 06:15
@derekbit derekbit merged commit a5f16f4 into master Jan 18, 2026
8 checks passed
@derekbit derekbit deleted the copilot/add-guess-linux-distro-feature branch January 18, 2026 06:21
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