Comment 1 for bug 1591181

Revision history for this message
Scott Moser (smoser) wrote :

your recreate steps have a bit of an issue above, in that you 'echo' and then <<EOF. which just doesn't do anything but create empty user-data.

I might suggest using mount-image-callback as it makes a bit nicer.

sdir=$PWD/sdir
echo "Mounting cloudimg.raw into $sdir"
mkdir -p $sdir/var/lib/cloud/seed/nocloud
printf "dsmode: local\n" > $mnt_dir/var/lib/cloud/seed/nocloud/meta-data
cat > $sdir/var/lib/cloud/seed/nocloud/user-data <<EOF
#cloud-config
chpasswd:
  expire: False
  list: |
    root:passw0rd
EOF

tar -cf - -C "$sdir" . | sudo mount-image-callback cloudimg.raw -- tar -C _MOUNTPOINT_ -xvf -

That way you dont have to be root for anything other than the mount-image-callback or know about the offset of the partition.

the resize issue is actually fixed under bug 1587971. Your stacktrace above showed a bug that I'm fixing now that occurred on reboot of a DataSourceNoCloud. I opened that as bug 1592505.