Comment 2 for bug 2013403

Revision history for this message
Brett Holman (holmanb) wrote :

This sounds like possibly something should be waiting on cloud-init and isn't?

I reproduced this error with the following:

qemu-system-riscv64 \
    -machine virt \
    -cpu rv64 \
    -m 1G \
    -device virtio-blk-device,drive=hd \
    -drive file=lunar-preinstalled-server-riscv64+unmatched.img,if=none,id=hd \
    -device virtio-net-device,netdev=net \
    -netdev user,id=net,hostfwd=tcp::2222-:22 \
    -bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf \
    -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \
    -object rng-random,filename=/dev/urandom,id=rng \
    -device virtio-rng-device,rng=rng \
    -append "root=LABEL=rootfs console=ttyS0" \
    -nographic

Log:

[ OK ] Created slice system-getty.slice - Slice /system/getty.
[ OK ] Started <email address hidden> - Getty on tty1.
[ OK ] Reached target getty.target - Login Prompts.
[ OK ] Started systemd-logind.service - User Login Management.
[ OK ] Started unattended-upgradeā€¦0m - Unattended Upgrades Shutdown.

Ubuntu Lunar Lobster (development branch) ubuntu ttyS0

ubuntu login: ubuntu
Password:

Login incorrect
ubuntu login: [ 148.735449] Dev loop3: unable to read RDB block 8
[ 166.631180] cloud-init[715]: Cloud-init v. 23.1.1-0ubuntu2 running 'modules:config' at Fri, 31 Mar 2023 18:48:02 +0000. Up 165.88 seconds.
[ 167.335569] cloud-init[715]: 2023-03-31 18:48:03,547 - cc_set_passwords.py[WARNING]: DEPRECATION: key 'lists' is now deprecated. Use 'users'.
[ 177.934571] cloud-init[751]: Cloud-init v. 23.1.1-0ubuntu2 running 'modules:final' at Fri, 31 Mar 2023 18:48:13 +0000. Up 177.29 seconds.
ci-info: no authorized SSH keys fingerprints found for user ubuntu.
<14>Mar 31 18:48:15 cloud-init: #############################################################
<14>Mar 31 18:48:15 cloud-init: -----BEGIN SSH HOST KEY FINGERPRINTS-----
<14>Mar 31 18:48:15 cloud-init: 1024 SHA256:szpuJaLNqHJR/i5rtmAW0QBDc4rOiZkbzg0oJr+5x2g root@ubuntu (DSA)
<14>Mar 31 18:48:15 cloud-init: 256 SHA256:c7UTAof0IjqZWPy43dgZmqxdo4ajOcWCsAwt7W/EoOY root@ubuntu (ECDSA)
<14>Mar 31 18:48:16 cloud-init: 256 SHA256:ZCyPk622f7s3RgJdgB5ps5X00BMA5/8wUfM8L3sgZDY root@ubuntu (ED25519)
<14>Mar 31 18:48:16 cloud-init: 3072 SHA256:MrkVMol0wlpj6LM2LQvW5wsZbOrP4BXv5V2m8p5+u1A root@ubuntu (RSA)
<14>Mar 31 18:48:16 cloud-init: -----END SSH HOST KEY FINGERPRINTS-----
<14>Mar 31 18:48:16 cloud-init: #############################################################
-----BEGIN SSH HOST KEY KEYS-----
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIuN1I/bvbih1NnNZ7kNBBEbZBDjQ/yLwB+S+iLJIbR3n70G8VHsPNP7B9DQmA/DGaC6kTL78i1pLp17EggzjNI= root@ubuntu
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDjt0gd0c3qEw7HrZfWFFpWlh0Folwu2Wh1vR9xmkxEh root@ubuntu
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCJcFHCuEnviGbmy/Q33WgKlC71YaNM88of/mJh7FY/edNMjjF6va1oB0QLRuZQ3OTWFcujOCej3mdqwcF6R/SjKRnzXsmvPRJv+KE4dgMU0PVKWeHM5fu4QChHskVMF6j8FHq+RbPV5iytKQCQ3BA6I1WkV4Y6MVXlGN+jMoeKPENEBmhA8t1yPZBH6yeq2Aq9UuuLYjZhiO3mm05HaXqzwKDP8TRU1MBMsyOhoVmcgiQ7uH3wY00mu11/xGgKo7lSPVV3C1v7gME6ROX2zRLklMOWDt7wehvSEae7NJ8CcihJxczrUhw30/mbNoPS7BHw8Lbq4kffRHwznX4j8YKZrke0QIOFqTguIw90x2GaDmaY5iw/TZEyav/gvl0SicAwXNrdOgtY98OgZL5ddtESsd6ZHX1CY/HkPAlaWooroKh8l5V+kW+ioYHhG/nDV5nPLa76XlxkA+VjQnKtS2tk+ZJuR/rVca9ATs9MgQ5sg156ofl2rGiQHERg5kQN0BU= root@ubuntu
-----END SSH HOST KEY KEYS-----
[ 180.509275] cloud-init[751]: Cloud-init v. 23.1.1-0ubuntu2 finished at Fri, 31 Mar 2023 18:48:16 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]. Up 180.41 seconds
ubuntu
Password:
You are required to change your password immediately (administrator enforced).
Changing password for ubuntu.
Current password:

ubuntu@ubuntu:~$ lscpu
Architecture: riscv64
  Byte Order: Little Endian
CPU(s): 1
  On-line CPU(s) list: 0
NUMA:
  NUMA node(s): 1
  NUMA node0 CPU(s): 0

Unrelated to this issue I see that the userdata config shipped with the image is using a deprecated format:

ubuntu@ubuntu:~$ sudo cloud-init query userdata
#cloud-config
chpasswd:
    expire: True
    list:
        - ubuntu:ubuntu
ssh_pwauth: True

These days, the more structured `users` key is preferred over `list`, so the shipped config might look something like this:

#cloud-config
chpasswd:
    expire: True
    users:
        - name: ubuntu
          password: ubuntu
          type: text
ssh_pwauth: True