set run list without executor
This commit is contained in:
parent
6033d9fbd6
commit
f51df952e6
@ -519,10 +519,6 @@ module Devops
|
||||
raise 'Failed to sync project metadata with chef' unless succeeded
|
||||
end
|
||||
|
||||
def set_run_list(run_list)
|
||||
knife_instance.set_run_list(@server.chef_node_name, run_list)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def schedule_expiration
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
require File.join(File.dirname(__FILE__), "worker")
|
||||
|
||||
require "lib/executors/server_executor"
|
||||
require "db/mongo/models/report"
|
||||
|
||||
class WaitRebootstrapWorker < Worker
|
||||
@ -10,6 +9,7 @@ class WaitRebootstrapWorker < Worker
|
||||
# 'server_node_name'
|
||||
# 'owner'
|
||||
# 'old_chef_node': node info
|
||||
# 'new_chef_env'
|
||||
|
||||
def perform(options)
|
||||
call do
|
||||
@ -25,8 +25,8 @@ class WaitRebootstrapWorker < Worker
|
||||
|
||||
puts_and_flush "Setting run list to #{old_node_info['run_list']}"
|
||||
|
||||
executor = Devops::Executor::ServerExecutor.new(server, out, current_user: owner)
|
||||
executor.set_run_list(old_node_info["run_list"])
|
||||
knife_instance = KnifeFactory.instance(options.fetch("new_chef_env"))
|
||||
knife_instance.set_run_list(server.chef_node_name, old_node_info["run_list"])
|
||||
0
|
||||
end
|
||||
end
|
||||
@ -40,4 +40,3 @@ class WaitRebootstrapWorker < Worker
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user