Ryotaro-Sanpe666 / google-cloud-sdk

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

version.automatic_scaling.min_pending_latency error #406

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This used to work until gcloud switched to the Admin API.

automatic_scaling:
  min_idle_instances: 0
  max_idle_instances: 1
  min_pending_latency: 250ms
  max_pending_latency: 750ms
  max_concurrent_requests: 2

When you deploy this, an error occurs.

HttpException: Error Response: [400] Request contains an invalid argument.

Details: [
  [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "fieldViolations": [
        {
          "description": "version.automatic_scaling.min_pending_latency (0.0) must be in the range [0.01, 15.0].",
          "field": "version.automatic_scaling.min_pending_latency"
        }
      ]
    }
  ]
]

I did a bit of debugging, and this is what it sends.

<class 
'googlecloudsdk.third_party.apis.appengine.v1beta4.appengine_v1beta4_messages.Au
tomaticScaling'> {"maxIdleInstances": 1, "minIdleInstances": 0, 
"minPendingLatency": "0.25s", "maxConcurrentRequests": 2, "maxPendingLatency": 
"0.75s"}

Now I tried to change this to send a float as requested.

Details: [
  [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "fieldViolations": [
        {
          "description": "Invalid value at 'version.automatic_scaling.max_pending_latency' (type.googleapis.com/google.protobuf.Duration), Field 'maxPendingLatency', Illegal duration format; duration must end with 's'",
          "field": "version.automatic_scaling.max_pending_latency"
        }
      ]
    }
  ]
]

Your turn.

Original issue reported on code.google.com by pdknsk on 28 Nov 2015 at 9:41

GoogleCodeExporter commented 8 years ago
I have figured out it.

The claimed value of 0.0 led me to believe that the server parses the value 
incorrectly, perhaps with a regexp such as ^\d+, expecting milliseconds. Since 
the value is converted to seconds by gcloud, it only gets the leading zero.

So I tried this, which passes.

min_pending_latency: 1250ms
max_pending_latency: 1750ms

And the old Dashboard confirms my suspicion by listing a pending latency of 
[1.0s, 1.0s] for the instance.

(Unfortunately this isn't displayed in the new Console, or I don't know where.)

Original comment by pdknsk on 29 Nov 2015 at 5:15

GoogleCodeExporter commented 8 years ago
Thanks for the report and detailed investigation.

We've filed a bug with the Admin API team. We'll also start on a workaround on 
our end.

Original comment by z...@google.com on 1 Dec 2015 at 6:55

GoogleCodeExporter commented 8 years ago
Looks like we've identified the upstream issue, and it should be fixed soon.

Original comment by z...@google.com on 1 Dec 2015 at 7:14

GoogleCodeExporter commented 8 years ago
This is fixed now. In 90.0.0 or on the server.

Original comment by pdknsk on 16 Dec 2015 at 11:45

GoogleCodeExporter commented 8 years ago
Yep, on the server. Thanks for confirming!

Original comment by z...@google.com on 16 Dec 2015 at 11:49

GoogleCodeExporter commented 8 years ago
Issue 327 has been merged into this issue.

Original comment by z...@google.com on 25 Jan 2016 at 6:19