Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError: undefined method `get_object' for Fog::Compute::Google::Disk #300

Closed
seanmalloy opened this issue Feb 5, 2018 · 5 comments
Assignees

Comments

@seanmalloy
Copy link
Contributor

I receive the below Ruby stack trace when trying to execute the get_as_boot_disk method on an object of type Fog::Compute::Google::Disk. I am using fog-google version 1.2.0.

NoMethodError: undefined method `get_object' for #<Fog::Compute::Google::Disk:0x00005636e28b6f90>
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/gems/fog-google-1.2.0/lib/fog/compute/google/models/disk.rb:70:in `get_as_boot_disk'
  /home/sean/projects/vagrant-google/lib/vagrant-google/action/run_instance.rb:153:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/lib/vagrant-google/action/warn_ssh_keys.rb:28:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/lib/vagrant-google/action/warn_networks.rb:28:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/lib/vagrant-google/action/sync_folders.rb:33:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/builtin/provision.rb:80:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/builder.rb:116:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/runner.rb:66:in `block in run'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/util/busy.rb:19:in `busy'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/runner.rb:66:in `run'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/builtin/call.rb:53:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/lib/vagrant-google/action/connect_google.rb:47:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/builtin/box_check_outdated.rb:79:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/warden.rb:34:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/builder.rb:116:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/runner.rb:66:in `block in run'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/util/busy.rb:19:in `busy'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/action/runner.rb:66:in `run'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/machine.rb:227:in `action_raw'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/machine.rb:202:in `block in action'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/environment.rb:592:in `lock'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/machine.rb:188:in `call'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/machine.rb:188:in `action'
  /home/sean/projects/vagrant-google/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-8ee7b01855e9/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

Here is the link to the get_as_boot_disk method.

https://github.com/fog/fog-google/blob/v1.2.0/lib/fog/compute/google/models/disk.rb#L69

Is this a bug?

@icco
Copy link
Member

icco commented Feb 5, 2018

Yeah, looks like it was removed by accident during out refactor. I'll try and fix. Does your build system let you test from a git branch?

@icco
Copy link
Member

icco commented Feb 5, 2018

@seanmalloy I've merged in a fix to master. Mind giving it a try? If it works for you I'll do a release.

@seanmalloy
Copy link
Contributor Author

@icco using the changes that you made on the master branch I am no longer seeing the error when calling the get_as_boot_disk method. From my perspective it seems like your changes fixed the issue. I can't be 100% certain if this is working because the next line of code executing in my program is blowing up with a new Ruby stack trace. The new stack trace seems to not be related to the get_as_boot_disk method.

I do not personally need a new release at this time. I'm fine with working off of the fog-google master branch for now.

I think we can close this issue as resolved for now. Let me know if you disagree.

@seanmalloy
Copy link
Contributor Author

I have confirmed that this is working. I was able to successfully create a GCE instance using the fixes that you merged to master in #301.

It's up to you if you want to create a new release or not.

@icco
Copy link
Member

icco commented Feb 6, 2018

I've released 1.2.1 with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants