Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3569

sys.os_name_human and sys.os_version_major policy variables defined in C code

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.18.0
    • Component/s: None
    • Labels:
    • Story Points:
      0

      Description

      For the MP UI, we want a OS inventory attribute which is as short and readable / familiar as possible, regardless of what the OS vendor prefers as their OS / pretty name.

      We made that change here:

      https://tracker.mender.io/browse/ENT-6536

      https://github.com/cfengine/masterfiles/pull/1868

      However, the policy becomes messy. If we had these 2 variables it would be a lot easier:

      vars:
        "description"
          string => "$(sys.os_name_human) $(sys.os_version_major)",
          meta => { "inventory", "attribute_name=OS" };
      

      sys.os_name_human

      • RHEL for Red Hat Enterprise Linux
      • CentOS for CentOS Linux
      • SUSE for SUSE Linux Enterprise Server
      • Ubuntu for Ubuntu Linux
      • Debian for Debian GNU/Linux
      • Windows for both Windows Home, Professional, Server, etc.
      • macOS for apple's operating system
      • HP-UX for Hewlett Packard Unix

      sys.os_version_major

      • 18 for Ubuntu 18.04
      • 7 for CentOS Linux 7.6
      • 2016 for WIndows Server 2016

      This ticket is limited to only the 2 variables we need because: limit scope, hard to know where to stop, and hard to know exactly how to put OS versions into major-minor-patch-build etc. (Where does SP2 go?).

      sys.os_version_minor and sys.os_version_patch etc. could be implemented in the future, once we make a decision on exactly what those should be.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                larsewi Lars Erik Wik
                Reporter:
                olehermanse Ole Herman Schumacher Elgesem
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel