Skip to content

Add config node init command #14869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 21, 2025

Conversation

mregrock
Copy link
Collaborator

Changelog entry

Add config node init command

Changelog category

  • New feature

Description for reviewers

...

@mregrock mregrock requested a review from a team as a code owner February 20, 2025 22:52
Copy link

🟢 2025-02-20 22:53:51 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented Feb 20, 2025

2025-02-20 22:56:11 UTC Pre-commit check linux-x86_64-relwithdebinfo for 1618de0 has started.
2025-02-20 22:56:22 UTC Artifacts will be uploaded here
2025-02-20 22:58:46 UTC ya make is running...
🟢 2025-02-20 23:20:01 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1046 1030 0 0 10 6

🟢 2025-02-20 23:20:12 UTC Build successful.
🟢 2025-02-20 23:20:22 UTC ydbd size 2.1 GiB changed* by 0 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 555fbb8 merge: 1618de0 diff diff %
ydbd size 2 240 049 416 Bytes 2 240 049 416 Bytes 0 Bytes 0.000%
ydbd stripped size 474 639 512 Bytes 474 639 512 Bytes 0 Bytes 0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Feb 20, 2025

2025-02-20 22:56:31 UTC Pre-commit check linux-x86_64-release-asan for 1618de0 has started.
2025-02-20 22:56:44 UTC Artifacts will be uploaded here
2025-02-20 22:59:06 UTC ya make is running...
🟢 2025-02-20 23:11:47 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
630 614 0 0 10 6

🟢 2025-02-20 23:11:56 UTC Build successful.
🟢 2025-02-20 23:12:08 UTC ydbd size 3.6 GiB changed* by -96 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 555fbb8 merge: 1618de0 diff diff %
ydbd size 3 896 864 936 Bytes 3 896 864 840 Bytes -96 Bytes -0.000%
ydbd stripped size 1 364 380 864 Bytes 1 364 380 800 Bytes -64 Bytes -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@mregrock mregrock enabled auto-merge (squash) February 21, 2025 05:09
Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 06:08:42 UTC Pre-commit check linux-x86_64-release-asan for 79103ef has started.
2025-02-21 06:08:46 UTC Artifacts will be uploaded here
2025-02-21 06:10:15 UTC Check cancelled

Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 06:09:08 UTC Pre-commit check linux-x86_64-relwithdebinfo for 79103ef has started.
2025-02-21 06:09:12 UTC Artifacts will be uploaded here
2025-02-21 06:10:16 UTC Check cancelled

Enjection
Enjection previously approved these changes Feb 21, 2025
Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 06:11:41 UTC Pre-commit check linux-x86_64-relwithdebinfo for 81b862f has started.
2025-02-21 06:11:45 UTC Artifacts will be uploaded here
2025-02-21 06:14:11 UTC ya make is running...
🟢 2025-02-21 06:41:47 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1046 1034 0 0 5 7

🟢 2025-02-21 06:41:58 UTC Build successful.
🟢 2025-02-21 06:42:11 UTC ydbd size 2.1 GiB changed* by +57.7 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 555fbb8 merge: 81b862f diff diff %
ydbd size 2 240 049 416 Bytes 2 240 108 520 Bytes +57.7 KiB +0.003%
ydbd stripped size 474 639 512 Bytes 474 630 424 Bytes -8.9 KiB -0.002%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 06:12:10 UTC Pre-commit check linux-x86_64-release-asan for 81b862f has started.
2025-02-21 06:12:41 UTC Artifacts will be uploaded here
2025-02-21 06:15:42 UTC ya make is running...
🟢 2025-02-21 06:40:26 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
630 616 0 0 8 6

🟢 2025-02-21 06:40:35 UTC Build successful.
🟢 2025-02-21 06:40:52 UTC ydbd size 3.6 GiB changed* by +57.9 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 555fbb8 merge: 81b862f diff diff %
ydbd size 3 896 864 936 Bytes 3 896 924 192 Bytes +57.9 KiB +0.002%
ydbd stripped size 1 364 380 864 Bytes 1 364 345 760 Bytes -34.3 KiB -0.003%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 07:37:30 UTC Pre-commit check linux-x86_64-release-asan for c21d915 has started.
2025-02-21 07:38:24 UTC Artifacts will be uploaded here
2025-02-21 07:40:52 UTC ya make is running...
2025-02-21 07:50:48 UTC Check cancelled

Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 07:38:23 UTC Pre-commit check linux-x86_64-relwithdebinfo for c21d915 has started.
2025-02-21 07:38:27 UTC Artifacts will be uploaded here
2025-02-21 07:40:49 UTC ya make is running...
2025-02-21 07:50:48 UTC Check cancelled

alexvru
alexvru previously approved these changes Feb 21, 2025
Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 07:56:32 UTC Pre-commit check linux-x86_64-release-asan for 77a63bc has started.
2025-02-21 07:56:36 UTC Artifacts will be uploaded here
2025-02-21 07:58:56 UTC ya make is running...
🟢 2025-02-21 08:16:35 UTC ydbd size 3.6 GiB changed* by -3.7 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 555fbb8 merge: 77a63bc diff diff %
ydbd size 3 896 864 936 Bytes 3 896 861 176 Bytes -3.7 KiB -0.000%
ydbd stripped size 1 364 380 864 Bytes 1 364 334 368 Bytes -45.4 KiB -0.003%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2025-02-21 08:16:37 UTC Check cancelled

Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 07:57:11 UTC Pre-commit check linux-x86_64-relwithdebinfo for 77a63bc has started.
2025-02-21 07:57:29 UTC Artifacts will be uploaded here
2025-02-21 07:59:53 UTC ya make is running...
🟢 2025-02-21 08:16:38 UTC ydbd size 2.1 GiB changed* by -38.2 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 3fb5075 merge: 77a63bc diff diff %
ydbd size 2 240 106 584 Bytes 2 240 067 424 Bytes -38.2 KiB -0.002%
ydbd stripped size 474 630 040 Bytes 474 628 760 Bytes -1.2 KiB -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2025-02-21 08:16:40 UTC Check cancelled

Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 08:18:11 UTC Pre-commit check linux-x86_64-release-asan for 123b1ef has started.
2025-02-21 08:18:44 UTC Artifacts will be uploaded here
2025-02-21 08:21:42 UTC ya make is running...
2025-02-21 08:33:32 UTC Check cancelled

Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 08:18:29 UTC Pre-commit check linux-x86_64-relwithdebinfo for 123b1ef has started.
2025-02-21 08:20:28 UTC Artifacts will be uploaded here
2025-02-21 08:23:16 UTC ya make is running...
2025-02-21 08:33:31 UTC Check cancelled

Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 08:35:03 UTC Pre-commit check linux-x86_64-release-asan for dcef918 has started.
2025-02-21 08:35:16 UTC Artifacts will be uploaded here
2025-02-21 08:38:13 UTC ya make is running...
🟡 2025-02-21 09:46:38 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
12134 12051 0 23 23 37

2025-02-21 09:48:00 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-02-21 10:09:44 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
131 (only retried tests) 91 0 0 9 31

🟢 2025-02-21 10:09:51 UTC Build successful.
🟡 2025-02-21 10:10:18 UTC ydbd size 3.6 GiB changed* by +142.4 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: a1750c6 merge: dcef918 diff diff %
ydbd size 3 896 861 272 Bytes 3 897 007 128 Bytes +142.4 KiB +0.004%
ydbd stripped size 1 364 334 432 Bytes 1 364 379 104 Bytes +43.6 KiB +0.003%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Feb 21, 2025

2025-02-21 08:36:36 UTC Pre-commit check linux-x86_64-relwithdebinfo for dcef918 has started.
2025-02-21 08:36:41 UTC Artifacts will be uploaded here
2025-02-21 08:39:39 UTC ya make is running...
🟡 2025-02-21 09:34:59 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
19452 18091 0 5 1216 140

2025-02-21 09:36:50 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-02-21 09:57:16 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
219 (only retried tests) 90 0 0 3 126

🟢 2025-02-21 09:57:23 UTC Build successful.
🟢 2025-02-21 09:57:47 UTC ydbd size 2.1 GiB changed* by +71.2 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: a1750c6 merge: dcef918 diff diff %
ydbd size 2 240 067 424 Bytes 2 240 140 376 Bytes +71.2 KiB +0.003%
ydbd stripped size 474 628 760 Bytes 474 644 504 Bytes +15.4 KiB +0.003%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation


TCommandNodeConfig::TCommandNodeConfig()
: TClientCommandTree("config", {}, "Node-wide configuration")
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{
{

}
Cerr << "Failed to save configs: "
<< (clusterSaved ? "" : "main config ")
<< (storageSaved ? "and " : "storage config")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А что если clusterSaved = false, а storageSaved = true

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Все равно должна выдаваться ошибка. То что там теперь лежит бесполезный файл storage не должно никак повлиять, так как это файлы только для системы

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я про текст ошибки:
"Failed to save configs: main config and "

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Понял, поторопился)

bool clusterSaved = false;
bool storageSaved = false;

if (hasCluster && hasStorage) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

На мой взгляд ниже много boilerplate кода, по куче раз конфиги сохраняем. Лучше в как-то в одном месте сделать, и потом писать вывод на основе того, что пытались сохранить, что получилось сохранить.

Но тут скорее на твое усмотрение и на усмотрение @pnv1

@maximyurchuk maximyurchuk merged commit c43686a into ydb-platform:main Feb 21, 2025
11 of 12 checks passed
lberserq pushed a commit to lberserq/ydb that referenced this pull request Mar 3, 2025
blinkov pushed a commit that referenced this pull request Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants