Skip to content

Commit

Permalink
Fixed marklogic-community#456: made restart full cluster default, is …
Browse files Browse the repository at this point in the history
…safer
  • Loading branch information
grtjn committed Jul 6, 2015
1 parent 0d9e53e commit b09931a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions deploy/lib/server_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -509,18 +509,23 @@ def execute_query(query, properties = {})
end

def restart
group = ARGV.shift
# Exclude any argument passed from command line.
if group && group.index("-") == 0
group = nil
group = nil
ARGV.each do |arg|
# Exclude any argument passed from command line.
if ! arg.match("^-")
group = arg
end
end

if group && group == "cluster"
logger.info "Restarting MarkLogic Server cluster of #{@hostname}"
elsif group
logger.info "Restarting MarkLogic Server group #{group}"
else
logger.info "Restarting MarkLogic Server group of #{@hostname}"
# restarting partial cluster unsafe when working with multiple groups
#logger.info "Restarting MarkLogic Server group of #{@hostname}"
logger.info "Restarting MarkLogic Server cluster of #{@hostname}"
group = "cluster"
end
logger.debug "this: #{self}"
setup = File.read ServerConfig.expand_path("#{@@path}/lib/xquery/setup.xqy")
Expand Down

0 comments on commit b09931a

Please sign in to comment.