Add guard method for image_family selector
Temikus opened this issue · 4 comments
Temikus commented
If image family does not exist we trace back:
undefined method `self_link' for nil:NilClass
/Users/temikus/.vagrant.d/gems/2.4.3/gems/vagrant-google-2.0.0/lib/vagrant-google/action/run_instance.rb:99:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/Users/temikus/.vagrant.d/gems/2.4.3/gems/vagrant-google-2.0.0/lib/vagrant-google/action/warn_ssh_keys.rb:28:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/Users/temikus/.vagrant.d/gems/2.4.3/gems/vagrant-google-2.0.0/lib/vagrant-google/action/warn_networks.rb:28:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/builtin/synced_folders.rb:87:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/builtin/provision.rb:80:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/builtin/call.rb:53:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/Users/temikus/.vagrant.d/gems/2.4.3/gems/vagrant-google-2.0.0/lib/vagrant-google/action/connect_google.rb:44:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/builtin/box_check_outdated.rb:79:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/machine.rb:227:in `action_raw'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/machine.rb:202:in `block in action'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/environment.rb:592:in `lock'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/machine.rb:188:in `call'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/machine.rb:188:in `action'
/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
Need a guard method that rolls back the process of machine creation here:
fatmcgav commented
Should update the docs example aswell to account for this..
I got the example working by adding:
google.image_project_id = "ubuntu-os-cloud"
Temikus commented
@fatmcgav Thank you for this. I missed a piece of logic here. Default image project id's should be autopopulated. I'll address this in the nearest patch.
Temikus commented
fatmcgav commented
Cool, cheers for confirming.
…On Sat, 6 Oct 2018, 13:02 Artem Yakimenko, ***@***.***> wrote:
@fatmcgav <https://github.com/fatmcgav> what you've experienced is
actually a regression, apologies - see #206
<#206>. I'll roll out a
fix today.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#192 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACIbIhXcEP2c587mMGuaOW8HKDI6nFZtks5uiJvBgaJpZM4TN2V7>
.