You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2019/04/27 04:31:16 UTC
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/13139
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
[tools] command to reset authz cache in kudu CLI
Added command to reset authz privileges cache into kudu CLI.
The synopsis for the command is
kudu master authz_cache reset <master_address>
Added corresponding tests as well.
Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
---
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_master.cc
4 files changed, 153 insertions(+), 64 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/13139/1
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, Adar Dembo, Hao Hao,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/13139
to look at the new patch set (#4).
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
[tools] command to reset authz cache in kudu CLI
Added command to reset authz privileges cache into kudu CLI.
Synopsis:
kudu master authz_cache reset <all_master_addresses_in_cluster>
Added corresponding tests as well. A scenario for a 'positive' case
is not among the added ones: it will be a separate effort to bring in
HMS+Sentry into the framework for testing kudu CLI tool. However,
there is coverage for a 'positive' case for cache reset elsewhere.
In particular, the scenarios of the SentryAuthzProviderCacheITest
give appropriate coverage using the ResetAuthzCache RPC endpoint.
Those scenarios test and AdminCliTest.TestAuthzResetCacheNotImplemented
should provide enough coverage.
Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
---
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_master.cc
3 files changed, 255 insertions(+), 69 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/13139/4
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
[tools] command to reset authz cache in kudu CLI
Added command to reset authz privileges cache into kudu CLI.
Synopsis:
kudu master authz_cache reset <all_master_addresses_in_cluster>
The tool requires all masters' end-points to be specified in the command
line. This is to keep things as consistent as possible, since resetting
the authz privileges cache only on a subset of masters could lead to
unexpected surprises upon master leadership change. It's possible
to reset authz privileges cache at any subset of masters in a Kudu
cluster adding --force flag. For example, to reset authz cache only
at one master out of three in multi-master Kudu cluster, run
kudu master authz_cache reset --force <master_address>
Added corresponding tests as well. A scenario for a 'positive' case
is not among the added ones: it will be a separate effort to bring in
HMS+Sentry into the framework for testing kudu CLI tool. However,
there is coverage for a 'positive' case for cache reset elsewhere.
In particular, the scenarios of the SentryAuthzProviderCacheITest
give appropriate coverage using the ResetAuthzCache RPC endpoint.
Those scenarios test and AdminCliTest.TestAuthzResetCacheNotImplemented
should provide enough coverage.
Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Reviewed-on: http://gerrit.cloudera.org:8080/13139
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Reviewed-by: Hao Hao <ha...@cloudera.com>
Tested-by: Alexey Serbin <as...@cloudera.com>
---
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_master.cc
3 files changed, 323 insertions(+), 69 deletions(-)
Approvals:
Andrew Wong: Looks good to me, approved
Hao Hao: Looks good to me, approved
Alexey Serbin: Verified
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/5/src/kudu/tools/tool_action_master.cc
File src/kudu/tools/tool_action_master.cc:
http://gerrit.cloudera.org:8080/#/c/13139/5/src/kudu/tools/tool_action_master.cc@187
PS5, Line 187: if (resp_master_addrs.size() != master_addresses.size()) {
> Yeah ultimately I was OK with having the tool operate on a single master an
Great. So, PS6 contains best of the both worlds: by default, it resets privileges cache at every master in the system in attempt to keep things as consistent as possible, and there is a way to reset cache at any sub-set of masters in the system as well if specifying the '--force' flag.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 06 May 2019 16:48:24 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Andrew Wong, Adar Dembo, Hao Hao,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/13139
to look at the new patch set (#5).
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
[tools] command to reset authz cache in kudu CLI
Added command to reset authz privileges cache into kudu CLI.
Synopsis:
kudu master authz_cache reset <all_master_addresses_in_cluster>
Added corresponding tests as well. A scenario for a 'positive' case
is not among the added ones: it will be a separate effort to bring in
HMS+Sentry into the framework for testing kudu CLI tool. However,
there is coverage for a 'positive' case for cache reset elsewhere.
In particular, the scenarios of the SentryAuthzProviderCacheITest
give appropriate coverage using the ResetAuthzCache RPC endpoint.
Those scenarios test and AdminCliTest.TestAuthzResetCacheNotImplemented
should provide enough coverage.
Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
---
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_master.cc
3 files changed, 255 insertions(+), 69 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/13139/5
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, Adar Dembo, Hao Hao,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/13139
to look at the new patch set (#3).
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
[tools] command to reset authz cache in kudu CLI
Added command to reset authz privileges cache into kudu CLI.
Synopsis:
kudu master authz_cache reset <master_address>
Added corresponding tests as well. A scenario for a 'positive' case
is not among the added ones: it will be a separate effort to bring in
HMS+Sentry into the framework for testing kudu CLI tool. However,
there is coverage for a 'positive' case for cache reset elsewhere.
In particular, the scenarios of the SentryAuthzProviderCacheITest
give appropriate coverage using the ResetAuthzCache RPC endpoint.
Those scenarios test and AdminCliTest.TestAuthzResetCacheNotImplemented
should provide enough coverage.
Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
---
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_master.cc
3 files changed, 154 insertions(+), 63 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/13139/3
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG@12
PS1, Line 12: kudu master authz_cache reset <master_address>
> > An alternative would be to invalidate the cache when a master becomes lea
Right: in case of frequent master leader changes it will be an extra churn that might lead to a down-spiraling if too many requests fill up RPC queues due to slow Sentry responses under dog-piling of authz requests.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 29 Apr 2019 22:50:40 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 7: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 7
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 06 May 2019 17:58:50 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 4:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG@12
PS1, Line 12: kudu master authz_cache reset <all_master_addresses_in_cluster>
> I can buy that argument. I don't feel strongly.
Done
http://gerrit.cloudera.org:8080/#/c/13139/2/src/kudu/tools/kudu-admin-test.cc
File src/kudu/tools/kudu-admin-test.cc:
http://gerrit.cloudera.org:8080/#/c/13139/2/src/kudu/tools/kudu-admin-test.cc@2168
PS2, Line 2168:
> Sounds good to me.
Ack
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/kudu-tool-test.cc@1014
PS1, Line 1014: "authz_cache.*Operate on the authz cache of a Kudu Master",
> Should also add a test for the help output of the authz cache mode.
Done
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Fri, 03 May 2019 23:36:20 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 6:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/6/src/kudu/tools/tool_action_master.cc
File src/kudu/tools/tool_action_master.cc:
http://gerrit.cloudera.org:8080/#/c/13139/6/src/kudu/tools/tool_action_master.cc@310
PS6, Line 310: ignore mismatch
> nit: "Ignore mismatches"
Done
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 06 May 2019 17:56:38 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 7: Verified+1
unrelated flake in Java tests:
* org.apache.kudu.spark.kudu.DefaultSourceTest
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 7
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Comment-Date: Mon, 06 May 2019 18:15:59 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 6: Code-Review+2
(1 comment)
Small nit but otherwise LGTM
http://gerrit.cloudera.org:8080/#/c/13139/6/src/kudu/tools/tool_action_master.cc
File src/kudu/tools/tool_action_master.cc:
http://gerrit.cloudera.org:8080/#/c/13139/6/src/kudu/tools/tool_action_master.cc@310
PS6, Line 310: ignore mismatch
nit: "Ignore mismatches"
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 06 May 2019 17:40:45 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG@12
PS1, Line 12: kudu master authz_cache reset <master_address>
> But don't we want this to be a cluster command that invalidates the authz c
Yep, that might be a better solution. Current approach assumes an operator would run this command for every master in the cluster.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 29 Apr 2019 22:36:25 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/5/src/kudu/tools/tool_action_master.cc
File src/kudu/tools/tool_action_master.cc:
http://gerrit.cloudera.org:8080/#/c/13139/5/src/kudu/tools/tool_action_master.cc@187
PS5, Line 187: if (resp_master_addrs.size() != master_addresses.size()) {
> Does this mean the tool can't be used if the masters have a configuration i
It seemed to me that the consensus was that we want to make the reset operation for the caches as consistent as possible. Resetting them at once at every master helps to prevent inconsistencies upon master leadership change.
I think I'll add a --force flag: if the --force flag specified, the validation of master addresses will be skipped.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sat, 04 May 2019 01:43:19 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 1:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/CMakeLists.txt
File src/kudu/tools/CMakeLists.txt:
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/CMakeLists.txt@45
PS1, Line 45: tool_action.cc
: table_scanner.cc
Revert alphabetical order?
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/tool_action_master.cc
File src/kudu/tools/tool_action_master.cc:
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/tool_action_master.cc@197
PS1, Line 197: t pri
nit: the
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/tool_action_master.cc@202
PS1, Line 202: Operate on authz cache
nit: how about "Operate on the authz cache of a Kudu Master"
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/tool_action_master.cc@195
PS1, Line 195: unique_ptr<Action> action_reset =
: ActionBuilder("reset", &ResetAuthzCache)
: .Description("Reset privileges cache")
: .AddRequiredParameter({ kMasterAddressArg, kMasterAddressDesc })
: .Build();
:
: unique_ptr<Mode> mode_authz_cache = ModeBuilder("authz_cache")
: .Description("Operate on authz cache")
: .AddAction(std::move(action_reset))
: .Build();
: builder.AddMode(std::move(mode_authz_cache));
Why bother separating this out?
My guess is this is in preparation for further tooling? Perhaps a `kudu master authz_cache list` tool or somesuch?
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sat, 27 Apr 2019 04:58:54 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 6:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/5/src/kudu/tools/tool_action_master.cc
File src/kudu/tools/tool_action_master.cc:
http://gerrit.cloudera.org:8080/#/c/13139/5/src/kudu/tools/tool_action_master.cc@187
PS5, Line 187: for (const auto& address : master_addresses) {
> Right, I guess I assumed the consensus was we'd just have the operator run
Yeah ultimately I was OK with having the tool operate on a single master and pushing the multiplexing to admins.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sun, 05 May 2019 03:34:46 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 2:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/13139/2/src/kudu/tools/kudu-admin-test.cc
File src/kudu/tools/kudu-admin-test.cc:
http://gerrit.cloudera.org:8080/#/c/13139/2/src/kudu/tools/kudu-admin-test.cc@2168
PS2, Line 2168: AdminCliTes
> Do you think a positive test is needed?
I think we have positive test for the RPC endpoint elsewhere, and unfortunately HMS+Sentry stuff is not integrated into the framework for kudu CLI. So, I think having the test AdminCliTest.TestAuthzResetCacheNotImplemented below should suffice.
http://gerrit.cloudera.org:8080/#/c/13139/2/src/kudu/tools/kudu-admin-test.cc@2173
PS2, Line 2173: ince the default authz provider doesn't have one.
> Is it because the user doesn't have admin credentials or because 'the defau
Ah, indeed -- this is the case with non-sufficient privileges. I'll update the comment.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sun, 28 Apr 2019 21:48:28 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, Adar Dembo, Hao Hao,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/13139
to look at the new patch set (#7).
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
[tools] command to reset authz cache in kudu CLI
Added command to reset authz privileges cache into kudu CLI.
Synopsis:
kudu master authz_cache reset <all_master_addresses_in_cluster>
The tool requires all masters' end-points to be specified in the command
line. This is to keep things as consistent as possible, since resetting
the authz privileges cache only on a subset of masters could lead to
unexpected surprises upon master leadership change. It's possible
to reset authz privileges cache at any subset of masters in a Kudu
cluster adding --force flag. For example, to reset authz cache only
at one master out of three in multi-master Kudu cluster, run
kudu master authz_cache reset --force <master_address>
Added corresponding tests as well. A scenario for a 'positive' case
is not among the added ones: it will be a separate effort to bring in
HMS+Sentry into the framework for testing kudu CLI tool. However,
there is coverage for a 'positive' case for cache reset elsewhere.
In particular, the scenarios of the SentryAuthzProviderCacheITest
give appropriate coverage using the ResetAuthzCache RPC endpoint.
Those scenarios test and AdminCliTest.TestAuthzResetCacheNotImplemented
should provide enough coverage.
Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
---
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_master.cc
3 files changed, 323 insertions(+), 69 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/13139/7
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 7
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed Kudu Jenkins from this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Removed reviewer Kudu Jenkins with the following votes:
* Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteReviewer
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 7
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 3:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG@12
PS1, Line 12: kudu master authz_cache reset <master_address>
But don't we want this to be a cluster command that invalidates the authz caches on _all_ masters? Otherwise we might have follower masters with stale privileges.
An alternative would be to invalidate the cache when a master becomes leader.
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/kudu-tool-test.cc@1014
PS1, Line 1014: "authz_cache.*Operate on the authz cache of a Kudu Master",
Should also add a test for the help output of the authz cache mode.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 29 Apr 2019 22:16:41 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/5/src/kudu/tools/tool_action_master.cc
File src/kudu/tools/tool_action_master.cc:
http://gerrit.cloudera.org:8080/#/c/13139/5/src/kudu/tools/tool_action_master.cc@187
PS5, Line 187: if (resp_master_addrs.size() != master_addresses.size()) {
> It seemed to me that the consensus was that we want to make the reset opera
Right, I guess I assumed the consensus was we'd just have the operator run the tool multiple times, one for each master, as they would for other `kudu master` tooling.
--force flag seems ok too. Maybe we should add this behavior to set_flag as well.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sat, 04 May 2019 01:48:07 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, Adar Dembo, Hao Hao,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/13139
to look at the new patch set (#2).
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
[tools] command to reset authz cache in kudu CLI
Added command to reset authz privileges cache into kudu CLI.
Synopsis:
kudu master authz_cache reset <master_address>
Added corresponding tests as well.
Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
---
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_master.cc
3 files changed, 152 insertions(+), 63 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/13139/2
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Hao Hao (Code Review)" <ge...@cloudera.org>.
Hao Hao has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 7: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 7
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 06 May 2019 18:01:21 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Hao Hao (Code Review)" <ge...@cloudera.org>.
Hao Hao has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 4: Code-Review+2
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/4/src/kudu/tools/kudu-admin-test.cc
File src/kudu/tools/kudu-admin-test.cc:
http://gerrit.cloudera.org:8080/#/c/13139/4/src/kudu/tools/kudu-admin-test.cc@2169
PS4, Line 2169: TestAuthzResetCacheIncorrentMasterAddressList
Nit: TestAuthzResetCacheIncorrectMasterAddressList
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Comment-Date: Sat, 04 May 2019 00:19:12 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 1:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/CMakeLists.txt
File src/kudu/tools/CMakeLists.txt:
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/CMakeLists.txt@45
PS1, Line 45: tool_action.cc
: table_scanner.cc
> Revert alphabetical order?
Done
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/tool_action_master.cc
File src/kudu/tools/tool_action_master.cc:
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/tool_action_master.cc@197
PS1, Line 197: t pri
> nit: the
Done
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/tool_action_master.cc@202
PS1, Line 202: Operate on authz cache
> nit: how about "Operate on the authz cache of a Kudu Master"
Done
http://gerrit.cloudera.org:8080/#/c/13139/1/src/kudu/tools/tool_action_master.cc@195
PS1, Line 195: unique_ptr<Action> action_reset =
: ActionBuilder("reset", &ResetAuthzCache)
: .Description("Reset privileges cache")
: .AddRequiredParameter({ kMasterAddressArg, kMasterAddressDesc })
: .Build();
:
: unique_ptr<Mode> mode_authz_cache = ModeBuilder("authz_cache")
: .Description("Operate on authz cache")
: .AddAction(std::move(action_reset))
: .Build();
: builder.AddMode(std::move(mode_authz_cache));
> Why bother separating this out?
Yeah, I guess we might need something like 'invalidate entries for particular user' and listing the information in the cache as well, yep.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sat, 27 Apr 2019 05:55:00 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, Adar Dembo, Hao Hao,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/13139
to look at the new patch set (#6).
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
[tools] command to reset authz cache in kudu CLI
Added command to reset authz privileges cache into kudu CLI.
Synopsis:
kudu master authz_cache reset <all_master_addresses_in_cluster>
Added corresponding tests as well. A scenario for a 'positive' case
is not among the added ones: it will be a separate effort to bring in
HMS+Sentry into the framework for testing kudu CLI tool. However,
there is coverage for a 'positive' case for cache reset elsewhere.
In particular, the scenarios of the SentryAuthzProviderCacheITest
give appropriate coverage using the ResetAuthzCache RPC endpoint.
Those scenarios test and AdminCliTest.TestAuthzResetCacheNotImplemented
should provide enough coverage.
Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
---
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_master.cc
3 files changed, 323 insertions(+), 69 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/13139/6
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG@12
PS1, Line 12: kudu master authz_cache reset <master_address>
> I'm on the fence about `master` vs `cluster`. On the one hand, yes, we woul
I can buy that argument. I don't feel strongly.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Tue, 30 Apr 2019 20:58:06 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 4:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/4/src/kudu/tools/kudu-admin-test.cc
File src/kudu/tools/kudu-admin-test.cc:
http://gerrit.cloudera.org:8080/#/c/13139/4/src/kudu/tools/kudu-admin-test.cc@2169
PS4, Line 2169: TestAuthzResetCacheIncorrentMasterAddressList
> Nit: TestAuthzResetCacheIncorrectMasterAddressList
Done
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Comment-Date: Sat, 04 May 2019 00:21:37 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed Kudu Jenkins from this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Removed reviewer Kudu Jenkins with the following votes:
* Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteReviewer
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Hao Hao (Code Review)" <ge...@cloudera.org>.
Hao Hao has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 2:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/13139/2/src/kudu/tools/kudu-admin-test.cc
File src/kudu/tools/kudu-admin-test.cc:
http://gerrit.cloudera.org:8080/#/c/13139/2/src/kudu/tools/kudu-admin-test.cc@2168
PS2, Line 2168: AdminCliTes
Do you think a positive test is needed?
http://gerrit.cloudera.org:8080/#/c/13139/2/src/kudu/tools/kudu-admin-test.cc@2173
PS2, Line 2173: ince the default authz provider doesn't have one.
Is it because the user doesn't have admin credentials or because 'the default authz provider doesn't have one'?
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sun, 28 Apr 2019 06:04:03 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG@12
PS1, Line 12: kudu master authz_cache reset <master_address>
> Right: in case of frequent master leader changes it will be an extra churn
I'm on the fence about `master` vs `cluster`. On the one hand, yes, we would like an operator to run this on all masters. On the other, 'cluster seems to be wider-touching than just the masters, checking health cluster-wide, rebalancing cluster-wide.
Authz privilege caching is squarely a function of the masters, just like setting flags, getting flags, getting the status, etc -- all master commands seem like they could/should be done on all masters, and we leave it up to tool operators to make it so.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Tue, 30 Apr 2019 20:54:22 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/5/src/kudu/tools/tool_action_master.cc
File src/kudu/tools/tool_action_master.cc:
http://gerrit.cloudera.org:8080/#/c/13139/5/src/kudu/tools/tool_action_master.cc@187
PS5, Line 187: if (resp_master_addrs.size() != master_addresses.size()) {
Does this mean the tool can't be used if the masters have a configuration issue? Not sure I necessarily agree if so.
FWIW I was ok with keeping this tool be single-master-usage only. Not sure why we want to _force_ a refresh of all caches. My earlier argument regarding existing master tooling: "all master commands seem like they could/should be done on all masters, and we leave it up to tool operators to make it so."
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sat, 04 May 2019 00:50:21 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/13139/1//COMMIT_MSG@12
PS1, Line 12: kudu master authz_cache reset <master_address>
> An alternative would be to invalidate the cache when a master becomes leader.
On second thought, I wouldn't recommend this. The cached privileges have a TTL, and I don't see why losing/gaining leadership ought to affect the TTL.
So yeah, maybe just fanning out to all masters.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 29 Apr 2019 22:48:02 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Hao Hao (Code Review)" <ge...@cloudera.org>.
Hao Hao has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 3: Code-Review+2
(1 comment)
May want to wait for Andrew or Adar to take another pass.
http://gerrit.cloudera.org:8080/#/c/13139/2/src/kudu/tools/kudu-admin-test.cc
File src/kudu/tools/kudu-admin-test.cc:
http://gerrit.cloudera.org:8080/#/c/13139/2/src/kudu/tools/kudu-admin-test.cc@2168
PS2, Line 2168: AdminCliTes
> I think we have positive test for the RPC endpoint elsewhere, and unfortuna
Sounds good to me.
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 29 Apr 2019 23:07:19 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] command to reset authz cache in kudu CLI
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13139 )
Change subject: [tools] command to reset authz cache in kudu CLI
......................................................................
Patch Set 4: Verified+1
unrelated flakes in:
* HmsSentryConfigurations/MasterStressTest.Test/1
* RaftConsensusITest.TestReplicaBehaviorViaRPC
--
To view, visit http://gerrit.cloudera.org:8080/13139
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If49f3ebdea22ea0df3aaec313b4db949dc834943
Gerrit-Change-Number: 13139
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Comment-Date: Sat, 04 May 2019 00:00:22 +0000
Gerrit-HasComments: No