diff options
author | Sean Zachariasen <thewyzard@hotmail.com> | 2018-02-07 18:28:50 -0700 |
---|---|---|
committer | Sean Zachariasen <thewyzard@hotmail.com> | 2018-02-07 18:28:50 -0700 |
commit | f8186448672814136420365252a5ab75ffe6f655 (patch) | |
tree | b48335363512aadd445649685d4e767662970d21 | |
parent | 5ad2d2b869e7666c656772f79ef2578381ea9af7 (diff) | |
download | ohai-f8186448672814136420365252a5ab75ffe6f655.tar.gz |
annotate
Signed-off-by: Sean Zachariasen <thewyzard@hotmail.com>
-rw-r--r-- | lib/ohai/plugins/linux/virtualization.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ohai/plugins/linux/virtualization.rb b/lib/ohai/plugins/linux/virtualization.rb index fc64dbe2..b144ec94 100644 --- a/lib/ohai/plugins/linux/virtualization.rb +++ b/lib/ohai/plugins/linux/virtualization.rb @@ -223,6 +223,14 @@ Ohai.plugin(:Virtualization) do virtualization[:system] = "lxd" virtualization[:role] = "guest" else + # 'How' LXD is installed dictates the runtime data location + # + # Installations of LXD from a .deb (Ubuntu's main and backports repos) utilize '/var/lib/lxd/' for runtime data + # - used by stable releases 2.0.x in trusty/xenial, and 3.0.x in bionic + # - xenial-backports includes versions 2.1 through 2.21 + # + # Snap based installations utilize '/var/snap/lxd/common/lxd/' + # - includes all future releases starting with 2.21, and will be the only source of 3.1+ feature releases post-bionic ["/var/lib/lxd/devlxd", "/var/snap/lxd/common/lxd/devlxd"].each do |devlxd| if File.exist?(devlxd) Ohai::Log.debug("Plugin Virtualization: #{devlxd} exists. Detecting as lxd host") |