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

Completely remove the VimBrokerWorker #506

Merged
merged 5 commits into from
Jan 27, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/models/manageiq/providers/vmware/infra_manager.rb
Original file line number Diff line number Diff line change
@@ -169,8 +169,7 @@ def validate_remote_console_webmks_support
end

def self.use_vim_broker?
agrare marked this conversation as resolved.
Show resolved Hide resolved
return false if defined?(Rails::Console) && !::Settings.development.use_vim_broker_in_console
MiqVimBrokerWorker.has_required_role?
false
end

delegate :use_vim_broker?, :to => :class
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
class ManageIQ::Providers::Vmware::InfraManager::HostEsx < ManageIQ::Providers::Vmware::InfraManager::Host
def self.use_vim_broker?
false
end

delegate :use_vim_broker?, :to => :class

def vim_shutdown(force = false)
with_provider_object do |vim_host|
_log.info "Invoking with: force: [#{force}]"
@@ -147,9 +141,6 @@ def refresh_logs
end
rescue => err
_log.log_backtrace(err)
rescue MiqException::MiqVimBrokerUnavailable => err
MiqVimBrokerWorker.broker_unavailable(err.class.name, err.to_s)
_log.warn("Reported the broker unavailable")
rescue Timeout::Error
_log.warn "Timeout encountered during log collection for Host [#{name}]"
ensure
Original file line number Diff line number Diff line change
@@ -21,8 +21,6 @@ def do_clone_task_check(clone_task_mor)
end
end
end
rescue MiqException::MiqVimBrokerUnavailable => err
return false, "not available because <#{err.message}>"
end

def find_destination_in_vmdb
Original file line number Diff line number Diff line change
@@ -22,8 +22,6 @@ def perform_metadata_scan(ost)
$log.debug "#{log_pref} VM = #{vm_name}"

args1 = ost.args[1]
args1['ems'][:use_vim_broker] = MiqServer.use_broker_for_embedded_proxy?(args1['ems']['connect_to'])
args1['ems'][:vim_broker_drb_uri] = MiqVimBrokerWorker.drb_uri if args1['ems'][:use_vim_broker]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the drb_uri column go away now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the miq_workers table yeah it probably can


begin
@vm_cfg_file = vm_name
@@ -57,7 +55,8 @@ def connect_to_ems(ost)
$log.debug "connect_to_ems: miqVimHost = #{miqVimHost.class.name}"
if miqVimHost
st = Time.now
use_broker = ost.scanData["ems"][:use_vim_broker] == true
# TODO remove use_broker completely
use_broker = false
host_address = miqVimHost[:hostname] || miqVimHost[:ipaddress]
ems_display_text = "#{ems_connect_type}(#{use_broker ? 'via broker' : 'directly'}):#{miqVimHost[:address]}"
$log.info "Connecting to [#{ems_display_text}] for VM:[#{@vmCfgFile}]"
102 changes: 0 additions & 102 deletions app/models/miq_vim_broker_worker.rb

This file was deleted.

Loading