From 273993e2b3426ae372dd1d988204a5d630305875 Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Wed, 20 Jul 2016 16:00:14 -0400 Subject: [PATCH 1/2] DRb will pick an address and port for you (transferred from ManageIQ/manageiq@507283e8d271806588be567e649e43b40c8c033a) --- lib/miq_automation_engine/engine/miq_ae_method.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/miq_automation_engine/engine/miq_ae_method.rb b/lib/miq_automation_engine/engine/miq_ae_method.rb index d4e7fca49..a2b9dd76c 100644 --- a/lib/miq_automation_engine/engine/miq_ae_method.rb +++ b/lib/miq_automation_engine/engine/miq_ae_method.rb @@ -126,7 +126,7 @@ class AutomateMethodException < StandardError DRbObject.send(:undef_method, :inspect) DRbObject.send(:undef_method, :id) if DRbObject.respond_to?(:id) - DRb.start_service("druby://127.0.0.1:0") + DRb.start_service $evmdrb = DRbObject.new(nil, MIQ_URI) raise AutomateMethodException,"Cannot create DRbObject for uri=\#{MIQ_URI}" if $evmdrb.nil? $evm = $evmdrb.find(MIQ_ID) From 80d3286604d92e2553d749665cc6e10edef0d6e1 Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Wed, 20 Jul 2016 16:00:58 -0400 Subject: [PATCH 2/2] We know the URI to the DRb server, use .new_with_uri (transferred from ManageIQ/manageiq@2d202d1b71ab1ff1f32ba30890ccb6dc497371c7) --- lib/miq_automation_engine/engine/miq_ae_method.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/miq_automation_engine/engine/miq_ae_method.rb b/lib/miq_automation_engine/engine/miq_ae_method.rb index a2b9dd76c..9756aee5e 100644 --- a/lib/miq_automation_engine/engine/miq_ae_method.rb +++ b/lib/miq_automation_engine/engine/miq_ae_method.rb @@ -127,7 +127,7 @@ class AutomateMethodException < StandardError DRbObject.send(:undef_method, :id) if DRbObject.respond_to?(:id) DRb.start_service - $evmdrb = DRbObject.new(nil, MIQ_URI) + $evmdrb = DRbObject.new_with_uri(MIQ_URI) raise AutomateMethodException,"Cannot create DRbObject for uri=\#{MIQ_URI}" if $evmdrb.nil? $evm = $evmdrb.find(MIQ_ID) raise AutomateMethodException,"Cannot find Service for id=\#{MIQ_ID} and uri=\#{MIQ_URI}" if $evm.nil?