-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Bug: Google Compute Builder failing for newer Debian-based images #3661
Comments
Note that adding the metadata they specify to add in the article for creating a user account at least gets you a successful ssh connection. However, it then has problems actually doing anything on the instance. Maybe because the only scopes it uses are:
...with no Gist for what I'm talking about: https://gist.github.com/clounie/dce56ad8107a33cf60b3c362e17210cf |
Am I on the right track with any of this? I'd be more than willing to do a PR if it's something that needs to be added/changed in Packer. |
@clounie did you ever get closer to solving this issue? I'm seeing it as well. Update: I've asked for help on the GCE mailing list as well, https://groups.google.com/forum/#!topic/gce-discussion/mJP4X_TnqDo |
This works for me: {
"builders": [
{
"type": "googlecompute",
"project_id": "<project>",
"zone": "europe-west1-b",
"ssh_username": "debian",
"source_image": "debian-8-jessie-v20160418"
}
]
} Try adding |
I have tried repro'ing this with a few templates. Here are some interesting results: {
"provisioners": [
{
"type": "file",
"source": "foo.txt",
"destination": "/etc/foo.txt",
"direction": "upload"
}
],
"builders": [
{
"type": "googlecompute",
"image_name": "debian-ssh-test-image",
"project_id": "my-gce-project",
"zone": "us-east1-d",
"account_file": "creds.json",
"source_image": "debian-8-jessie-v20160418",
"ssh_username": "foo"
}
]
} Result: Build 'googlecompute' errored: scp: /etc/foo.txt: Permission denied I tried it again with the same template, but I modified /etc/foo.txt to be /home/foo/foo.txt. |
Update: I have repro'ed that root access is denied on centos-7 as well. |
I'm closing this since this seems to be working as it should and mostly be a usage question. Use IRC See https://www.packer.io/community/ If you are describing a bug or a feature request please reopen and try to add some more details to make it clearer. |
I can confirm that adding
|
I was not aware of that. Good to know. |
@crunk1 It's a fairly new requirement (at least on GCE) |
Follow-up on my end: Looks like something must have changed on GCE's side. It works with both Packer v0.10.1 and v0.10.2 now, using the same examples that failed for me before. Thanks for checking it out rickard. |
With the Google Compute Builder, any builds with a Debian 7 or Debian 8
source_image
later than these versions will error, when trying to SSH for provisioning:debian-8-jessie-v20160329
debian-7-wheezy-v20160329
I've tried
ssh_username
of:But none of them work. Is this similar to #788, or was I barking up the wrong tree?
I looked, as well, in the release notes for Google Compute, but didn't see anything directly related/obvious.
Debug Info:
0.10.1
macOS 10.11.5
The text was updated successfully, but these errors were encountered: