Install of upstream Docker package only fails when running through cloud-init
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
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/
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_
sudo apt-key adv --keyserver hkp://p80.
sudo bash -c 'echo "deb https:/
sudo apt-get update && sudo apt-get install -y docker-engine
Expected:
To be able to install the package via ec2-user-
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:/
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-
Candidate: 0.7.7~bzr1149-
Version table:
0.
500 http://
*** 0.7.7~bzr1149-
100 /var/lib/
0.
500 http://
# apt-cache policy systemd
systemd:
Installed: 225-1ubuntu9
Candidate: 225-1ubuntu9
Version table:
*** 225-1ubuntu9 0
500 http://
100 /var/lib/
# 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:/
1.9.0-0~wily 0
500 https:/
1.8.3-0~wily 0
500 https:/
1.8.2-0~wily 0
500 https:/
1.8.1-0~wily 0
500 https:/
1.8.0-0~wily 0
500 https:/
1.7.1-0~wily 0
500 https:/
1.6.2-0~wily 0
500 https:/
1.6.1-0~wily 0
500 https:/
1.6.0-0~wily 0
500 https:/
1.5.0-0~wily 0
500 https:/
Changed in cloud-init (Ubuntu): | |
importance: | Undecided → Medium |
I wonder if you can work around this by using policy-rc.d to ask for the docker service not to be started at install time, and instead when you manually try to start it (as you're reporting that doing it a bit later is working?)
That doesn't solve the actual problem though of course. I'd like to know what Scott thinks.