Public bug reported: I'm not sure if this is a cloud-init issue, a systemd issue, or an issue with the package I'm trying to install, but given that I can install the package fine outside of cloud-init, I thought I'd mention it here in case this is an issue with cloud-init/wily/systemd, or perhaps someone more knowledgeable can suggest a workaround.
To summarize, this is easily duplicated by spinning up a new ec2 instance using ami-305d115a on a m3.medium and the following user-data: #!/bin/bash export DEBIAN_FRONTEND=noninteractive sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D sudo bash -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-wily main" > /etc/apt/sources.list.d/docker.list' sudo apt-get update && sudo apt-get install -y docker-engine Expected: To be able to install the package via ec2-user-data/cloud-init Actual: Package fails to install through cloud-init, but installs fine at terminal. Comparing the "journal -xe" from both cases seems to indicate that a dependent systemd service (docker.socket) installed by the package is not getting started when the install is run from cloud-init More details: https://github.com/docker/docker/issues/18444 System details: # uname -a Linux ip-10-229-17-174 4.2.0-19-generic #23-Ubuntu SMP Wed Nov 11 11:39:30 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily # apt-cache policy cloud-init cloud-init: Installed: 0.7.7~bzr1149-0ubuntu4 Candidate: 0.7.7~bzr1149-0ubuntu5 Version table: 0.7.7~bzr1149-0ubuntu5 0 500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ wily-updates/main amd64 Packages *** 0.7.7~bzr1149-0ubuntu4 0 100 /var/lib/dpkg/status 0.7.7~bzr1149-0ubuntu1 0 500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages # apt-cache policy systemd systemd: Installed: 225-1ubuntu9 Candidate: 225-1ubuntu9 Version table: *** 225-1ubuntu9 0 500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages 100 /var/lib/dpkg/status # apt-cache policy docker-engine docker-engine: Installed: (none) Candidate: 1.9.1-0~wily Version table: 1.9.1-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages 1.9.0-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages 1.8.3-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages 1.8.2-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages 1.8.1-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages 1.8.0-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages 1.7.1-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages 1.6.2-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages 1.6.1-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages 1.6.0-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages 1.5.0-0~wily 0 500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages ** Affects: cloud-init (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1525361 Title: Install of package only fails when running through cloud-init To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1525361/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs