fixed bootstrap stream
This commit is contained in:
parent
2961b402b4
commit
05e9ef3266
@ -143,20 +143,22 @@ module Devops
|
|||||||
|
|
||||||
# TODO: check bootstrap template name
|
# TODO: check bootstrap template name
|
||||||
def bootstrap_server_stream out
|
def bootstrap_server_stream out
|
||||||
s = prepare_create_server
|
s, rl, bt = prepare_bootstrap_server
|
||||||
status = []
|
status = []
|
||||||
cert = Devops::Db.connector.key s.key
|
cert = Devops::Db.connector.key s.key
|
||||||
logger.debug "Bootstrap certificate path: #{cert.path}"
|
DevopsLogger.logger.debug "Bootstrap certificate path: #{cert.path}"
|
||||||
bootstrap s, out, cert.path, logger
|
#bootstrap s, out, cert.path, logger
|
||||||
|
provider = ::Provider::ProviderFactory.get(s.provider)
|
||||||
|
r = two_phase_bootstrap s, provider.run_list, bt, cert.path, out
|
||||||
str = nil
|
str = nil
|
||||||
r = if check_server(s)
|
r = if check_server(s)
|
||||||
Devops::Db.connector.server_set_chef_node_name s
|
Devops::Db.connector.server_set_chef_node_name s
|
||||||
str = "Server with id '#{s.id}' is bootstraped"
|
str = "Server with id '#{s.id}' is bootstraped"
|
||||||
logger.info str
|
DevopsLogger.logger.info str
|
||||||
0
|
0
|
||||||
else
|
else
|
||||||
str = "Server with id '#{s.id}' is not bootstraped"
|
str = "Server with id '#{s.id}' is not bootstraped"
|
||||||
logger.warn str
|
DevopsLogger.logger.warn str
|
||||||
1
|
1
|
||||||
end
|
end
|
||||||
status.push r
|
status.push r
|
||||||
@ -171,7 +173,6 @@ module Devops
|
|||||||
files = []
|
files = []
|
||||||
uri = URI.parse(@request.url)
|
uri = URI.parse(@request.url)
|
||||||
h = s.to_hash
|
h = s.to_hash
|
||||||
# h["options"] = s.options
|
|
||||||
h["_id"] = s.id
|
h["_id"] = s.id
|
||||||
jid = BootstrapWorker.perform_async(dir, s.provider, h, bt, parser.current_user, DevopsConfig.config)
|
jid = BootstrapWorker.perform_async(dir, s.provider, h, bt, parser.current_user, DevopsConfig.config)
|
||||||
Worker.set_status jid, Worker::STATUS::IN_QUEUE
|
Worker.set_status jid, Worker::STATUS::IN_QUEUE
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user