Skip to content

Instantly share code, notes, and snippets.

@mikemccracken
Last active January 28, 2016 17:24
Show Gist options
  • Save mikemccracken/6e339dc36a1d16f05cab to your computer and use it in GitHub Desktop.
Save mikemccracken/6e339dc36a1d16f05cab to your computer and use it in GitHub Desktop.
problem with cloud-init inside trusty containers

using lxd from ppa:ubuntu-lxc/lxd-stable on trusty is showing an issue that's new to me:

with this recent image:

ubuntu@rickross:~⟫ lxc image list
+--------+--------------+--------+--------------------------------------+--------+----------+-------------------------------+
| ALIAS  | FINGERPRINT  | PUBLIC |             DESCRIPTION              |  ARCH  |   SIZE   |          UPLOAD DATE          |
+--------+--------------+--------+--------------------------------------+--------+----------+-------------------------------+
| ubuntu | 1032903165a6 | no     | Ubuntu 14.04 LTS server (20160114.5) | x86_64 | 118.21MB | Jan 27, 2016 at 11:00pm (UTC) |
+--------+--------------+--------+--------------------------------------+--------+----------+-------------------------------+

lxc init foo and lxc start foo bring up a working container, but cloud-init throws an error. if you then lxc exec foo -- tail /var/log/cloud-init-output.log, you get this:

Generation complete.
Cloud-init v. 0.7.5 running 'modules:final' at Thu, 28 Jan 2016 17:14:07 +0000. Up 6.0 seconds.
ci-info: no authorized ssh keys fingerprints found for user ubuntu.
2016-01-28 17:14:07,258 - util.py[WARNING]: Running ssh-authkey-fingerprints (<module 'cloudinit.config.cc_ssh_authkey_fingerprints' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pyc'>) failed
2016-01-28 17:14:07,278 - cc_keys_to_console.py[WARNING]: Writing keys to the system console failed!
2016-01-28 17:14:07,279 - util.py[WARNING]: Running keys-to-console (<module 'cloudinit.config.cc_keys_to_console' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_keys_to_console.pyc'>) failed
Cloud-init v. 0.7.5 finished at Thu, 28 Jan 2016 17:14:07 +0000. Datasource DataSourceNoCloudNet [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net].  Up 6.0 seconds
@mikemccracken
Copy link
Author

more versions

1 ubuntu@rickross:~⟫ lxc version
2.0.0.beta1
ubuntu@rickross:~⟫ sudo apt-cache policy lxd
lxd:
  Installed: 2.0.0~beta1-0ubuntu3~ubuntu14.04.1~ppa1
  Candidate: 2.0.0~beta1-0ubuntu3~ubuntu14.04.1~ppa1
  Version table:
 *** 2.0.0~beta1-0ubuntu3~ubuntu14.04.1~ppa1 0
        500 http://ppa.launchpad.net/ubuntu-lxc/lxd-stable/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

ubuntu@rickross:~⟫ sudo apt-cache policy liblxc1 lxc
liblxc1:
  Installed: 1.1.5-0ubuntu5~ubuntu14.04.1~ppa1
  Candidate: 1.1.5-0ubuntu5~ubuntu14.04.1~ppa1
  Version table:
 *** 1.1.5-0ubuntu5~ubuntu14.04.1~ppa1 0
        500 http://ppa.launchpad.net/ubuntu-lxc/lxd-stable/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     1.0.8-0ubuntu0.3 0
        500 http://archive.ubuntu.com//ubuntu/ trusty-updates/main amd64 Packages
     1.0.7-0ubuntu0.7 0
        500 http://archive.ubuntu.com//ubuntu/ trusty-security/main amd64 Packages
     1.0.3-0ubuntu3 0
        500 http://archive.ubuntu.com//ubuntu/ trusty/main amd64 Packages
lxc:
  Installed: 1.1.5-0ubuntu5~ubuntu14.04.1~ppa1
  Candidate: 1.1.5-0ubuntu5~ubuntu14.04.1~ppa1
  Version table:
 *** 1.1.5-0ubuntu5~ubuntu14.04.1~ppa1 0
        500 http://ppa.launchpad.net/ubuntu-lxc/lxd-stable/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     1.0.8-0ubuntu0.3 0
        500 http://archive.ubuntu.com//ubuntu/ trusty-updates/main amd64 Packages
     1.0.7-0ubuntu0.7 0
        500 http://archive.ubuntu.com//ubuntu/ trusty-security/main amd64 Packages
     1.0.3-0ubuntu3 0
        500 http://archive.ubuntu.com//ubuntu/ trusty/main amd64 Packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment