binbeobo / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 1 forks source link

gcloud preview app deploy stuck waiting for operation #410

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
--------------------------------------

$ gcloud preview app deploy app.yaml --force --project=project-name --promote

app.yaml:

runtime: python27
api_version: 1
threadsafe: yes

handlers:

- url: /static
  static_dir: app/static
  secure: always

- url: .*
  script: main.app
  secure: always

skip_files:
- ^test/.*
- ^node_modules/.*
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$

What is the expected output? What do you see instead?
-----------------------------------------------------

Expecting the app to get deployed as when running:
 appcfg.py --no_cookies -A project-name update .

You are about to deploy the following modules:
 - project-name/default (from [/home/mhelmer/Projects/project_name/app.yaml])
     Deployed URL: [https://project-name.appspot.com]

Do you want to continue (Y/n)?  y

Beginning deployment...
Copying files to Google Cloud Storage...
Synchronizing files to [gs://staging.project-name.appspot.com/].
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [13]

What is the output of 'gcloud info'?
------------------------------------

Google Cloud SDK [0.9.88]

Platform: [Linux, x86_64]
Python Version: [2.7.10+ (default, Oct 10 2015, 09:11:24)  [GCC 5.2.1 20151028]]
Python Location: [/usr/bin/python2]
Site Packages: [Disabled]

Installation Root: [/home/mhelmer/.local/opt/google-cloud-sdk]
Installed Components:
  core: [2015.11.25]
  app-engine-python: [1.9.28]
  core-nix: [2015.11.24]
  gcloud: []
  gsutil-nix: [4.15]
  gsutil: [4.15]
  bq: [2.0.18]
  bq-nix: [2.0.18]
System PATH: 
[/home/mhelmer/bin:/home/mhelmer/.dotfiles/bin:/home/mhelmer/.gem/ruby/2.2.0/bin
:/home/mhelmer/.local/opt/google-cloud-sdk/bin:/home/mhelmer/bin:/usr/local/bin:
/usr/bin:/bin:/usr/local/games:/usr/games]
Cloud SDK on PATH: [True]

Installation Properties: [/home/mhelmer/.local/opt/google-cloud-sdk/properties]
User Config Directory: [/home/mhelmer/.config/gcloud]
User Properties: [/home/mhelmer/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [***]
Project: [***]

Current Properties:
  [core]
    project: [***]
    account: [***]
    disable_usage_reporting: [True]
  [app]
    use_appengine_api: [true]
    suppress_change_warning: [true]
  [compute]
    region: [us-central1]
    zone: [us-central1-f]

Logs Directory: [/home/mhelmer/.config/gcloud/logs]
Last Log File: 
[/home/mhelmer/.config/gcloud/logs/2015.12.02/16.58.35.637922.log]

Please provide any additional information below.
------------------------------------------------

Cleaned up log:

2015-12-02 15:03:52,304 DEBUG    root            Loaded Command Group: 
['gcloud', 'preview']
2015-12-02 15:03:52,306 DEBUG    root            Loaded Command Group: 
['gcloud', 'preview', 'app']
2015-12-02 15:03:52,424 DEBUG    root            Loaded Command Group: 
['gcloud', 'preview', 'app', 'deploy']
2015-12-02 15:03:52,426 DEBUG    root            Running 
gcloud.preview.app.deploy with 
Namespace(__calliope_internal_deepest_parser=ArgumentParser(prog='gcloud.preview
.app.deploy', usage=None, description="*(BETA)* This command is used to deploy 
both code and configuration to the App Engine\nserver.  As an input it takes 
one or more ``DEPLOYABLES'' that should be\nuploaded.  A ``DEPLOYABLE'' can be 
a module's .yaml file or a configuration's\n.yaml file.", version=None, 
formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', 
add_help=False), account=None, authority_selector=None, 
authorization_token_file=None, bucket=None, cmd_func=<bound method Command.Run 
of <googlecloudsdk.calliope.backend.Command object at 0x7f8ebb8f3c90>>, 
command_path=['gcloud', 'preview', 'app', 'deploy'], configuration=None, 
deployables=['app.yaml'], docker_build=None, document=None, env_vars=None, 
force=True, format=None, h=None, help=None, http_timeout=None, image_url=None, 
log_http=None, project='project-name', promote=True, quiet=None, server=None, 
set_default=None, stop_previous_version=None, trace_email=None, 
trace_log=False, trace_token=None, user_output_enabled=None, verbosity=None, 
version=None).
2015-12-02 15:03:52,441 DEBUG    root            API endpoint: 
[https://appengine.googleapis.com/], API version: [v1beta4]
2015-12-02 15:03:52,444 INFO     ___FILE_ONLY___ You are about to deploy the 
following modules:

2015-12-02 15:03:52,444 INFO     ___FILE_ONLY___  - project-name/default (from 
[/home/mhelmer/Projects/project_name/app.yaml])
     Deployed URL: [https://project-name.appspot.com]

2015-12-02 15:03:57,806 INFO     ___FILE_ONLY___ Beginning deployment...

... snip ...

Building synchronization state...
Starting synchronization

2015-12-02 15:04:37,764 INFO     ___FILE_ONLY___ Updating module [default]...
2015-12-02 15:04:37,765 DEBUG    root            Host: appengine.google.com
2015-12-02 15:04:37,765 DEBUG    
googlecloudsdk.third_party.appengine.tools.appengine_rpc _Authenticate 
configuring auth; needs_auth=False
2015-12-02 15:04:37,765 DEBUG    
googlecloudsdk.third_party.appengine.tools.appengine_rpc Sending request to 
https://appengine.google.com/api/appversion/rollback?app_id=project-name&force_r
ollback=0&module=default&version=20151202t150352 
headers={'X-appcfg-api-version': '1', 'content-length': '0', 'Content-Type': 
'application/octet-stream'} body=
2015-12-02 15:04:37,765 INFO     oauth2client.client Attempting refresh to 
obtain initial access_token
2015-12-02 15:04:37,765 INFO     oauth2client.client Refreshing access_token
2015-12-02 15:04:38,775 DEBUG    root            Got response: 
2015-12-02 15:04:38,789 DEBUG    root            Converted YAML to JSON: "{
... snip ...
}"
2015-12-02 15:04:52,662 DEBUG    root            Received operation: 
[apps/project-name/operations/58e20f35-924a-4574-b33b-514a8cb399b0]
2015-12-02 15:04:52,857 DEBUG    root            Operation 
[apps/project-name/operations/58e20f35-924a-4574-b33b-514a8cb399b0] not 
complete. Waiting 5s.
... repeating ...
2015-12-02 15:11:28,248 DEBUG    root            Response returned status 504, 
retrying
2015-12-02 15:11:28,248 DEBUG    root            Retrying request to url 
https://appengine.googleapis.com/v1beta4/apps/project-name/operations/58e20f35-9
24a-4574-b33b-514a8cb399b0?alt=json after exception HttpError accessing 
<https://appengine.googleapis.com/v1beta4/apps/project-name/operations/58e20f35-
924a-4574-b33b-514a8cb399b0?alt=json>: response: <{'status': '504', 
'alternate-protocol': '443:quic,p=1', 'content-length': '140', 
'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 
'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 
'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Wed, 
02 Dec 2015 14:11:28 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 
'quic=":443"; ma=604800; v="30,29,28,27,26,25"', 'content-type': 
'application/json; charset=UTF-8'}>, content <{
  "error": {
    "code": 504,
    "message": "Deadline expired before operation could complete.",
    "status": "DEADLINE_EXCEEDED"
  }
}
>
... repeating ...
2015-12-02 15:14:51,926 DEBUG    root            Operation 
[apps/project-name/operations/58e20f35-924a-4574-b33b-514a8cb399b0] not 
complete. Waiting 5s.
2015-12-02 15:14:57,127 DEBUG    root            Operation 
[apps/project-name/operations/58e20f35-924a-4574-b33b-514a8cb399b0] complete. 
Result: {
    "metadata": {
        "target": "apps/project-name/modules/default/versions/20151202t150352", 
        "insertTime": "2015-12-02T14:04:52.150Z", 
        "method": "google.appengine.v1beta4.Versions.CreateVersion", 
        "user": "magnus.helmersson@gmail.com", 
        "operationType": "create_version", 
        "endTime": "2015-12-02T14:14:52.382Z", 
        "@type": "type.googleapis.com/google.appengine.v1beta4.OperationMetadata"
    }, 
    "done": true, 
    "name": "apps/project-name/operations/58e20f35-924a-4574-b33b-514a8cb399b0", 
    "error": {
        "code": 13
    }
}
2015-12-02 15:14:57,127 DEBUG    root            (gcloud.preview.app.deploy) 
Error Response: [13] 
Traceback (most recent call last):
  File "/home/mhelmer/.local/opt/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 609, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "/home/mhelmer/.local/opt/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 1228, in Run
    resources = command_instance.Run(args)
  File "/home/mhelmer/.local/opt/google-cloud-sdk/lib/googlecloudsdk/surface/preview/app/deploy.py", line 285, in Run
    images.get(module))
  File "/home/mhelmer/.local/opt/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 76, in DeployModule
    return operations.WaitForOperation(self.client.apps_operations, operation)
  File "/home/mhelmer/.local/opt/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/api/operations.py", line 54, in WaitForOperation
    encoding.MessageToPyValue(completed_operation.error)))
OperationError: Error Response: [13] 
2015-12-02 15:14:57,128 ERROR    root            (gcloud.preview.app.deploy) 
Error Response: [13] 

Original issue reported on code.google.com by magnus.h...@gmail.com on 2 Dec 2015 at 4:12

GoogleCodeExporter commented 8 years ago
Thank you for your report. We will look into this and get back to you soon.

Btw, are you still experiencing this issue, or did a retry fix it?

Original comment by vil...@google.com on 3 Dec 2015 at 4:58

GoogleCodeExporter commented 8 years ago

Original comment by vil...@google.com on 3 Dec 2015 at 4:59

GoogleCodeExporter commented 8 years ago
I was consistently getting this for a few hours yesterday and did not get it to 
work. I will retry tomorrow.

Note that I've edited the log slightly, replacing the project name and cutting 
some repeated output.

Original comment by magnus.h...@gmail.com on 3 Dec 2015 at 5:06

GoogleCodeExporter commented 8 years ago
Hey,

We think we have a fix for this rolling out soon. Could you send me your 
project ID privately and I can verify that the issue effecting you is fixed? 
Feel free to send it to dlorenc@google.com.

Original comment by dlor...@google.com on 4 Dec 2015 at 2:10

GoogleCodeExporter commented 8 years ago
Sounds like this is now fixed. Thanks for the help.

Original comment by dlor...@google.com on 4 Dec 2015 at 5:28