Giter Site home page Giter Site logo

Comments (18)

ChadScott avatar ChadScott commented on July 19, 2024

I've noticed that knife google server create successfully creates the disk, as I see it in the console, but apparently bombs out somewhere between that and launching the VM itself.

from knife-google.

ChadScott avatar ChadScott commented on July 19, 2024

@start_time = Time.parse( data["startTime"] ) appears to be the culprit but I haven't had time to dig deeper. I'm guessing data["startTime"] is nil.

from knife-google.

paulrossman avatar paulrossman commented on July 19, 2024

Thanks for digging into this. I'll make some time on Monday to take a look
too.

On Fri, Mar 27, 2015, 15:27 ChadScott [email protected] wrote:

@start_time = Time.parse( data["startTime"] ) appears to be the culprit
but I haven't had time to dig deeper. I'm guessing data["startTime"] is
nil.


Reply to this email directly or view it on GitHub
#61 (comment).

from knife-google.

ChadScott avatar ChadScott commented on July 19, 2024

Alright, I'm at a loss. I've dug on this for a little bit and I don't know enough about the GCE API nor the internals of Knife to really be able to get to the bottom of it without going into a cave for awhile. Any luck on your end, @paulrossman?

from knife-google.

ChadScott avatar ChadScott commented on July 19, 2024

If it helps, here are the versions of the Google related gems:

google-api (0.4.0)
google-api-client (0.7.1)
googleauth (0.4.0)
knife-google (1.3.1)

from knife-google.

paulrossman avatar paulrossman commented on July 19, 2024

Sorry for the late reply. I've not run in to this issue at all and have been building lots of instances recently.

My suggestion is to update to knife-google 1.4.x. There were a bunch of gemspec changes in #54. I currently have these gem versions installed:

chef (12.2.1)
google-api-client (0.8.5)
googleauth (0.4.0)
knife-google (1.4.3 5a4ccf4)

from knife-google.

ChadScott avatar ChadScott commented on July 19, 2024

After upgrading to knife-google 1.4.3 (which isn't in the gem repo, by the way... I had to pull it down from Github and manually install it), I get yet another error:

knife google zone list
ERROR: Faraday::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

I thought at first it must be something in my SSL stack, but it works fine for ec2:

knife ec2 flavor list --aws-credential-file .boto
ID                                       Name                                     Architecture                             RAM                                      Disk  Cores
c1.medium                                High-CPU Medium                          32-bit                                   1740.8                                   350 GB                                   5

...etc

from knife-google.

ChadScott avatar ChadScott commented on July 19, 2024

Okay, I finally figured this out. For those that find this via googling or whatever, this is a problem with chefdk on MacOS. I'm unsure exactly what the issue is, but this solves it for me:

Install brew (brew.sh)
brew install ruby
gem install chef
::download knife-google from this repo::
rake
gem install pkg/knife-google-1.4.3.gem
knife google zone list

Voila!

from knife-google.

jameshcoppens avatar jameshcoppens commented on July 19, 2024

I am still getting this error as well. I'm not really interested in building my own gem. I'll see if I can resolve for knife-google 1.3.1

from knife-google.

jameshcoppens avatar jameshcoppens commented on July 19, 2024

So, I figured out the issue with a small code change.

Chad, you were absolutely right. The code line

@start_time = Time.parse( data["startTime"] )

was the culprit.

The reason why when you build the 1.4.3 gem it works is in that version there is a null check on the variable. I think that the new gem version should be built and distributed. I simply changed the following lines in my lib/google/compute/zone_operation.rb file

@insert_time = Time.parse( data["insertTime"] ) if data.key?("insertTime")
@start_time = Time.parse( data["startTime"] ) if data.key?("startTime")

from knife-google.

ohadperry avatar ohadperry commented on July 19, 2024

I have tried that in both global_operation.rb and zone_operation.rb and it doesn't seem to work.
Is there a way to run this with a stack trace?
tried:
knife google --verbose zone list

from knife-google.

ohadperry avatar ohadperry commented on July 19, 2024

Is there another gem that does that?

from knife-google.

jameshcoppens avatar jameshcoppens commented on July 19, 2024

ohadpartuck,

I've used -VV on the end of the string. Can you output what you see when you run the command. This plugin is really important especially if you are negotiating with Amazon about your monthly AWS bill.

knige google zone list -VV

from knife-google.

ohadperry avatar ohadperry commented on July 19, 2024

@jeremiahsnapp ok , that helped , After 15 mins, I tracked the issue to
signet-0.7.0/lib/signet/oauth_2/client.rb:1182 -> normalize_timestamp
it reading "2015-12-16 17:20:39 +0200" from my oauth file .google-compute.json
and doing
Time.parse("2015-12-16 17:20:39 +0200")
It failed for no implicit conversion of Time into String (TypeError)

weirdly, I ran it in the console and it works:

2.1.5 :005 > Time.parse("2015-12-16 17:20:39 +0200")
 => 2015-12-16 17:20:39 +0200

Now that I see that, it's not the same error as stated in this log.

any ideas?

from knife-google.

ohadperry avatar ohadperry commented on July 19, 2024

@sqrrrl maybe you can take a look?

from knife-google.

sqrrrl avatar sqrrrl commented on July 19, 2024

Argh. Yes, there was a stupid bug introduced in 0.7. Just pushed 0.7.1 which should fix the issue.

@ohadpartuck - Please update and let me know if it addresses the issue you're seeing.

from knife-google.

ohadperry avatar ohadperry commented on July 19, 2024

@sqrrrl I don't see 0.7.1 neither here
https://rubygems.org/gems/signet/versions/0.7.0
or here
https://github.com/google/signet/releases
can you send a link

from knife-google.

ohadperry avatar ohadperry commented on July 19, 2024

nvm , found it here
https://rubygems.org/gems/signet/versions/0.7.1

from knife-google.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.