diff --git a/deploy/lib/ml_rest.rb b/deploy/lib/ml_rest.rb index 8f1c0a5a..3891531e 100644 --- a/deploy/lib/ml_rest.rb +++ b/deploy/lib/ml_rest.rb @@ -44,13 +44,19 @@ def install_properties(path) file = open(d, "rb") contents = file.read - # @logger.debug "methods: #{methods}" - url = "http://#{@hostname}:#{@port}/v1/config/properties" - - @logger.debug "url: #{url}" - r = go url, "put", headers, nil, contents, @auth_method - if (r.code.to_i < 200 && r.code.to_i > 206) - @logger.error("code: #{r.code.to_i} body:#{r.body}") + if contents.match(' 206) + @logger.error("code: #{r.code.to_i} body:#{r.body}") + end + else + # Properties file needs to be updated + raise ExitException.new "#{d} is in an old format; changes to this file won't take effect. See https://github.com/marklogic/roxy/wiki/REST-properties-format-change" end end else