Page MenuHomeSoftware Heritage

The VMs cloned from the debian10 templates considered as physical servers by facter
Started, Work in Progress, NormalPublic

Description

After the initial netbox's import, several vms are detected as physical devices instead of vms.

It seems it's due to lspci which is not installed (pciutils package) :

root@bojimans:/usr/share/puppet# facter -d is_virtual
2020-10-15 14:06:41.923443 INFO  puppetlabs.facter - executed with command line: -d is_virtual.
...
2020-10-15 14:06:42.016598 DEBUG leatherman.execution:93 - executing command: virt-what
2020-10-15 14:06:42.016744 DEBUG leatherman.execution:414 - virt-what was not found on the PATH.
2020-10-15 14:06:42.016883 DEBUG leatherman.execution:93 - executing command: vmware -v
2020-10-15 14:06:42.017015 DEBUG leatherman.execution:414 - vmware was not found on the PATH.
2020-10-15 14:06:42.017277 DEBUG leatherman.execution:93 - executing command: lspci
2020-10-15 14:06:42.017415 DEBUG leatherman.execution:414 - lspci was not found on the PATH.
2020-10-15 14:06:42.017565 DEBUG puppetlabs.facter - fact "is_virtual" has resolved to false.
2020-10-15 14:06:42.017685 DEBUG puppetlabs.facter - fact "virtual" has resolved to "physical".
false

@olasd proposed to install all the packages with a priority package and ran it on all the running servers with the command :

aptitude -y install "?priority(standard)!~i?archive(stable)

The debian10 template needs to be updated too

Event Timeline

vsellier changed the task status from Open to Work in Progress.Thu, Oct 15, 5:19 PM
vsellier triaged this task as Normal priority.
vsellier created this task.
vsellier updated the task description. (Show Details)
vsellier updated the task description. (Show Details)

There may be relevant information on how the template got bootstraped initially in the sysadm repository [1]

[1] https://forge.softwareheritage.org/source/swh-sysadmin-provisioning/browse/master/proxmox/terraform/init-template.md

ardumont updated the task description. (Show Details)Thu, Oct 15, 5:27 PM

There is a proxmox builder [1] for packer, I will give it a try to check if we can benefit of the work done for vagrant on puppet and have a common base between the real vms and the local vms used to test.

[1]: https://www.packer.io/docs/builders/proxmox.html