Skip to content

openbsd cloud-init fails to apply (could not find data source) #12

@jbpratt

Description

@jbpratt

Playing around with packaging and booting an openbsd-6.9 CDI (no customizations). On boot, a few exceptions within cloud-init are thrown plus some concerning logs (util.py[WARNING]: Can not apply stage final, no datasource found! Likely bad things to come! 😅 ). We should work with @goneri (sorry for the tag!) on understanding and resolving these issues. This will also allow the 'upstream' image source (https://bsd-cloud-image.org/) to be consistently tested on kubevirt within our pipeline.

OpenBSD console logs
❯ virtctl console -n kargo openbsd-br0
Successfully connected to openbsd-br0 console. The escape sequence is ^]

cannot open hd0a:/etc/random.seed: No such file or directory
booting hd0a:/bsd: 14411048+3224584+344096+0+1175552 [1009441+128+1145856+866050]=0x1528eb0
entry point at 0xffffffff81001000
[ using 3022512 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
	The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2021 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.9 (GENERIC.MP) #473: Mon Apr 19 10:40:28 MDT 2021
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3983396864 (3798MB)
avail mem = 3847290880 (3669MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf5a00 (11 entries)
bios0: vendor SeaBIOS version "1.14.0-1.el8s" date 04/01/2014
bios0: KubeVirt None
acpi0 at bios0: ACPI 3.0
acpi0: sleep states S5
acpi0: tables DSDT FACP APIC MCFG WAET
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz, 664.21 MHz, 06-3c-03
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,VMX,SSSE3,FMA3,CX16,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,ARAT,XSAVEOPT,MELTDOWN
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 999MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz, 750.26 MHz, 06-3c-03
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,VMX,SSSE3,FMA3,CX16,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,ARAT,XSAVEOPT,MELTDOWN
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache
cpu1: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu1: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu1: smt 1, core 0, package 0
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xb0000000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
"ACPI0006" at acpi0 not configured
acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001
acpicmos0 at acpi0
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"QEMU0002" at acpi0 not configured
"ACPI0010" at acpi0 not configured
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
cpu0: using VERW MDS workaround
pvbus0 at mainbus0: KVM
pvclock0 at pvbus0
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82G33 Host" rev 0x00
vga1 at pci0 dev 1 function 0 "Bochs VGA" rev 0x02
wsdisplay at vga1 not configured
ppb0 at pci0 dev 2 function 0 vendor "Red Hat", unknown product 0x000c rev 0x00: apic 0 int 22
pci1 at ppb0 bus 1
virtio0 at pci1 dev 0 function 0 "Qumranet Virtio 1.x Network" rev 0x01
vio0 at virtio0: address 02:f4:00:00:00:00
virtio0: msix shared
ppb1 at pci0 dev 2 function 1 vendor "Red Hat", unknown product 0x000c rev 0x00: apic 0 int 22
pci2 at ppb1 bus 2
virtio1 at pci2 dev 0 function 0 "Qumranet Virtio 1.x SCSI" rev 0x01
vioscsi0 at virtio1: qsize 256
scsibus1 at vioscsi0: 255 targets
virtio1: msix per-VQ
ppb2 at pci0 dev 2 function 2 vendor "Red Hat", unknown product 0x000c rev 0x00: apic 0 int 22
pci3 at ppb2 bus 3
virtio2 at pci3 dev 0 function 0 "Qumranet Virtio 1.x Console" rev 0x01
virtio2: no matching child driver; not configured
ppb3 at pci0 dev 2 function 3 vendor "Red Hat", unknown product 0x000c rev 0x00: apic 0 int 22
pci4 at ppb3 bus 4
virtio3 at pci4 dev 0 function 0 "Qumranet Virtio 1.x Storage" rev 0x01
vioblk0 at virtio3
scsibus2 at vioblk0: 1 targets
sd0 at scsibus2 targ 0 lun 0: <VirtIO, Block Device, >
sd0: 2048MB, 512 bytes/sector, 4194304 sectors
virtio3: msix per-VQ
ppb4 at pci0 dev 2 function 4 vendor "Red Hat", unknown product 0x000c rev 0x00: apic 0 int 22
pci5 at ppb4 bus 5
virtio4 at pci5 dev 0 function 0 "Qumranet Virtio 1.x Storage" rev 0x01
vioblk1 at virtio4
scsibus3 at vioblk1: 1 targets
sd1 at scsibus3 targ 0 lun 0: <VirtIO, Block Device, >
sd1: 1MB, 512 bytes/sector, 2048 sectors
virtio4: msix per-VQ
ppb5 at pci0 dev 2 function 5 vendor "Red Hat", unknown product 0x000c rev 0x00: apic 0 int 22
pci6 at ppb5 bus 6
virtio5 at pci6 dev 0 function 0 vendor "Qumranet", unknown product 0x1045 rev 0x01
viomb0 at virtio5
virtio5: apic 0 int 22
ppb6 at pci0 dev 2 function 6 vendor "Red Hat", unknown product 0x000c rev 0x00: apic 0 int 22
pci7 at ppb6 bus 7
virtio6 at pci7 dev 0 function 0 "Qumranet Virtio 1.x RNG" rev 0x01
viornd0 at virtio6
virtio6: apic 0 int 22
ppb7 at pci0 dev 2 function 7 vendor "Red Hat", unknown product 0x000c rev 0x00: apic 0 int 22
pci8 at ppb7 bus 8
pcib0 at pci0 dev 31 function 0 "Intel 82801IB LPC" rev 0x02
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x02: msi, AHCI 1.0
scsibus4 at ahci0: 32 targets
ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x02: apic 0 int 16
iic0 at ichiic0
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0 mux 1
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT (using slow L1TF mitigation)
vscsi0 at root
scsibus5 at vscsi0: 256 targets
softraid0 at root
scsibus6 at softraid0: 256 targets
root on sd0a (a46cc531a8dcc550.a) swap on sd0b dump on sd0b
Automatic boot in progress: starting file system checks.
/dev/sd0a (a46cc531a8dcc550.a): file system is clean; not checking
pf enabled
2021-12-03 14:17:09,518 - handlers.py[DEBUG]: start: init-local: searching for local datasources
2021-12-03 14:17:09,556 - util.py[WARNING]: Unable to read uptime using method: ctypes
2021-12-03 14:17:09,557 - util.py[DEBUG]: Unable to read uptime using method: ctypes
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1820, in uptime
    uptime_str = str(time.time() - boottime())
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1802, in boottime
    if libc.sysctlbyname(b"kern.boottime" + NULL_BYTES, ctypes.byref(buf),
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: Unable to resolve symbol
2021-12-03 14:17:09,572 - util.py[DEBUG]: Attempting to remove /run/cloud-init/status.json
2021-12-03 14:17:09,574 - util.py[DEBUG]: Attempting to remove /run/cloud-init/result.json
2021-12-03 14:17:09,575 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/data/status.json
2021-12-03 14:17:09,576 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/data/result.json
2021-12-03 14:17:09,577 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmpq58j0fia) - w: [644] 469 bytes/chars
2021-12-03 14:17:09,579 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/status.json' => '../../var/lib/cloud/data/status.json'
2021-12-03 14:17:09,619 - util.py[DEBUG]: Reading from /proc/1/environ (quiet=False)
2021-12-03 14:17:09,621 - util.py[DEBUG]: Reading from /proc/self/status (quiet=False)
2021-12-03 14:17:09,622 - util.py[DEBUG]: Reading from /proc/cmdline (quiet=False)
2021-12-03 14:17:09,628 - util.py[WARNING]: Unable to read uptime using method: ctypes
2021-12-03 14:17:09,629 - util.py[DEBUG]: Unable to read uptime using method: ctypes
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1820, in uptime
    uptime_str = str(time.time() - boottime())
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1802, in boottime
    if libc.sysctlbyname(b"kern.boottime" + NULL_BYTES, ctypes.byref(buf),
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: Unable to resolve symbol
2021-12-03 14:17:09,637 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2021-12-03 14:17:09,640 - util.py[DEBUG]: Read 2068 bytes from /etc/cloud/cloud.cfg
2021-12-03 14:17:09,641 - util.py[DEBUG]: Attempting to load yaml from string of length 2068 with allowed root types (<class 'dict'>,)
2021-12-03 14:17:09,664 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False)
2021-12-03 14:17:09,665 - util.py[DEBUG]: Read 2070 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg
2021-12-03 14:17:09,667 - util.py[DEBUG]: Attempting to load yaml from string of length 2070 with allowed root types (<class 'dict'>,)
2021-12-03 14:17:09,683 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False)
2021-12-03 14:17:09,684 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<class 'dict'>,)
2021-12-03 14:17:09,687 - util.py[DEBUG]: loaded blob returned None, returning default.
2021-12-03 14:17:09,690 - util.py[DEBUG]: Redirecting <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> to | tee -a /var/log/cloud-init-output.log
2021-12-03 14:17:09,701 - util.py[DEBUG]: Redirecting <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'> to | tee -a /var/log/cloud-init-output.log
2021-12-03 14:17:09,705 - main.py[DEBUG]: Logging being reset, this logger may no longer be active shortly
Cloud-init v. 21.2 running 'init-local' at Fri, 03 Dec 2021 14:17:09 +0000. Up ?? seconds.
2021-12-03 14:17:09,818 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command
2021-12-03 14:17:09,898 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command
2021-12-03 14:17:09,913 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command
2021-12-03 14:17:09,915 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command
2021-12-03 14:17:09,916 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command
2021-12-03 14:17:09,918 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command
2021-12-03 14:17:09,954 - util.py[WARNING]: Failed to parse /etc/resolv.conf, use new empty file
2021-12-03 14:17:09,973 - util.py[WARNING]: failed stage init-local
failed run of stage init-local
------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/cmd/main.py", line 322, in main_init
    init.fetch(existing=existing)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 363, in fetch
    return self._get_data_source(existing=existing)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 263, in _get_data_source
    (ds, dsname) = sources.find_source(self.cfg,
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/sources/__init__.py", line 817, in find_source
    raise DataSourceNotFoundException(msg)
cloudinit.sources.DataSourceNotFoundException: Did not find any data source, searched classes: (DataSourceNoCloud, DataSourceConfigDrive, DataSourceAzure, DataSourceOpenStackLocal, DataSourceEc2Local)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/cmd/main.py", line 652, in status_wrapper
    ret = functor(name, args)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/cmd/main.py", line 340, in main_init
    init.apply_network_config(bring_up=not args.local)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 824, in apply_network_config
    return self.distro.apply_network_config(
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/distros/__init__.py", line 210, in apply_network_config
    dev_names = self._write_network_config(netconfig)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/distros/bsd.py", line 124, in _write_network_config
    return self._supported_write_network_config(netconfig)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/distros/__init__.py", line 122, in _supported_write_network_config
    renderer.render_network_config(network_config)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/net/renderer.py", line 54, in render_network_config
    return self.render_network_state(
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/net/bsd.py", line 149, in render_network_state
    self.start_services(run=self._postcmds)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/net/openbsd.py", line 39, in start_services
    subp.subp(['pkill', 'dhclient'])
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/subp.py", line 293, in subp
    raise ProcessExecutionError(stdout=out, stderr=err,
cloudinit.subp.ProcessExecutionError: Unexpected error while running command.
Command: ['pkill', 'dhclient']
Exit code: 1
Reason: -
Stdout:
Stderr:
------------------------------------------------------------
starting network
WARNING: /etc/hostname.vio0 is insecure, fixing permissions.
vio0: no lease....got lease
vio0: 192.168.1.205 lease accepted from 192.168.1.1 (84:16:f9:7d:0d:4b)
dd: /var/db/host.random: No such file or directory
chmod: /var/db/host.random: No such file or directory
2021-12-03 14:17:13,977 - handlers.py[DEBUG]: start: init-network: searching for network datasources
2021-12-03 14:17:13,989 - util.py[WARNING]: Unable to read uptime using method: ctypes
2021-12-03 14:17:13,990 - util.py[DEBUG]: Unable to read uptime using method: ctypes
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1820, in uptime
    uptime_str = str(time.time() - boottime())
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1802, in boottime
    if libc.sysctlbyname(b"kern.boottime" + NULL_BYTES, ctypes.byref(buf),
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: Unable to resolve symbol
2021-12-03 14:17:14,001 - util.py[DEBUG]: Reading from /var/lib/cloud/data/status.json (quiet=False)
2021-12-03 14:17:14,002 - util.py[DEBUG]: Read 602 bytes from /var/lib/cloud/data/status.json
2021-12-03 14:17:14,004 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmpo3k8epb_) - w: [644] 617 bytes/chars
2021-12-03 14:17:14,006 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/status.json' => '../../var/lib/cloud/data/status.json'
2021-12-03 14:17:14,008 - util.py[DEBUG]: Attempting to remove /run/cloud-init/status.json
2021-12-03 14:17:14,042 - util.py[DEBUG]: Reading from /proc/1/environ (quiet=False)
2021-12-03 14:17:14,044 - util.py[DEBUG]: Reading from /proc/self/status (quiet=False)
2021-12-03 14:17:14,045 - util.py[DEBUG]: Reading from /proc/cmdline (quiet=False)
2021-12-03 14:17:14,051 - util.py[WARNING]: Unable to read uptime using method: ctypes
2021-12-03 14:17:14,052 - util.py[DEBUG]: Unable to read uptime using method: ctypes
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1820, in uptime
    uptime_str = str(time.time() - boottime())
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1802, in boottime
    if libc.sysctlbyname(b"kern.boottime" + NULL_BYTES, ctypes.byref(buf),
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: Unable to resolve symbol
2021-12-03 14:17:14,061 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2021-12-03 14:17:14,062 - util.py[DEBUG]: Read 2068 bytes from /etc/cloud/cloud.cfg
2021-12-03 14:17:14,063 - util.py[DEBUG]: Attempting to load yaml from string of length 2068 with allowed root types (<class 'dict'>,)
2021-12-03 14:17:14,084 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False)
2021-12-03 14:17:14,086 - util.py[DEBUG]: Read 2070 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg
2021-12-03 14:17:14,087 - util.py[DEBUG]: Attempting to load yaml from string of length 2070 with allowed root types (<class 'dict'>,)
2021-12-03 14:17:14,100 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False)
2021-12-03 14:17:14,101 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<class 'dict'>,)
2021-12-03 14:17:14,103 - util.py[DEBUG]: loaded blob returned None, returning default.
2021-12-03 14:17:14,105 - util.py[DEBUG]: Redirecting <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> to | tee -a /var/log/cloud-init-output.log
2021-12-03 14:17:14,114 - util.py[DEBUG]: Redirecting <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'> to | tee -a /var/log/cloud-init-output.log
2021-12-03 14:17:14,116 - main.py[DEBUG]: Logging being reset, this logger may no longer be active shortly
Cloud-init v. 21.2 running 'init' at Fri, 03 Dec 2021 14:17:14 +0000. Up ?? seconds.
ci-info: +++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++
ci-info: +--------+-------+----------------+------------+-------+------------+
ci-info: | Device |   Up  |    Address     |    Mask    | Scope | Hw-Address |
ci-info: +--------+-------+----------------+------------+-------+------------+
ci-info: |  enc0  | False |       .        |     .      |   .   |     .      |
ci-info: |  lo0   |  True |   127.0.0.1    | 0xff000000 |   .   |     .      |
ci-info: |  lo0   |  True |    ::1/128     |     .      |   .   |     .      |
ci-info: |  lo0   |  True | fe80::1%lo0/64 |     .      |  0x3  |     .      |
ci-info: |  vio0  |  True | 192.168.1.205  | 0xffffff00 |   .   |     .      |
ci-info: +--------+-------+----------------+------------+-------+------------+
ci-info:
2021-12-03 14:17:14,211 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command
2021-12-03 14:17:24,270 - util.py[WARNING]: No active metadata service found
2021-12-03 14:17:24,291 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command
2021-12-03 14:17:24,307 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command
2021-12-03 14:17:24,324 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command
2021-12-03 14:17:24,339 - dmi.py[WARNING]: did not find either path /sys/class/dmi/id or dmidecode command

You were disconnected from the console. This has one of the following reasons:
 - another user connected to the console of the target vm
 - network issues
websocket: close 1006 (abnormal closure): unexpected EOF

kmi  refactor-sysprep-on-host [$!?] 1m23s
❯ virtctl console -n kargo openbsd-br0
Successfully connected to openbsd-br0 console. The escape sequence is ^]

^CCloud-init 21.2 received SIGINT, exiting...
  Filename: /usr/local/lib/python3.8/site-packages/urllib3/util/connection.py
  Function: create_connection
  Line number: 86
    Filename: /usr/local/lib/python3.8/site-packages/urllib3/connection.py
    Function: _new_conn
    Line number: 169
      Filename: /usr/local/lib/python3.8/site-packages/urllib3/connection.py
      Function: connect
      Line number: 200
reordering libraries: done.
openssl: generating isakmpd/iked RSA keys... done.
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
starting early daemons: syslogd pflogd ntpd.
starting RPC daemons:.
savecore: /dev/sd0b: Device not configured
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
starting network daemons: sshd smtpd(failed) sndiod.
2021-12-03 14:19:08,916 - handlers.py[DEBUG]: start: modules-config: running modules for config
2021-12-03 14:19:08,928 - util.py[WARNING]: Unable to read uptime using method: ctypes
2021-12-03 14:19:08,929 - util.py[DEBUG]: Unable to read uptime using method: ctypes
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1820, in uptime
    uptime_str = str(time.time() - boottime())
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1802, in boottime
    if libc.sysctlbyname(b"kern.boottime" + NULL_BYTES, ctypes.byref(buf),
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: Unable to resolve symbol
2021-12-03 14:19:08,939 - util.py[DEBUG]: Reading from /var/lib/cloud/data/status.json (quiet=False)
2021-12-03 14:19:08,940 - util.py[DEBUG]: Read 617 bytes from /var/lib/cloud/data/status.json
2021-12-03 14:19:08,942 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmp0iri0ksn) - w: [644] 641 bytes/chars
2021-12-03 14:19:08,944 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/status.json' => '../../var/lib/cloud/data/status.json'
2021-12-03 14:19:08,946 - util.py[DEBUG]: Attempting to remove /run/cloud-init/status.json
2021-12-03 14:19:08,952 - util.py[WARNING]: Unable to read uptime using method: ctypes
2021-12-03 14:19:08,953 - util.py[DEBUG]: Unable to read uptime using method: ctypes
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1820, in uptime
    uptime_str = str(time.time() - boottime())
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1802, in boottime
    if libc.sysctlbyname(b"kern.boottime" + NULL_BYTES, ctypes.byref(buf),
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: Unable to resolve symbol
2021-12-03 14:19:08,961 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2021-12-03 14:19:08,962 - util.py[DEBUG]: Read 2068 bytes from /etc/cloud/cloud.cfg
2021-12-03 14:19:08,963 - util.py[DEBUG]: Attempting to load yaml from string of length 2068 with allowed root types (<class 'dict'>,)
2021-12-03 14:19:08,983 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False)
2021-12-03 14:19:08,985 - util.py[DEBUG]: Read 2070 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg
2021-12-03 14:19:08,986 - util.py[DEBUG]: Attempting to load yaml from string of length 2070 with allowed root types (<class 'dict'>,)
2021-12-03 14:19:08,999 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False)
2021-12-03 14:19:09,028 - util.py[DEBUG]: Reading from /proc/1/environ (quiet=False)
2021-12-03 14:19:09,029 - util.py[DEBUG]: Reading from /proc/self/status (quiet=False)
2021-12-03 14:19:09,030 - util.py[DEBUG]: Reading from /proc/cmdline (quiet=False)
2021-12-03 14:19:09,031 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<class 'dict'>,)
2021-12-03 14:19:09,033 - util.py[DEBUG]: loaded blob returned None, returning default.
2021-12-03 14:19:09,035 - handlers.py[DEBUG]: start: modules-config/check-cache: attempting to read from cache [trust]
2021-12-03 14:19:09,036 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/obj.pkl (quiet=False)
2021-12-03 14:19:09,037 - stages.py[DEBUG]: no cache found
2021-12-03 14:19:09,038 - handlers.py[DEBUG]: finish: modules-config/check-cache: SUCCESS: no cache found
2021-12-03 14:19:09,039 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance
2021-12-03 14:19:09,047 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.openbsd.Distro'>
2021-12-03 14:19:09,049 - __init__.py[DEBUG]: Looking for data source in: ['NoCloud', 'ConfigDrive', 'Azure', 'OpenStack', 'Ec2'], via packages ['', 'cloudinit.sources'] that matches dependencies []
2021-12-03 14:19:09,079 - __init__.py[DEBUG]: Searching for local data source in: []
2021-12-03 14:19:09,080 - util.py[WARNING]: Can not apply stage config, no datasource found! Likely bad things to come!
2021-12-03 14:19:09,081 - util.py[DEBUG]: Can not apply stage config, no datasource found! Likely bad things to come!
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/cmd/main.py", line 484, in main_modules
    init.fetch(existing="trust")
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 363, in fetch
    return self._get_data_source(existing=existing)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 263, in _get_data_source
    (ds, dsname) = sources.find_source(self.cfg,
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/sources/__init__.py", line 817, in find_source
    raise DataSourceNotFoundException(msg)
cloudinit.sources.DataSourceNotFoundException: Did not find any data source, searched classes: ()
Can not apply stage config, no datasource found! Likely bad things to come!
------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/cmd/main.py", line 484, in main_modules
    init.fetch(existing="trust")
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 363, in fetch
    return self._get_data_source(existing=existing)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 263, in _get_data_source
    (ds, dsname) = sources.find_source(self.cfg,
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/sources/__init__.py", line 817, in find_source
    raise DataSourceNotFoundException(msg)
cloudinit.sources.DataSourceNotFoundException: Did not find any data source, searched classes: ()
------------------------------------------------------------
2021-12-03 14:19:09,101 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmp_rgx2pk_) - w: [644] 728 bytes/chars
2021-12-03 14:19:09,103 - util.py[DEBUG]: cloud-init mode 'modules' took 0.185 seconds (N/A)
2021-12-03 14:19:09,104 - handlers.py[DEBUG]: finish: modules-config: SUCCESS: running modules for config
starting local daemons: cron.
2021-12-03 14:19:09,881 - handlers.py[DEBUG]: start: modules-final: running modules for final
2021-12-03 14:19:09,893 - util.py[WARNING]: Unable to read uptime using method: ctypes
2021-12-03 14:19:09,894 - util.py[DEBUG]: Unable to read uptime using method: ctypes
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1820, in uptime
    uptime_str = str(time.time() - boottime())
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1802, in boottime
    if libc.sysctlbyname(b"kern.boottime" + NULL_BYTES, ctypes.byref(buf),
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: Unable to resolve symbol
2021-12-03 14:19:09,904 - util.py[DEBUG]: Reading from /var/lib/cloud/data/status.json (quiet=False)
2021-12-03 14:19:09,905 - util.py[DEBUG]: Read 728 bytes from /var/lib/cloud/data/status.json
2021-12-03 14:19:09,907 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmptd74we02) - w: [644] 753 bytes/chars
2021-12-03 14:19:09,909 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/status.json' => '../../var/lib/cloud/data/status.json'
2021-12-03 14:19:09,911 - util.py[DEBUG]: Attempting to remove /run/cloud-init/status.json
2021-12-03 14:19:09,939 - util.py[WARNING]: Unable to read uptime using method: ctypes
2021-12-03 14:19:09,940 - util.py[DEBUG]: Unable to read uptime using method: ctypes
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1820, in uptime
    uptime_str = str(time.time() - boottime())
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/util.py", line 1802, in boottime
    if libc.sysctlbyname(b"kern.boottime" + NULL_BYTES, ctypes.byref(buf),
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: Unable to resolve symbol
2021-12-03 14:19:09,949 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2021-12-03 14:19:09,950 - util.py[DEBUG]: Read 2068 bytes from /etc/cloud/cloud.cfg
2021-12-03 14:19:09,951 - util.py[DEBUG]: Attempting to load yaml from string of length 2068 with allowed root types (<class 'dict'>,)
2021-12-03 14:19:09,972 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False)
2021-12-03 14:19:09,973 - util.py[DEBUG]: Read 2070 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg
2021-12-03 14:19:09,974 - util.py[DEBUG]: Attempting to load yaml from string of length 2070 with allowed root types (<class 'dict'>,)
2021-12-03 14:19:09,987 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False)
2021-12-03 14:19:10,018 - util.py[DEBUG]: Reading from /proc/1/environ (quiet=False)
2021-12-03 14:19:10,019 - util.py[DEBUG]: Reading from /proc/self/status (quiet=False)
2021-12-03 14:19:10,020 - util.py[DEBUG]: Reading from /proc/cmdline (quiet=False)
2021-12-03 14:19:10,021 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<class 'dict'>,)
2021-12-03 14:19:10,022 - util.py[DEBUG]: loaded blob returned None, returning default.
2021-12-03 14:19:10,024 - handlers.py[DEBUG]: start: modules-final/check-cache: attempting to read from cache [trust]
2021-12-03 14:19:10,026 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/obj.pkl (quiet=False)
2021-12-03 14:19:10,027 - stages.py[DEBUG]: no cache found
2021-12-03 14:19:10,028 - handlers.py[DEBUG]: finish: modules-final/check-cache: SUCCESS: no cache found
2021-12-03 14:19:10,029 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance
2021-12-03 14:19:10,038 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.openbsd.Distro'>
2021-12-03 14:19:10,040 - __init__.py[DEBUG]: Looking for data source in: ['NoCloud', 'ConfigDrive', 'Azure', 'OpenStack', 'Ec2'], via packages ['', 'cloudinit.sources'] that matches dependencies []
2021-12-03 14:19:10,068 - __init__.py[DEBUG]: Searching for local data source in: []
2021-12-03 14:19:10,069 - util.py[WARNING]: Can not apply stage final, no datasource found! Likely bad things to come!
2021-12-03 14:19:10,070 - util.py[DEBUG]: Can not apply stage final, no datasource found! Likely bad things to come!
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/cmd/main.py", line 484, in main_modules
    init.fetch(existing="trust")
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 363, in fetch
    return self._get_data_source(existing=existing)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 263, in _get_data_source
    (ds, dsname) = sources.find_source(self.cfg,
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/sources/__init__.py", line 817, in find_source
    raise DataSourceNotFoundException(msg)
cloudinit.sources.DataSourceNotFoundException: Did not find any data source, searched classes: ()
Can not apply stage final, no datasource found! Likely bad things to come!
------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/cmd/main.py", line 484, in main_modules
    init.fetch(existing="trust")
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 363, in fetch
    return self._get_data_source(existing=existing)
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/stages.py", line 263, in _get_data_source
    (ds, dsname) = sources.find_source(self.cfg,
  File "/usr/local/lib/python3.8/site-packages/cloud_init-21.2-py3.8.egg/cloudinit/sources/__init__.py", line 817, in find_source
    raise DataSourceNotFoundException(msg)
cloudinit.sources.DataSourceNotFoundException: Did not find any data source, searched classes: ()
------------------------------------------------------------
2021-12-03 14:19:10,095 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmpue88snr2) - w: [644] 840 bytes/chars
2021-12-03 14:19:10,097 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/result.json (via temporary file /var/lib/cloud/data/tmp711pb4aq) - w: [644] 341 bytes/chars
2021-12-03 14:19:10,099 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/result.json' => '../../var/lib/cloud/data/result.json'
2021-12-03 14:19:10,101 - util.py[DEBUG]: cloud-init mode 'modules' took 0.219 seconds (N/A)
2021-12-03 14:19:10,102 - handlers.py[DEBUG]: finish: modules-final: SUCCESS: running modules for final
Fri Dec  3 07:19:10 MST 2021

OpenBSD/amd64 (Amnesiac) (tty00)

login: kc2user
Password:
Login incorrect
login:

The image can be found at https://github.com/users/jbpratt/packages/container/package/openbsd

openbsd-br0.yml
---
# https://github.com/kubevirt/kubevirt/blob/master/docs/cloud-init.md
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
  name: openbsd-br0
  namespace: kargo
  labels:
    app: kargo
spec:
  running: true
  template:
    spec:
      evictionStrategy: LiveMigrate
      nodeSelector:
        node-role.kubernetes.io/kubevirt: ""
      domain:
        clock:
          utc: {}
          timer: {}
        cpu:
          cores: 1
          sockets: 1
          threads: 2
          model: host-passthrough
          dedicatedCpuPlacement: false
        devices:
          rng: {}
          autoattachPodInterface: false
          autoattachSerialConsole: true
          autoattachGraphicsDevice: true
          networkInterfaceMultiqueue: false
          disks:
            - name: containerdisk
              bootOrder: 1
              disk:
                bus: virtio
            - name: cloudinitdisk
              disk:
                bus: virtio
          interfaces:
          - name: enp1s0
            model: virtio
            bridge: {}
        machine:
          type: q35
        resources:
          limits:
            memory: 4G
          requests:
            memory: 4G
            devices.kubevirt.io/kvm: "1"
      hostname: openbsd-br0
      networks:
      - name: enp1s0
        multus:
          networkName: kargo-net-attach-def-br0
      terminationGracePeriodSeconds: 0
      accessCredentials:
      - sshPublicKey:
          source:
            secret:
              secretName: kargo-sshpubkey-kc2user
          propagationMethod:
            qemuGuestAgent:
              users:
              - "kc2user"
      volumes:
        - name: containerdisk
          containerDisk:
            image: ghcr.io/jbpratt/openbsd:6.9-f8e31e3
            imagePullPolicy: Always
        - name: cloudinitdisk
          cloudInitNoCloud:
            networkData: |
              version: 2
              ethernets:
                enp1s0:
                  dhcp4: true
                  dhcp6: true
                  dhcp-identifier: mac
            userData: |
              #cloud-config
              hostname: openbsd-br0
              ssh_pwauth: true
              disable_root: true
              chpasswd:
                list: |
                   kc2user:kc2user
                expire: False
              users:
                - name: kc2user
                  shell: /bin/bash
                  lock_passwd: false
                  sudo: ['ALL=(ALL) NOPASSWD:ALL']
                  groups: sudo,wheel
              growpart:
                mode: auto
                devices: ['/']
                ignore_growroot_disabled: true
              package_upgrade: true
              packages:
                - vim
                - screenfetch
              runcmd:
                - "screenfetch"

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions