You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/unittests/test_ds_identify.py::TestDsIdentify::test_lxd_kvm_jammy_env testcase fails on Alpine Linux.
This may perhaps be due to limitations in the virt-what utility used as an alternative to the systemd-detect-virt utility on Alpine, although I'd expect the case to mock any calls to such utils.
Steps to reproduce the problem
Environment details
Cloud-init version: git master
Operating System Distribution: Alpine
Cloud provider, platform or installer type:
cloud-init logs
____________________ TestDsIdentify.test_lxd_kvm_jammy_env _____________________
self = <tests.unittests.test_ds_identify.TestDsIdentify testMethod=test_lxd_kvm_jammy_env>
def test_lxd_kvm_jammy_env(self):
"""LXD KVM on host systems with a kernel > 5.10 need to match "qemu".
LXD provides `hv_passthrough` when launching kvm instances when host
kernel is > 5.10. This results in systemd being unable to detect the
virtualized CPUID="Linux KVM Hv" as type "kvm" and results in
systemd-detect-virt returning "qemu" in this case.
Assert ds-identify can match systemd-detect-virt="qemu" and
/sys/class/dmi/id/board_name = LXD.
Once systemd 251 is available on a target distro, the virtualized
CPUID will be represented properly as "kvm"
"""
> self._test_ds_found("LXD-kvm-qemu-kernel-gt-5.10-env")
tests/unittests/test_ds_identify.py:520:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/unittests/test_ds_identify.py:327: in _test_ds_found
return self._check_via_dict(
tests/unittests/test_ds_identify.py:339: in _check_via_dict
self.assertEqual(rc, ret.rc)
E AssertionError: 0 != 1
----------------------------- Captured stdout call -----------------------------
-- rc = 1 --
-- out --
No value found
-- err --
[up unavailables] ds-identify
policy loaded: mode=search report=false found=all maybe=all notfound=disabled
no datasource_list found, using default: MAAS ConfigDrive NoCloud AltCloud Azure Bigstep CloudSigma CloudStack DigitalOcean Vultr AliYun Ec2 GCE OpenNebula OpenStack OVF SmartOS Scaleway Hetzner IBMCloud Oracle Exoscale RbxCloud UpCloud VMware LXD NWCS Akamai WSL
DMI_PRODUCT_NAME=unavailable
DMI_SYS_VENDOR=unavailable
DMI_PRODUCT_SERIAL=unavailable
DMI_PRODUCT_UUID=unavailable
PID_1_PRODUCT_NAME=
DMI_CHASSIS_ASSET_TAG=unavailable
DMI_BOARD_NAME=LXD
FS_LABELS=
ISO9660_DEVS=
KERNEL_CMDLINE=unavailable:no-cmdline
VIRT=virt-what: this script must be run as root
UNAME_KERNEL_NAME=Linux
UNAME_KERNEL_VERSION=#83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017
UNAME_MACHINE=x86_64
DSNAME=
DSLIST=MAAS ConfigDrive NoCloud AltCloud Azure Bigstep CloudSigma CloudStack DigitalOcean Vultr AliYun Ec2 GCE OpenNebula OpenStack OVF SmartOS Scaleway Hetzner IBMCloud Oracle Exoscale RbxCloud UpCloud VMware LXD NWCS Akamai WSL
MODE=search
ON_FOUND=all
ON_MAYBE=all
ON_NOTFOUND=disabled
pid=794 ppid=441
is_container=false
Checking for datasource 'MAAS' via 'dscheck_MAAS'
check for 'MAAS' returned not-found[1]
Checking for datasource 'ConfigDrive' via 'dscheck_ConfigDrive'
is_ds_enabled(IBMCloud) = true.
check for 'ConfigDrive' returned not-found[1]
Checking for datasource 'NoCloud' via 'dscheck_NoCloud'
check for 'NoCloud' returned not-found[1]
Checking for datasource 'AltCloud' via 'dscheck_AltCloud'
check for 'AltCloud' returned not-found[1]
Checking for datasource 'Azure' via 'dscheck_Azure'
check for 'Azure' returned not-found[1]
Checking for datasource 'Bigstep' via 'dscheck_Bigstep'
check for 'Bigstep' returned not-found[1]
Checking for datasource 'CloudSigma' via 'dscheck_CloudSigma'
check for 'CloudSigma' returned not-found[1]
Checking for datasource 'CloudStack' via 'dscheck_CloudStack'
check for 'CloudStack' returned not-found[1]
Checking for datasource 'DigitalOcean' via 'dscheck_DigitalOcean'
check for 'DigitalOcean' returned not-found[1]
Checking for datasource 'Vultr' via 'dscheck_Vultr'
check for 'Vultr' returned not-found[1]
Checking for datasource 'AliYun' via 'dscheck_AliYun'
check for 'AliYun' returned not-found[1]
Checking for datasource 'Ec2' via 'dscheck_Ec2'
ec2 platform is 'Unknown'.
check for 'Ec2' returned not-found[1]
Checking for datasource 'GCE' via 'dscheck_GCE'
check for 'GCE' returned not-found[1]
Checking for datasource 'OpenNebula' via 'dscheck_OpenNebula'
check for 'OpenNebula' returned not-found[1]
Checking for datasource 'OpenStack' via 'dscheck_OpenStack'
is_ds_enabled(IBMCloud) = true.
check for 'OpenStack' returned not-found[1]
Checking for datasource 'OVF' via 'dscheck_OVF'
check for 'OVF' returned not-found[1]
Checking for datasource 'SmartOS' via 'dscheck_SmartOS'
check for 'SmartOS' returned not-found[1]
Checking for datasource 'Scaleway' via 'dscheck_Scaleway'
check for 'Scaleway' returned not-found[1]
Checking for datasource 'Hetzner' via 'dscheck_Hetzner'
check for 'Hetzner' returned not-found[1]
Checking for datasource 'IBMCloud' via 'dscheck_IBMCloud'
ibm_provisioning=false: config '/tmp/ci-TestDsIdentify.dlqs7qhs/root/provisioningConfiguration.cfg' did not exist.
check for 'IBMCloud' returned not-found[1]
Checking for datasource 'Oracle' via 'dscheck_Oracle'
check for 'Oracle' returned not-found[1]
Checking for datasource 'Exoscale' via 'dscheck_Exoscale'
check for 'Exoscale' returned not-found[1]
Checking for datasource 'RbxCloud' via 'dscheck_RbxCloud'
check for 'RbxCloud' returned not-found[1]
Checking for datasource 'UpCloud' via 'dscheck_UpCloud'
check for 'UpCloud' returned not-found[1]
Checking for datasource 'VMware' via 'dscheck_VMware'
check for 'VMware' returned not-found[1]
Checking for datasource 'LXD' via 'dscheck_LXD'
check for 'LXD' returned not-found[1]
Checking for datasource 'NWCS' via 'dscheck_NWCS'
check for 'NWCS' returned not-found[1]
Checking for datasource 'Akamai' via 'dscheck_Akamai'
check for 'Akamai' returned not-found[1]
Checking for datasource 'WSL' via 'dscheck_WSL'
check for 'WSL' returned not-found[1]
found= maybe=
No ds found [mode=search, notfound=disabled]. Disabled cloud-init [1]
[up unavailables] returning 1
-- cfg --
{
"di_report": {
"datasource_list": []
}
}
-- files --
=== /sys/class/dmi/id/board_name ===
LXD
=== /run/cloud-init/cloud.cfg ===
di_report:
datasource_list: [ ]
# reporting not found result. notfound=disabled.
=== /run/cloud-init/.ds-identify.result ===
1
------------------------------ Captured log call -------------------------------
2024-03-24 17:54:20 DEBUG tests.unittests.test_ds_identify:test_ds_identify.py:277 Writing mocked ds-identify to /tmp/tmp8wa0dasi/ds-identify for debugging.
2024-03-24 17:54:20 DEBUG cloudinit.subp:subp.py:222 Running command ['sh', '-c', '. /tmp/ci-TestDsIdentify.dlqs7qhs/_shwrap'] with allowed return codes [0] (shell=False, capture=True)
2024-03-24 17:54:20 DEBUG cloudinit.util:util.py:1600 Reading from /tmp/ci-TestDsIdentify.dlqs7qhs/run/cloud-init/cloud.cfg (quiet=False)
2024-03-24 17:54:20 DEBUG cloudinit.util:util.py:1609 Read 86 bytes from /tmp/ci-TestDsIdentify.dlqs7qhs/run/cloud-init/cloud.cfg
2024-03-24 17:54:20 DEBUG cloudinit.util:util.py:1600 Reading from /tmp/ci-TestDsIdentify.dlqs7qhs/_shwrap (quiet=False)
2024-03-24 17:54:20 DEBUG cloudinit.util:util.py:1609 Read 2109 bytes from /tmp/ci-TestDsIdentify.dlqs7qhs/_shwrap
2024-03-24 17:54:20 DEBUG cloudinit.util:util.py:1600 Reading from /tmp/ci-TestDsIdentify.dlqs7qhs/sys/class/dmi/id/board_name (quiet=False)
2024-03-24 17:54:20 DEBUG cloudinit.util:util.py:1609 Read 4 bytes from /tmp/ci-TestDsIdentify.dlqs7qhs/sys/class/dmi/id/board_name
2024-03-24 17:54:20 DEBUG cloudinit.util:util.py:1600 Reading from /tmp/ci-TestDsIdentify.dlqs7qhs/run/cloud-init/cloud.cfg (quiet=False)
2024-03-24 17:54:20 DEBUG cloudinit.util:util.py:1609 Read 86 bytes from /tmp/ci-TestDsIdentify.dlqs7qhs/run/cloud-init/cloud.cfg
2024-03-24 17:54:20 DEBUG cloudinit.util:util.py:1600 Reading from /tmp/ci-TestDsIdentify.dlqs7qhs/run/cloud-init/.ds-identify.result (quiet=False)
2024-03-24 17:54:20 DEBUG cloudinit.util:util.py:1609 Read 2 bytes from /tmp/ci-TestDsIdentify.dlqs7qhs/run/cloud-init/.ds-identify.result
=========================== short test summary info ============================
FAILED tests/unittests/test_ds_identify.py::TestDsIdentify::test_lxd_kvm_jammy_env
= 1 failed, 5245 passed, 7 skipped, 8 xfailed, 302 warnings in 75.07s (0:01:15) =
The text was updated successfully, but these errors were encountered:
Bug report
tests/unittests/test_ds_identify.py::TestDsIdentify::test_lxd_kvm_jammy_env testcase fails on Alpine Linux.
This may perhaps be due to limitations in the
virt-what
utility used as an alternative to thesystemd-detect-virt
utility on Alpine, although I'd expect the case to mock any calls to such utils.Steps to reproduce the problem
Environment details
cloud-init logs
The text was updated successfully, but these errors were encountered: