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

Could not detect a platform family for Linux opensuse-leap distribution #1048

Closed
m-terel opened this issue Mar 16, 2021 · 2 comments
Closed

Comments

@m-terel
Copy link
Contributor

m-terel commented Mar 16, 2021

Describe the bug
We've found using gopsutil quite useful in open-source rport project. But we've encountered a problem of detecting a platform family for Linux opensuse-leap distribution. Here is an example of os-release file:

    NAME="openSUSE Leap"
    VERSION="15.2"
    ID="opensuse-leap"
    ID_LIKE="suse opensuse"
    VERSION_ID="15.2"
    PRETTY_NAME="openSUSE Leap 15.2"
    ANSI_COLOR="0;32"
    CPE_NAME="cpe:/o:opensuse:leap:15.2"
    BUG_REPORT_URL="https://bugs.opensuse.org"
    HOME_URL="https://www.opensuse.org/"

PlatformInformationWithContext detects platform family by ID attribute. Since "opensuse-leap" is missing in the switch statement, it returns an empty string for family.

Expected behavior
PlatformInformationWithContext should return suse value as familyvariable.

Environment:
Linux HV3-Rport-Client-SuSE-01 5.3.18-lp152.60-default #1 SMP Tue Jan 12 23:10:31 UTC 2021 (9898712) x86_64 x86_64 x86_64 GNU/Linux

Additional context
According to https://en.opensuse.org/SDB:SUSE_and_openSUSE_Products_Version_Outputs there are other distributions that are not supported by PlatformInformationWithContext: "opensuse-tumbleweed", "opensuse-tumbleweed-kubic", "sled", "caasp".

BTW, if you like our project https://github.com/cloudradar-monitoring/rport - please give us a star🙂

@m-terel
Copy link
Contributor Author

m-terel commented Mar 16, 2021

#1047 fixes this issue.

@Lomanic
Copy link
Collaborator

Lomanic commented Mar 17, 2021

Fixed by #1047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants