couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [2/2] couchdb-setup git commit: Merge remote-tracking branch 'asf/salt-distribution'
Date Sat, 03 Jun 2017 09:49:01 GMT
Merge remote-tracking branch 'asf/salt-distribution'

* asf/salt-distribution:
  fix cluster setup: use same admin pq salt on all nodes


Project: http://git-wip-us.apache.org/repos/asf/couchdb-setup/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-setup/commit/c38d7aab
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-setup/tree/c38d7aab
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-setup/diff/c38d7aab

Branch: refs/heads/master
Commit: c38d7aab035bce5f88ed772de59187a39da2768f
Parents: b2b93c1 54623ce
Author: Jan Lehnardt <jan@apache.org>
Authored: Sat Jun 3 11:48:56 2017 +0200
Committer: Jan Lehnardt <jan@apache.org>
Committed: Sat Jun 3 11:48:56 2017 +0200

----------------------------------------------------------------------
 src/setup.erl       | 23 +++++++++++------------
 src/setup_httpd.erl |  1 +
 2 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/c38d7aab/src/setup.erl
----------------------------------------------------------------------
diff --cc src/setup.erl
index acbeb2d,6657073..5a71004
--- a/src/setup.erl
+++ b/src/setup.erl
@@@ -93,11 -90,10 +95,11 @@@ enable_cluster_http(Options) -
  
      Body = ?JSON_ENCODE({[
          {<<"action">>, <<"enable_cluster">>},
-         {<<"username">>, couch_util:get_value(username, Options)},
-         {<<"password">>, couch_util:get_value(password, Options)},
+         {<<"username">>, AdminUsername},
+         {<<"password_hash">>, ?l2b(AdminPasswordHash)},
          {<<"bind_address">>, couch_util:get_value(bind_address, Options)},
 -        {<<"port">>, couch_util:get_value(port, Options)}
 +        {<<"port">>, couch_util:get_value(port, Options)},
 +        {<<"node_count">>, couch_util:get_value(node_count, Options)}
      ]}),
  
      Headers = [
@@@ -162,15 -157,10 +167,9 @@@ enable_cluster_int(Options, no) -
              config:set_integer("chttpd", "port", Port)
      end,
      couch_log:notice("Enable Cluster: ~p~n", [Options]).
 -    %cluster_state:set(enabled).
  
- maybe_set_admin(Username, Password) ->
-     case couch_auth_cache:get_admin(Username) of
-         nil ->
-             HashedPassword = couch_passwords:hash_admin_password(Password),
-             config:set("admins", binary_to_list(Username), binary_to_list(HashedPassword));
-         _Else ->
-             ok
-     end.
+ set_admin(Username, Password) ->
+   config:set("admins", binary_to_list(Username), binary_to_list(Password)).
  
  
  finish_cluster() ->

http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/c38d7aab/src/setup_httpd.erl
----------------------------------------------------------------------


Mime
View raw message