Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7AF79200C89 for ; Sat, 3 Jun 2017 11:49:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7A0B4160BDE; Sat, 3 Jun 2017 09:49:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C5F79160BBE for ; Sat, 3 Jun 2017 11:49:01 +0200 (CEST) Received: (qmail 32342 invoked by uid 500); 3 Jun 2017 09:49:01 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 32333 invoked by uid 99); 3 Jun 2017 09:49:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Jun 2017 09:49:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D6553E0202; Sat, 3 Jun 2017 09:49:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jan@apache.org To: commits@couchdb.apache.org Date: Sat, 03 Jun 2017 09:49:01 -0000 Message-Id: <932ad3a178704cd185d8b9b94a107a6a@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] couchdb-setup git commit: Merge remote-tracking branch 'asf/salt-distribution' archived-at: Sat, 03 Jun 2017 09:49:02 -0000 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 Authored: Sat Jun 3 11:48:56 2017 +0200 Committer: Jan Lehnardt 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 ----------------------------------------------------------------------