You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/docs/docsite/rst
Rick Elrod 707458cc8c
Make netbsd virtualization facts more specific (#70467)
Change:
Our handling of NetBSD virtualization facts led to facts that were just
plain incorrect. One example is reporting Xen even when the system is
running on something completely different (like KVM).

As stated by the reporter of #69352, NetBSD has a better sysctl setting
to use for this information, machdep.hypervisor.

This PR does the following:

- Try to use machdep.hypervisor sysctl value if the other sysctl values
  we check don't end up with enough information to be useful
- Only look for /dev/xencons and assume Xen if nothing else works
  (Really this should probably return 'unknown' since the file exists on
  non-Xen systems and is not very useful).
- Add a few more patterns (Xen matches and also Hyper-V) to
  VirtualSysctlDetectionMixin#detect_virt_product.

This change is slightly breaking:
- If the first two attempts at using sysctl worked before,
  (machdep.dmi.system-product and machdep.dmi.system-vendor), they will
  continue to work.
- For cases when those values didn't work, previously the existence of
  /dev/xencons was checked, and if found, we reported 'xen' (even on
  non-Xen systems when the file existed). After this PR, we try the
  machdep.hypervisor sysctl key before still falling back to
  /dev/xencons. This means that in some cases, we might go from
  (wrongly) saying "xen" to giving a more accurate value such as "kvm"
  or "Hyper-V".

Test Plan:
- Tested with local NetBSD VM and got 'kvm' instead of 'xen' back.

Tickets:
- Fixes #69352

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
..
api remove build errors including guess (#69711) 5 years ago
community Docs: mention about Ansible workshops (#70353) 4 years ago
dev_guide Small documentation fixes (#70480) 4 years ago
galaxy Add support to install collections from git repositories (#69154) 5 years ago
images Adds custom 404 with cowsay image (#57422) 5 years ago
installation_guide Remove RPM packaging infrastructure (#69554) 5 years ago
inventory Add implicit localhost hostvars note (#61956) 5 years ago
network update platform table with links to collections (#70373) 4 years ago
plugins WIP: Docs: User guide overhaul, part 4 (#69266) 5 years ago
porting_guides Make netbsd virtualization facts more specific (#70467) 4 years ago
reference_appendices WIP: Docs: User guide overhaul, part 4 (#69266) 5 years ago
roadmap Updating 2.10 roadmap with adjusted beta release date (#70077) 4 years ago
scenario_guides Minor grammatical fix (#70405) 4 years ago
shared_snippets Add support to install collections from git repositories (#69154) 5 years ago
user_guide Fix flatten null perserve versionadded (#70435) 4 years ago
404.rst removes link from 404 content, explains options (#57971) 5 years ago
conf.py More boilerplate fixes. (#70224) 4 years ago
index.rst Remove extra Ansible in network automation section header (#67828) 5 years ago