Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
using the below does resolve the issue and allow the app to be deployed.
gcloud config set app/use_gsutil true
gcloud config set app/use_gsutil true
[Deleted User] <[Deleted User]> #3
Thanks for the update! We think we have a handle on this issue, and there should be a patch in the Cloud SDK 106 release due out next week that will work with the 'use_gsutil false' setting (which will eventually become the new default).
jr...@gmail.com <jr...@gmail.com> #4
Same problem here.
Running "preview app deploy" tries to open browser -> NOK
Running "config list" shows the service account activated -> OK
Running "compute images list" list the images -> OK
The following jenkins log, shows the output of the above commands:
[easy-easy-apps-server_staging] $ gcloud auth activate-service-account 994979732023-h4alem9cpokm2sgvdvfn0qo5ggu1gubg@developer.gserviceaccount.com --key-file /home/jenkins/workspace/easy-easy-apps-server_staging/gcloud4727254661203477121.tmp/key8801487748596692342.json
Activated service account credentials for: [994979732023-h4alem9cpokm2sgvdvfn0qo5ggu1gubg@developer.gserviceaccount.com]
[easy-easy-apps-server_staging] $ /bin/sh -xe /tmp/hudson8106852726170846078.sh
+ cp docker/staging/Dockerfile .
+ cp docker/staging/app.yaml .
[easy-easy-apps-server_staging] $ gcloud config set project server-easyeasyapps-staging
[easy-easy-apps-server_staging] $ gcloud config list
[core]
account = 994979732023-h4alem9cpokm2sgvdvfn0qo5ggu1gubg@developer.gserviceaccount.com
disable_usage_reporting = False
project = server-easyeasyapps-staging
[easy-easy-apps-server_staging] $ gcloud compute images list
NAME PROJECT ALIAS DEPRECATED STATUS
centos-6-v20150325 centos-cloud centos-6 READY
centos-7-v20150325 centos-cloud centos-7 READY
coreos-alpha-660-0-0-v20150423 coreos-cloud READY
coreos-beta-647-0-0-v20150415 coreos-cloud READY
coreos-stable-633-1-0-v20150414 coreos-cloud coreos READY
backports-debian-7-wheezy-v20150325 debian-cloud debian-7-backports READY
debian-7-wheezy-v20150325 debian-cloud debian-7 READY
container-vm-v20150129 google-containers container-vm READY
container-vm-v20150305 google-containers container-vm READY
container-vm-v20150317 google-containers container-vm READY
opensuse-13-1-v20141102 opensuse-cloud opensuse-13 READY
opensuse-13-2-v20150315 opensuse-cloud opensuse-13 READY
rhel-6-v20150325 rhel-cloud rhel-6 READY
rhel-7-v20150325 rhel-cloud rhel-7 READY
sles-11-sp3-v20150310 suse-cloud sles-11 READY
sles-12-v20150310 suse-cloud sles-12 READY
ubuntu-1204-precise-v20150316 ubuntu-os-cloud ubuntu-12-04 READY
ubuntu-1404-trusty-v20150316 ubuntu-os-cloud ubuntu-14-04 READY
ubuntu-1410-utopic-v20150318c ubuntu-os-cloud ubuntu-14-10 READY
ubuntu-1504-vivid-v20150422 ubuntu-os-cloud READY
windows-server-2008-r2-dc-v20150331 windows-cloud windows-2008-r2 READY
windows-server-2012-r2-dc-v20150331 windows-cloud windows-2012-r2 READY
[easy-easy-apps-server_staging] $ gcloud compute instances list
NAME ZONE MACHINE_TYPE INTERNAL_IP EXTERNAL_IP STATUS
gae-default-1-k8km us-central1-f n1-standard-1 10.240.212.26 104.197.28.31 RUNNING
[easy-easy-apps-server_staging] $ gcloud --quiet --project server-easyeasyapps-staging preview app deploy app.yaml --version 1
WARNING: The [version] field is specified in file [/home/jenkins/workspace/easy-easy-apps-server_staging/app.yaml]. This field is not used by gcloud and should be removed.
You are about to deploy the following modules:
- server-easyeasyapps-staging/default/1 From: [/home/jenkins/workspace/easy-easy-apps-server_staging/app.yaml]
Go to the following link in your browser:
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&client_id=32555940559.apps.googleusercontent.com&access_type=offline
Enter verification code: Traceback (most recent call last):
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 211, in <module>
main()
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 207, in main
_cli.Execute()
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 617, in Execute
result = args.cmd_func(cli=self, args=args)
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1110, in Run
result = command_instance.Run(args)
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/calliope/exceptions.py", line 86, in TryFunc
return func(*args, **kwargs)
File "/usr/local/share/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/deploy.py", line 124, in Run
client.PrepareVmRuntime()
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/appengine_client.py", line 251, in PrepareVmRuntime
rpcserver.Send('/api/vms/prepare', app_id=self.project)
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/appengine_client.py", line 525, in Send
response = self._server.Send(*args, **kwargs)
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/external/tools/appengine_rpc_httplib2.py", line 214, in Send
self._Authenticate(self.http, auth_errors[0] > 0)
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/external/tools/appengine_rpc_httplib2.py", line 423, in _Authenticate
self.credentials = tools.run_flow(flow, self.storage, self.flags)
File "/usr/local/share/google-cloud-sdk/./lib/oauth2client/util.py", line 129, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/share/google-cloud-sdk/./lib/oauth2client/tools.py", line 208, in run_flow
code = raw_input('Enter verification code: ').strip()
EOFError: EOF when reading a line
Build step 'Execute gcloud CLI' marked build as failure
[easy-easy-apps-server_staging] $ gcloud auth revoke 994979732023-h4alem9cpokm2sgvdvfn0qo5ggu1gubg@developer.gserviceaccount.com
No credentialed accounts.
To login, run:
$ gcloud auth login ``ACCOUNT''
Revoked credentials for 994979732023-h4alem9cpokm2sgvdvfn0qo5ggu1gubg@developer.gserviceaccount.com.
Running "preview app deploy" tries to open browser -> NOK
Running "config list" shows the service account activated -> OK
Running "compute images list" list the images -> OK
The following jenkins log, shows the output of the above commands:
[easy-easy-apps-server_staging] $ gcloud auth activate-service-account 994979732023-h4alem9cpokm2sgvdvfn0qo5ggu1gubg@developer.gserviceaccount.com --key-file /home/jenkins/workspace/easy-easy-apps-server_staging/gcloud4727254661203477121.tmp/key8801487748596692342.json
Activated service account credentials for: [994979732023-h4alem9cpokm2sgvdvfn0qo5ggu1gubg@developer.gserviceaccount.com]
[easy-easy-apps-server_staging] $ /bin/sh -xe /tmp/hudson8106852726170846078.sh
+ cp docker/staging/Dockerfile .
+ cp docker/staging/app.yaml .
[easy-easy-apps-server_staging] $ gcloud config set project server-easyeasyapps-staging
[easy-easy-apps-server_staging] $ gcloud config list
[core]
account = 994979732023-h4alem9cpokm2sgvdvfn0qo5ggu1gubg@developer.gserviceaccount.com
disable_usage_reporting = False
project = server-easyeasyapps-staging
[easy-easy-apps-server_staging] $ gcloud compute images list
NAME PROJECT ALIAS DEPRECATED STATUS
centos-6-v20150325 centos-cloud centos-6 READY
centos-7-v20150325 centos-cloud centos-7 READY
coreos-alpha-660-0-0-v20150423 coreos-cloud READY
coreos-beta-647-0-0-v20150415 coreos-cloud READY
coreos-stable-633-1-0-v20150414 coreos-cloud coreos READY
backports-debian-7-wheezy-v20150325 debian-cloud debian-7-backports READY
debian-7-wheezy-v20150325 debian-cloud debian-7 READY
container-vm-v20150129 google-containers container-vm READY
container-vm-v20150305 google-containers container-vm READY
container-vm-v20150317 google-containers container-vm READY
opensuse-13-1-v20141102 opensuse-cloud opensuse-13 READY
opensuse-13-2-v20150315 opensuse-cloud opensuse-13 READY
rhel-6-v20150325 rhel-cloud rhel-6 READY
rhel-7-v20150325 rhel-cloud rhel-7 READY
sles-11-sp3-v20150310 suse-cloud sles-11 READY
sles-12-v20150310 suse-cloud sles-12 READY
ubuntu-1204-precise-v20150316 ubuntu-os-cloud ubuntu-12-04 READY
ubuntu-1404-trusty-v20150316 ubuntu-os-cloud ubuntu-14-04 READY
ubuntu-1410-utopic-v20150318c ubuntu-os-cloud ubuntu-14-10 READY
ubuntu-1504-vivid-v20150422 ubuntu-os-cloud READY
windows-server-2008-r2-dc-v20150331 windows-cloud windows-2008-r2 READY
windows-server-2012-r2-dc-v20150331 windows-cloud windows-2012-r2 READY
[easy-easy-apps-server_staging] $ gcloud compute instances list
NAME ZONE MACHINE_TYPE INTERNAL_IP EXTERNAL_IP STATUS
gae-default-1-k8km us-central1-f n1-standard-1 10.240.212.26 104.197.28.31 RUNNING
[easy-easy-apps-server_staging] $ gcloud --quiet --project server-easyeasyapps-staging preview app deploy app.yaml --version 1
WARNING: The [version] field is specified in file [/home/jenkins/workspace/easy-easy-apps-server_staging/app.yaml]. This field is not used by gcloud and should be removed.
You are about to deploy the following modules:
- server-easyeasyapps-staging/default/1 From: [/home/jenkins/workspace/easy-easy-apps-server_staging/app.yaml]
Go to the following link in your browser:
Enter verification code: Traceback (most recent call last):
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 211, in <module>
main()
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 207, in main
_cli.Execute()
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 617, in Execute
result = args.cmd_func(cli=self, args=args)
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1110, in Run
result = command_instance.Run(args)
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/calliope/exceptions.py", line 86, in TryFunc
return func(*args, **kwargs)
File "/usr/local/share/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/deploy.py", line 124, in Run
client.PrepareVmRuntime()
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/appengine_client.py", line 251, in PrepareVmRuntime
rpcserver.Send('/api/vms/prepare', app_id=self.project)
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/appengine_client.py", line 525, in Send
response = self._server.Send(*args, **kwargs)
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/external/tools/appengine_rpc_httplib2.py", line 214, in Send
self._Authenticate(self.http, auth_errors[0] > 0)
File "/usr/local/share/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/external/tools/appengine_rpc_httplib2.py", line 423, in _Authenticate
self.credentials = tools.run_flow(flow, self.storage, self.flags)
File "/usr/local/share/google-cloud-sdk/./lib/oauth2client/util.py", line 129, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/share/google-cloud-sdk/./lib/oauth2client/tools.py", line 208, in run_flow
code = raw_input('Enter verification code: ').strip()
EOFError: EOF when reading a line
Build step 'Execute gcloud CLI' marked build as failure
[easy-easy-apps-server_staging] $ gcloud auth revoke 994979732023-h4alem9cpokm2sgvdvfn0qo5ggu1gubg@developer.gserviceaccount.com
No credentialed accounts.
To login, run:
$ gcloud auth login ``ACCOUNT''
Revoked credentials for 994979732023-h4alem9cpokm2sgvdvfn0qo5ggu1gubg@developer.gserviceaccount.com.
[Deleted User] <[Deleted User]> #5
[Deleted User] <[Deleted User]> #6
Here is an example you can use to see what I am doing:
This is the log using this shell script to deploy to gcloud on travis-cihttps://github.com/Trii/appengine-buildout-template/blob/ef6b433e70051155295bfebf8f266b3d4a7b7b26/travis-ci-deploy.sh
Here is the log showing it prompting for oauth
https://travis-ci.org/Trii/appengine-buildout-template/builds/62617755
Removing the --set-default flag from gcloud preview app deployhttps://github.com/Trii/appengine-buildout-template/blob/248650fe674dd81a6934615f4ca77236d79bfef2/travis-ci-deploy.sh
ends in success:
https://travis-ci.org/Trii/appengine-buildout-template/builds/62618698
The same issue happens if I try to use preview app modules set-default after deploying, it prompts for oauth
This is the log using this shell script to deploy to gcloud on travis-ci
Here is the log showing it prompting for oauth
Removing the --set-default flag from gcloud preview app deploy
ends in success:
The same issue happens if I try to use preview app modules set-default after deploying, it prompts for oauth
zj...@google.com <zj...@google.com> #7
We've fixed this in version 0.9.63, which is slated for release next week.
Thank you for the detailed feedback; it was very helpful in diagnosing the problem.
Thank you for the detailed feedback; it was very helpful in diagnosing the problem.
Description
google-cloud-sdk/bin/gcloud auth activate-service-account --key-file "${GAE_CLIENT_KEY_JSON_FILE}"
google-cloud-sdk/bin/gcloud \
--project "${GAE_PROJECT_ID}" \
preview app deploy \
--version "${GAE_VERSION_LABEL}" \
--quiet \
app.yaml
google-cloud-sdk/bin/gcloud \
--project "${GAE_PROJECT_ID}" \
preview app modules set-default default \
--quiet \
--version "${GAE_VERSION_LABEL}"
What is the expected output? What do you see instead?
Version ${GAE_VERSION_LABEL} should be set as default, instead I see this:
Activated service account credentials for: [86709905025-k0cnttqgbs9eokapgoggm7mvk54jha5l@developer.gserviceaccount.com]
You are about to deploy the following modules:
- kapx-site-demo/default/release-20150428 From: [/home/travis/build/KAPx/kapx-site/tmp_app.yaml]
Updating module [default] from file [/home/travis/build/KAPx/kapx-site/tmp_app.yaml]
06:05 PM Host:
06:05 PM Application: kapx-site-demo (was: None); version: release-20150428 (was: None)
... deployment happens here......
WARNING:� This function, oauth2client.tools.run(), and the use of the gflags library are deprecated and will be removed in a future version of the library.
Your browser has been opened to visit:
If your browser is on a different machine then exit and re-run
this application with the command-line parameter
--noauth_local_webserver
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated
Please provide any additional information below.
I am running this in travis-ci in after_success so I cannot easily get the gcloud info. The first step I take on build is google-cloud-sdk/bin/gcloud components update preview app --quiet to be sure I have the latest sdk.