Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1674

Add support for systemd-nspawn virtualization detection

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: FACT 3.9.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Platform OS
    • Story Points:
      1
    • Sprint:
      Platform OS 2017-08-09
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      No Action

      Description

      Facter doesn't detect nspawn, but it would be simple to add. Currently, when facter checks proc/1/cgroup to look for docker and lxc, it does not attempt to find nspawn. All that is necessary seems to be adding a check for a string along the lines of /machine.slice/machine-name.scope alongside these docker and lxc checks (this is what comes out of /proc/1/cgroup for nspawn containers). But since this doesn't happen, facter falls back to using virt-what, which does not attempt to detect nspawn.

      If a cgroup check is insufficient for some reason, FACT-1617 also has some useful information - see systemd's `detect_container` function here. In short, it seems that we could also check the container environment variable for the systemd process to get systemd-nspawn.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              casey.williams Casey Williams
              Reporter:
              casey.williams Casey Williams
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support