Comment 6 for bug 1991261

Revision history for this message
Chad Smith (chad.smith) wrote (last edit ):

Dave thanks again! What isn't attached is user-data that was provided at launch. If you get a chance to `sudo cloud-init query userdata` and see if that userdata is clean to attach that'd be great
   [NOTE] make sure to scrub miss-piggy's password or any other sensitive data before attaching

 What I see on the instance data in that NoCloud datasource config as seen from the mounted from
  "subplatform": "config-disk (/dev/mmcblk0p1)".

The metadata file exposed to cloud-init has only

  "meta_data": {
   "dsmode": "net",
   "instance-id": "nocloud",
   "instance_id": "cloud-image"
  }

And for some reason the local-hostname determined on this system is
  "local_hostname": "ubuntu" instead of what I expect would have been miss-piggy.

This can be seen with `sudo cloud-init query --all` on this system or /run/cloud-init/instance-data-sensitive.json

I'd generally expect either config drive meta-data to specify "local-hostname": "miss-piggy" or your user-data during launch.

The reason I'd also like to get a look at user-data is because cloud-init is also giving some warnings about deprecation of certain #cloud-config formatting choices, that it's probably best we also sort in Raspberry Pi setup/test infrastructure. Eventually those deprecations will break your test harness.

Sep 29 18:27:11.316479 ubuntu cloud-init[793]: chpasswd.list: DEPRECATED: List of ``username:password`` pairs. Each user will have the corresponding password set. A password can be randomly generated by specifying ``RANDOM`` or ``R`` as a user's password. A hashed password, created by a tool like ``mkpasswd``, can be specified. A regex (``r'\$(1|2a|2y|5|6)(\$.+){2}'``) is used to determine if a password value should be treated as a hash.
Sep 29 18:27:11.316479 ubuntu cloud-init[793]: Use of a multiline string for this field is DEPRECATED and will result in an error in a future version of cloud-init.
Sep 29 18:27:12.909071 ubuntu kernel: EXT4-fs (mmcblk0p2): resizing filesystem from 931286 to 3823739 blocks

In this deployment, It looks like there is some logic in cloud-init that is incorrectly trying to review/setup hostname

2022-09-29 18:27:14,065 - cc_set_hostname.py[DEBUG]: Setting the hostname to ubuntu (miss-piggy)

Normally I'd expect to see miss-piggy (miss-piggy) in that log message as the format is:
Setting the hostname to <fqdn> (<hostname>)

Digging into why 'ubuntu' is being discovered in 22.3.3 as potential fqdn reference instead of miss-piggy, but your user-data will help shed light on that.