@@ -104,7 +104,6 @@ def self.find_available_impl(node_profile=nil, district_uuid=nil, non_ha_server_
104
104
current_server , current_capacity , preferred_district = rpc_find_available ( node_profile , district_uuid , require_specific_district , non_ha_server_identities , true )
105
105
end
106
106
district = preferred_district if preferred_district
107
- Rails . logger . debug "CURRENT SERVER: #{ current_server } "
108
107
raise OpenShift ::NodeException . new ( "No nodes available." , 140 ) unless current_server
109
108
Rails . logger . debug "DEBUG: find_available_impl: current_server: #{ current_server } : #{ current_capacity } "
110
109
@@ -2127,7 +2126,6 @@ def get_cart_status(app, gear, cart_name)
2127
2126
# INPUTS:
2128
2127
# * agent: ??
2129
2128
# * servers: String|Array
2130
- # * broadcast: Indicates whether to use broadcast mode
2131
2129
# * force_rediscovery: Boolean
2132
2130
# * options: Hash
2133
2131
#
@@ -2142,16 +2140,12 @@ def get_cart_status(app, gear, cart_name)
2142
2140
# * connects, makes a request, closes connection.
2143
2141
# * THIS IS THE MEAT!
2144
2142
#
2145
- def self . rpc_exec ( agent , servers = nil , broadcast = false , force_rediscovery = false , options = rpc_options )
2143
+ def self . rpc_exec ( agent , servers = nil , force_rediscovery = false , options = rpc_options )
2146
2144
2147
2145
if servers
2148
2146
servers = Array ( servers )
2149
- elsif broadcast
2150
- servers = [ ]
2151
2147
else
2152
- servers = known_server_identities ( force_rediscovery , options )
2153
- # Set the timeout to be the same as the discovery timeout since we are using a possibly stale previous discovery
2154
- options [ :timeout ] = Rails . configuration . msg_broker [ :rpc_options ] [ :disctimeout ]
2148
+ servers = [ ]
2155
2149
end
2156
2150
2157
2151
# Setup the rpc client
@@ -2793,7 +2787,7 @@ def self.rpc_find_available(node_profile=nil, district_uuid=nil, require_specifi
2793
2787
2794
2788
rpc_opts = nil
2795
2789
server_infos = [ ]
2796
- rpc_get_fact ( 'active_capacity' , nil , false , force_rediscovery , additional_filters , rpc_opts ) do |server , capacity |
2790
+ rpc_get_fact ( 'active_capacity' , nil , force_rediscovery , additional_filters , rpc_opts ) do |server , capacity |
2797
2791
#Rails.logger.debug "Next server: #{server} active capacity: #{capacity}"
2798
2792
server_infos << [ server , capacity . to_f ]
2799
2793
end
@@ -2838,7 +2832,7 @@ def self.rpc_find_available(node_profile=nil, district_uuid=nil, require_specifi
2838
2832
2839
2833
rpc_opts = nil
2840
2834
districts = District . find_all # candidate for caching
2841
- rpc_get_fact ( 'active_capacity' , nil , false , force_rediscovery , additional_filters , rpc_opts ) do |server , capacity |
2835
+ rpc_get_fact ( 'active_capacity' , nil , force_rediscovery , additional_filters , rpc_opts ) do |server , capacity |
2842
2836
districts . each do |district |
2843
2837
if district . server_identities . has_key? ( server )
2844
2838
server_infos << [ server , capacity . to_f , district ]
@@ -2986,13 +2980,13 @@ def rsuccess(response)
2986
2980
# * uses rpc_exec
2987
2981
#
2988
2982
2989
- def self . rpc_get_fact ( fact , servers = nil , broadcast = false , force_rediscovery = false , additional_filters = nil , custom_rpc_opts = nil )
2983
+ def self . rpc_get_fact ( fact , servers = nil , force_rediscovery = false , additional_filters = nil , custom_rpc_opts = nil )
2990
2984
result = nil
2991
2985
options = custom_rpc_opts ? custom_rpc_opts : rpc_options
2992
2986
options [ :filter ] [ 'fact' ] = options [ :filter ] [ 'fact' ] + additional_filters if additional_filters
2993
2987
2994
2988
Rails . logger . debug ( "DEBUG: rpc_get_fact: fact=#{ fact } " )
2995
- rpc_exec ( 'rpcutil' , servers , broadcast , force_rediscovery , options ) do |client |
2989
+ rpc_exec ( 'rpcutil' , servers , force_rediscovery , options ) do |client |
2996
2990
client . get_fact ( :fact => fact ) do |response |
2997
2991
next unless Integer ( response [ :body ] [ :statuscode ] ) == 0
2998
2992
0 commit comments