Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defaults (!?) to debian-7 and this does not support 'docker' provisioner #139

Closed
DazWilkin opened this issue May 21, 2016 · 5 comments
Closed

Comments

@DazWilkin
Copy link
Contributor

config.vm.provision "docker"

Fails: please see output below.

It's unclear where the debian-7-wheezy-v20140619 image is being specified.

If I run the following command using the CLI, a debian-8 image is created:

gcloud compute instances create whatami

Editing the Vagrantfile to include:

google.image = "debian-8-jessie-v20160511"

Succeeds.

Apologies in advance for my ignorance. This is my first attempt to use Vagrant and, thanks to this provider, I am successfully now able to, not only use Vagrant, but have it generate instances on GCE and (with the image change) install Docker. I'm following along with Hashicorp's Nomad "getting started" guide which requires Docker and this now also installs successfully:

https://www.nomadproject.io/intro/getting-started/install.html

Full Disclosure: am a Googler working in Cloud Strategic Customer Engineering team.

==> default: Launching an instance with the following settings...
==> default:  -- Name:           [OBFUSCATED]
==> default:  -- Type:            n1-standard-1
==> default:  -- Disk type:       pd-standard
==> default:  -- Disk size:       10 GB
==> default:  -- Disk name:       
==> default:  -- Image:           debian-7-wheezy-v20140619
==> default:  -- Instance Group:  
==> default:  -- Zone:            us-east1-d
==> default:  -- Network:         default
==> default:  -- Metadata:        '{}'
==> default:  -- Tags:            '[]'
==> default:  -- IP Forward:      
==> default:  -- External IP:     
==> default:  -- Preemptible:     false
==> default:  -- Auto Restart:    true
==> default:  -- On Maintenance:  MIGRATE
==> default:  -- Autodelete Disk: true
==> default:  -- Scopes:          
==> default: Waiting for instance to become "ready"...
==> default: Machine is booted and ready for use!
==> default: Waiting for SSH to become available...
==> default: Machine is ready for SSH access!
==> default: Running provisioner: docker...
    default: Installing Docker onto machine...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 docker-engine : Depends: init-system-helpers (>= 1.18~) but it is not installable
                 Recommends: aufs-tools but it is not going to be installed
                 Recommends: cgroupfs-mount but it is not installable or
                             cgroup-lite but it is not installable
                 Recommends: git but it is not going to be installed


Stderr from the command:

stdin: is not a tty
+ sh -c apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server ha.pool.sks-keyservers.net
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <[email protected]>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
+ break
+ sh -c apt-key adv -k 58118E89F3A912897C070ADBF76221572C52609D >/dev/null
+ sh -c mkdir -p /etc/apt/sources.list.d
+ dpkg --print-architecture
+ sh -c echo deb [arch=amd64] https://apt.dockerproject.org/repo debian-wheezy main > /etc/apt/sources.list.d/docker.list
+ sh -c sleep 3; apt-get update; apt-get install -y -q docker-engine
W: There is no public key available for the following key IDs:
7638D0442B90D010
W: There is no public key available for the following key IDs:
9D6D8F6BC857C906
W: There is no public key available for the following key IDs:
7638D0442B90D010
E: Unable to correct problems, you have held broken packages.
@Temikus Temikus mentioned this issue May 21, 2016
@Temikus
Copy link
Collaborator

Temikus commented May 21, 2016

Hi @DazWilkin !

Thanks for raising this, we're due for a version bump.

Technically this is WAI, since:

  • We rely on fog and, consequently, GCE API to function, so we don't interact with gcloud at all. AFAIK API doesn't allow to skip the image name while inserting an instance, so it's gcloud's own logic that defaults to debian-8.
  • In our case the defaults for the image are set by the driver here: https://github.com/mitchellh/vagrant-google/blob/master/lib/vagrant-google/config.rb#L245
    (And, additionally, by the dummy google box if you're importing it from this repo.)
  • Debian-7 image that we use uses kernel 3.2.0 while Docker supports >= 3.10, that's probably why you're running into issues.

We defaulted to a known stable image of Wheezy for unconfigured boxes since it was stable enough and compatible with all provisioners out of the box.

With that being said, I guess it is due time for some version housekeeping and an upgrade to Debian-8, so I've tested it out. Everything works as expected, so I'm bumping the image.

P.S. I'm a Googler too and I'm the current maintainer for this project.

Cheers,
A.

@DazWilkin
Copy link
Contributor Author

Excellent. Thank you!

@Temikus
Copy link
Collaborator

Temikus commented Mar 23, 2018

As of 2.0 we will no longer default to an image and recommend latest LTS Ubuntu family for examples, so people will always fetch the latest image. See #181

@DazWilkin can we mark this as fixed? Or do you have any outstanding questions?

@DazWilkin
Copy link
Contributor Author

@Temikus SGTM

@Temikus
Copy link
Collaborator

Temikus commented May 25, 2018

I'm closing this issue since this looks resolved.
However, if you still have any questions - no worries at all - just reopen and I'll help you right out!

@Temikus Temikus closed this as completed May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants