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/10/03 23:47:13 UTC

[kudu-CR] [mini chronyd] remove cmd socket directory on exit

Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/14365


Change subject: [mini_chronyd] remove cmd socket directory on exit
......................................................................

[mini_chronyd] remove cmd socket directory on exit

This patch adds a clean up for chronyd's command socket directory
created by MiniChronyd.  Also, it removes unused cmd_socket_ member
of the MiniChronyd class.

Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
---
M src/kudu/clock/test/mini_chronyd.cc
M src/kudu/clock/test/mini_chronyd.h
2 files changed, 13 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/65/14365/1
-- 
To view, visit http://gerrit.cloudera.org:8080/14365
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Gerrit-Change-Number: 14365
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>

[kudu-CR] [mini chronyd] remove cmd socket directory on exit

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14365 )

Change subject: [mini_chronyd] remove cmd socket directory on exit
......................................................................

[mini_chronyd] remove cmd socket directory on exit

This patch adds a clean up for chronyd's command socket directory
created by MiniChronyd.  Also, it removes unused cmd_socket_ member
of the MiniChronyd class.

Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Reviewed-on: http://gerrit.cloudera.org:8080/14365
Tested-by: Alexey Serbin <as...@cloudera.com>
Reviewed-by: Grant Henke <gr...@apache.org>
---
M src/kudu/clock/test/mini_chronyd.cc
M src/kudu/clock/test/mini_chronyd.h
2 files changed, 13 insertions(+), 5 deletions(-)

Approvals:
  Alexey Serbin: Verified
  Grant Henke: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/14365
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Gerrit-Change-Number: 14365
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: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [mini chronyd] remove cmd socket directory on exit

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14365 )

Change subject: [mini_chronyd] remove cmd socket directory on exit
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14365/2/src/kudu/clock/test/mini_chronyd.cc
File src/kudu/clock/test/mini_chronyd.cc:

http://gerrit.cloudera.org:8080/#/c/14365/2/src/kudu/clock/test/mini_chronyd.cc@399
PS2, Line 399:     RETURN_NOT_OK(Env::Default()->GetTestDirectory(&dir));
> How does this work when a MiniChronyd is started via EMC, as part of the co
It works fine.  I guess it either uses $TEST_TMPDIR or /tmp/kudutest-<uid> location as per code in src/kudu/util/env_posix.cc:

  virtual Status GetTestDirectory(string* result) OVERRIDE {
    string dir;
    const char* env = getenv("TEST_TMPDIR");
    if (env && env[0] != '\0') {
      dir = env;
    } else {
      char buf[100];
      snprintf(buf, sizeof(buf), "/tmp/kudutest-%d", static_cast<int>(geteuid()));
      dir = buf;
    }
    // Directory may already exist
    ignore_result(CreateDir(dir));
    // /tmp may be a symlink, so canonicalize the path.
    return Canonicalize(dir, result);
  }

I guess there might be some issues if calling GetTestDataDirectory(), but that's other story: when running MiniChronyd from within control shell, data_root for cluster is set explicitly (see 493eb10ec for details).



-- 
To view, visit http://gerrit.cloudera.org:8080/14365
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Gerrit-Change-Number: 14365
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: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Fri, 04 Oct 2019 22:10:48 +0000
Gerrit-HasComments: Yes

[kudu-CR] [mini chronyd] remove cmd socket directory on exit

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14365 )

Change subject: [mini_chronyd] remove cmd socket directory on exit
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14365/2/src/kudu/clock/test/mini_chronyd.cc
File src/kudu/clock/test/mini_chronyd.cc:

http://gerrit.cloudera.org:8080/#/c/14365/2/src/kudu/clock/test/mini_chronyd.cc@399
PS2, Line 399:     RETURN_NOT_OK(Env::Default()->GetTestDirectory(&dir));
> It works fine.  I guess it either uses $TEST_TMPDIR or /tmp/kudutest-<uid> 
Maybe we should piggy-back on MiniChronyd's options.data_root? Otherwise there's a chance that the control shell's cleanup won't capture this?



-- 
To view, visit http://gerrit.cloudera.org:8080/14365
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Gerrit-Change-Number: 14365
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: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sat, 05 Oct 2019 01:04:38 +0000
Gerrit-HasComments: Yes

[kudu-CR] [mini chronyd] remove cmd socket directory on exit

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14365 )

Change subject: [mini_chronyd] remove cmd socket directory on exit
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14365/2/src/kudu/clock/test/mini_chronyd.cc
File src/kudu/clock/test/mini_chronyd.cc:

http://gerrit.cloudera.org:8080/#/c/14365/2/src/kudu/clock/test/mini_chronyd.cc@399
PS2, Line 399:     RETURN_NOT_OK(Env::Default()->GetTestDirectory(&dir));
> Maybe we should piggy-back on MiniChronyd's options.data_root? Otherwise th
This is cleaned up by MiniChronyd itself (see d41293969d4cd908b7b030ac8a136fb457b50037).

The whole premise of having this custom path not under options.data_root is because options.data_root is a pretty long path name, but there is a strict requirement on the path to Unix domain sockets: it cannot be longer than 100+ bytes.



-- 
To view, visit http://gerrit.cloudera.org:8080/14365
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Gerrit-Change-Number: 14365
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: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sat, 05 Oct 2019 03:36:56 +0000
Gerrit-HasComments: Yes

[kudu-CR] [mini chronyd] remove cmd socket directory on exit

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14365 )

Change subject: [mini_chronyd] remove cmd socket directory on exit
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14365/2/src/kudu/clock/test/mini_chronyd.cc
File src/kudu/clock/test/mini_chronyd.cc:

http://gerrit.cloudera.org:8080/#/c/14365/2/src/kudu/clock/test/mini_chronyd.cc@399
PS2, Line 399:     RETURN_NOT_OK(Env::Default()->GetTestDirectory(&dir));
How does this work when a MiniChronyd is started via EMC, as part of the control sell (i.e. tool_action_test.cc)? Or is that never exercised?



-- 
To view, visit http://gerrit.cloudera.org:8080/14365
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Gerrit-Change-Number: 14365
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: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Fri, 04 Oct 2019 21:45:20 +0000
Gerrit-HasComments: Yes

[kudu-CR] [mini chronyd] remove cmd socket directory on exit

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/14365 )

Change subject: [mini_chronyd] remove cmd socket directory on exit
......................................................................


Patch Set 1: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/14365
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Gerrit-Change-Number: 14365
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: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Fri, 04 Oct 2019 16:46:07 +0000
Gerrit-HasComments: No

[kudu-CR] [mini chronyd] remove cmd socket directory on exit

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14365 )

Change subject: [mini_chronyd] remove cmd socket directory on exit
......................................................................


Patch Set 1: Verified+1

Unrelated test failures:
  * TsTabletManagerITest.TestTableStats


-- 
To view, visit http://gerrit.cloudera.org:8080/14365
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Gerrit-Change-Number: 14365
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Fri, 04 Oct 2019 00:17:27 +0000
Gerrit-HasComments: No

[kudu-CR] [mini chronyd] remove cmd socket directory on exit

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed a vote on this change.

Change subject: [mini_chronyd] remove cmd socket directory on exit
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/14365
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Gerrit-Change-Number: 14365
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [mini chronyd] remove cmd socket directory on exit

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14365 )

Change subject: [mini_chronyd] remove cmd socket directory on exit
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14365/2/src/kudu/clock/test/mini_chronyd.cc
File src/kudu/clock/test/mini_chronyd.cc:

http://gerrit.cloudera.org:8080/#/c/14365/2/src/kudu/clock/test/mini_chronyd.cc@399
PS2, Line 399:     RETURN_NOT_OK(Env::Default()->GetTestDirectory(&dir));
> This is cleaned up by MiniChronyd itself (see d41293969d4cd908b7b030ac8a136
Ah, right. I forgot about that.



-- 
To view, visit http://gerrit.cloudera.org:8080/14365
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2139857f6312fab0839cf23a6c66b3448c632791
Gerrit-Change-Number: 14365
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: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sat, 05 Oct 2019 04:15:41 +0000
Gerrit-HasComments: Yes