Comments (10)
+1. I can't take this on, but it'd be great to have it done. Do you know if this is a generic problem, or something specific to fog-google
and/or Server
?
from fog-google.
This seems to be a more generic problem :/
If we analyze the body of the 503 received, we see that the response is not actually that coherent.
It essentially reports that the operation has failed, but doesn't specify why or at what stage.
pry(#<Fog::Compute::Google::Real>)> body
=> {"kind"=>"compute#operation",
"id"=>"3654193698946290258",
"name"=>"operation-1434376924665-5188ee71194a9-7bb7cfb5-713bc80d",
"zone"=>"https://www.googleapis.com/compute/v1/projects/dev-utility-90115/zones/europe-west1-b",
"operationType"=>"insert",
"targetLink"=>
"https://www.googleapis.com/compute/v1/projects/dev-utility-90115/zones/europe-west1-b/instances/fog-smoke-test-1434376921",
"status"=>"DONE",
"user"=>"768099535741-jcfc4jlatsvelvosl2cgmqcsqoep3d1k@developer.gserviceaccount.com",
"progress"=>100,
"insertTime"=>"2015-06-15T07:02:05.269-07:00",
"startTime"=>"2015-06-15T07:02:05.624-07:00",
"endTime"=>"2015-06-15T07:02:11.495-07:00",
"error"=>
{"errors"=>
[{"code"=>"INTERNAL_ERROR", "message"=>"Code: 'CghJTlNUQU5DRRImNzY4MDk5NTM1NzQxLmZvZy1zbW9rZS10ZXN0LTE0MzQzNzY5MjE='"}]},
"httpErrorStatusCode"=>503,
"httpErrorMessage"=>"SERVICE UNAVAILABLE",
"selfLink"=>
"https://www.googleapis.com/compute/v1/projects/dev-utility-90115/zones/europe-west1-b/operations/operation-1434376924665-5188ee71194a9-7bb7cfb5-713bc80d"}
[4] pry(#<Fog::Compute::Google::Real>)> continue
/home/temikus/code/fog-google/lib/fog/google.rb:223:in `build_excon_response': Code: 'CghJTlNUQU5DRRImNzY4MDk5NTM1NzQxLmZvZy1zbW9rZS10ZXN0LTE0MzQzNzY5MjE=' (Fog::Errors::Error)
from /home/temikus/code/fog-google/lib/fog/google.rb:193:in `request'
from /home/temikus/code/fog-google/lib/fog/google/requests/compute/get_zone_operation.rb:50:in `get_zone_operation'
from /home/temikus/code/fog-google/lib/fog/google/models/compute/operations.rb:23:in `get'
from /home/temikus/code/fog-google/lib/fog/google/models/compute/server.rb:285:in `save'
from /home/temikus/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/fog-core-d117cd252d28/lib/fog/core/collection.rb:51:in `create'
from example_create.rb:22:in `test'
from example_create.rb:60:in `<main>'
And, as I indicated earlier, error code doesn't actually make sense:
pry(main)> Base64.decode64("CghJTlNUQU5DRRImNzY4MDk5NTM1NzQxLmZvZy1zbW9rZS10ZXN0LTE0MzQzNzY5MjE=")
=> "\n\bINSTANCE\x12&768099535741.fog-smoke-test-1434376921"
from fog-google.
My guess would be that this is an issue in excon plus an issue with how the google api outputs errors?
from fog-google.
@icco that sounds right. @Temikus, if you want to dig around directly with the API, you can do that at the bottom of the API reference.
from fog-google.
Thanks for the link, Ike! 👍
So, I did some digging around, and I see some strange stuff.
If we create a POST request to insert an instance with incorrect parameters:
POST https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/instances?key={MY_API_KEY}
{
"machineType": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/n1-standard-1",
"name": "instance-1",
"zone": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f",
"metadata": {
"items": [
]
},
"tags": {
"items": [
]
},
"disks": [
{
"type": "PERSISTENT",
"boot": true,
"mode": "READ_WRITE",
"deviceName": "instance-1",
"autoDelete": true,
"initializeParams": {
"sourceImage": "https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-7-v20150603",
"diskType": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/diskTypes/pd-standard"
}
}
],
"canIpForward": false,
"networkInterfaces": [
{
"network": "https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default",
"accessConfigs": [
{
"name": "External NAT",
"type": "ONE_TO_ONE_NAT"
}
]
}
],
"description": "",
"scheduling": {
"preemptible": false,
"onHostMaintenance": "MIGRATE",
"automaticRestart": true
},
"serviceAccounts": [
{
"email": "default",
"scopes": [
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/bazynga"
]
}
]
}
We get a 200 OK link back with the operation:
200 OK
{
"kind": "compute#operation",
"id": "15925425956635618016",
"name": "operation-1434388773478-51891a9501e70-824f09b6-b54977c7",
"zone": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f",
"operationType": "insert",
"targetLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/instances/instance-1",
"status": "PENDING",
"user": "[email protected]",
"progress": 0,
"insertTime": "2015-06-15T10:19:34.161-07:00",
"startTime": "2015-06-15T10:19:34.379-07:00",
"selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/operations/operation-1434388773478-51891a9501e70-824f09b6-b54977c7"
}
But the operation itself never succeeds, nor exits with a sane error code:
{
"kind": "compute#operation",
"id": "15925425956635618016",
"name": "operation-1434388773478-51891a9501e70-824f09b6-b54977c7",
"zone": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f",
"operationType": "insert",
"targetLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/instances/instance-1",
"status": "DONE",
"user": "[email protected]",
"progress": 100,
"insertTime": "2015-06-15T10:19:34.161-07:00",
"startTime": "2015-06-15T10:19:34.379-07:00",
"endTime": "2015-06-15T10:19:42.754-07:00",
"error": {
"errors": [
{
"code": "INTERNAL_ERROR",
"message": "Code: 'CghJTlNUQU5DRRIXMjg4Mjc4OTg1ODI3Lmluc3RhbmNlLTE='"
}
]
},
"httpErrorStatusCode": 503,
"httpErrorMessage": "SERVICE UNAVAILABLE",
"selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/operations/operation-1434388773478-51891a9501e70-824f09b6-b54977c7"
}
This really looks like an issue on GCE side to me - what do you guys think?
from fog-google.
Yup; looks like a GCE bug to me. I'd go ahead and file a bug against GCE.
On Mon, Jun 15, 2015 at 10:26 AM, Artem Yakimenko [email protected]
wrote:
Thanks for the link, Ike! [image: 👍]
So, I did some digging around, and I see some strange stuff.
If we create a POST request to insert an instance with incorrect
parameters:{
"machineType": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/n1-standard-1",
"name": "instance-1",
"zone": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f",
"metadata": {
"items": [
]
},
"tags": {
"items": [
]
},
"disks": [
{
"type": "PERSISTENT",
"boot": true,
"mode": "READ_WRITE",
"deviceName": "instance-1",
"autoDelete": true,
"initializeParams": {
"sourceImage": "https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-7-v20150603",
"diskType": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/diskTypes/pd-standard"
}
}
],
"canIpForward": false,
"networkInterfaces": [
{
"network": "https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default",
"accessConfigs": [
{
"name": "External NAT",
"type": "ONE_TO_ONE_NAT"
}
]
}
],
"description": "",
"scheduling": {
"preemptible": false,
"onHostMaintenance": "MIGRATE",
"automaticRestart": true
},
"serviceAccounts": [
{
"email": "default",
"scopes": [
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/bazynga"
]
}
]
}We get a 200 OK link back with the operation:
200 OK
{
"kind": "compute#operation",
"id": "15925425956635618016",
"name": "operation-1434388773478-51891a9501e70-824f09b6-b54977c7",
"zone": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f",
"operationType": "insert",
"targetLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/instances/instance-1",
"status": "PENDING",
"user": "[email protected]",
"progress": 0,
"insertTime": "2015-06-15T10:19:34.161-07:00",
"startTime": "2015-06-15T10:19:34.379-07:00",
"selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/operations/operation-1434388773478-51891a9501e70-824f09b6-b54977c7"
}But the operation itself never succeeds, nor exits with a sane error code:
{
"kind": "compute#operation",
"id": "15925425956635618016",
"name": "operation-1434388773478-51891a9501e70-824f09b6-b54977c7",
"zone": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f",
"operationType": "insert",
"targetLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/instances/instance-1",
"status": "DONE",
"user": "[email protected]",
"progress": 100,
"insertTime": "2015-06-15T10:19:34.161-07:00",
"startTime": "2015-06-15T10:19:34.379-07:00",
"endTime": "2015-06-15T10:19:42.754-07:00",
"error": {
"errors": [
{
"code": "INTERNAL_ERROR",
"message": "Code: 'CghJTlNUQU5DRRIXMjg4Mjc4OTg1ODI3Lmluc3RhbmNlLTE='"
}
]
},
"httpErrorStatusCode": 503,
"httpErrorMessage": "SERVICE UNAVAILABLE",
"selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/operations/operation-1434388773478-51891a9501e70-824f09b6-b54977c7"
}This really looks like an issue on GCE side to me - what do you guys think?
—
Reply to this email directly or view it on GitHub
#45 (comment).
from fog-google.
Bugs filed, I'll follow up on it.
from fog-google.
Status Update: no updates on the GCE bug filed, but the issue stopped reproducing in certain scenarios. Currently following up with GCE to verify what changed.
from fog-google.
Ok, this has somehow fixed itself, now the operation returns the correct data with the same request as above:
One or more service account scopes are invalid: 'https://www.googleapis.com/auth/bazynga'
I'll follow-up internally again tomorrow.
from fog-google.
This was fixed on Google's side by an unrelated change and released a couple of weeks ago, hence the new behaviour. Closing.
from fog-google.
Related Issues (20)
- TypeError key "x-goog-acl" is not a Symbol HOT 1
- Uploads to Google Cloud are "not public" after Ruby upgrade HOT 4
- hash key "x-goog-acl" is not a Symbol HOT 3
- Version 1.19.0 released to Rubygems but no tag in this repository HOT 6
- Usage of private service connect HOT 6
- Switch to modern GCP Ruby Client HOT 1
- Support for fog-core 2.3.0 HOT 4
- Issue with escaped URLs with plus sign HOT 8
- integration tests failing HOT 16
- Bucket names with dashes in them cause errors in mocks HOT 2
- Fog::Storage::GoogleJSON::Real#iam_signer is using the wrong API scopes with Workload Identity HOT 2
- Unable to list more than 500 instances with `Fog::Compute::Google::Servers#all`
- Fog::Compute::Google::Disk attach_disk NoMethodError
- Fog::Compute::Google::Disks#get disk users remain after detach
- Fog::Compute::Google::Disks#get when rescuing Google::Apis::ClientError HOT 1
- Fog::Storage::GoogleJSON list_objects doesn't support `matchGlob` parameter
- Hang when uploading HOT 1
- Fix `nil` returns HOT 1
- Update gemspec to allow higher ruby-cloud-env versions HOT 2
- Improve test cleanup methods to allow parallel integration runs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fog-google.