Skip to content

Commit

Permalink
Fixed marklogic-community#312: added support for group and host prope…
Browse files Browse the repository at this point in the history
…rties, backwards compatible
  • Loading branch information
grtjn committed Dec 9, 2014
1 parent 70416a7 commit edb73f5
Show file tree
Hide file tree
Showing 2 changed files with 444 additions and 130 deletions.
17 changes: 14 additions & 3 deletions deploy/lib/server_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,12 @@ def restart
end

def config
logger.info get_config
setup = File.read ServerConfig.expand_path("#{@@path}/lib/xquery/setup.xqy")
r = execute_query %Q{#{setup} setup:rewrite-config(#{get_config})}
logger.debug "code: #{r.code.to_i}"

r.body = parse_json(r.body)
logger.info r.body
end

def bootstrap
Expand Down Expand Up @@ -532,7 +537,13 @@ def wipe
r.body = parse_json(r.body)
logger.debug r.body

if r.body.match("<error:error")
if r.body.match("RESTART_NOW")
logger.warn "************************************"
logger.warn "*** RESTART OF MARKLOGIC IS REQUIRED"
logger.warn "************************************"
logger.info "... Wipe NOT Complete, rerun wipe after restart to complete!"
return false
elsif r.body.match("<error:error") || r.body.match("error log")
logger.error r.body
logger.error "... Wipe FAILED"
return false
Expand All @@ -557,7 +568,7 @@ def validate_install
r.body = parse_json(r.body)
logger.debug r.body

if r.body.match("<error:error")
if r.body.match("<error:error") || r.body.match("error log")
logger.error r.body
logger.info "... Validation ERROR"
result = false
Expand Down
Loading

0 comments on commit edb73f5

Please sign in to comment.