Skip to content
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

replicaset: soften name validation #458

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

Serpentian
Copy link
Contributor

During upgrade to Tarantool 3.0.0 there's a time, when instance name have not been set yet. If vshard strictly validates names on connection, it leads to the cluster unavailability by the time, when all names are configured.

This commit softens the check and allows name to be nil, when instance UUID is specified in configuration, only UUID is validated in such case.

In conclusion we have the following checks on connection:

1. UUID is validated in the following cases:
    a. When `identification_mode` is `uuid_as_key`
    b. When `identification_mode` is `name_as_key` and replica.uuid
       is specified

2. Instance name is validated only when `identification_mode` is
   `name_as_key` and can work in the following modes:
    a. Strict validation (nil instance name is not allowed), when
       replica.uuid is not specified.
    b. Soft validation (nil instance name is allowed), when
       replica.uuid is specified.

Follow-up #426

NO_DOC=internal

During upgrade to Tarantool 3.0.0 there's a time, when instance name
have not been set yet. If vshard strictly validates names on connection,
it leads to the cluster unavailability by the time, when all names are
configured.

This commit softens the check and allows name to be nil, when instance
UUID is specified in configuration, only UUID is validated in such case.

In conclusion we have the following checks on connection:

    1. UUID is validated in the following cases:
        a. When `identification_mode` is `uuid_as_key`
        b. When `identification_mode` is `name_as_key` and replica.uuid
           is specified

    2. Instance name is validated only when `identification_mode` is
       `name_as_key` and can work in the following modes:
        a. Strict validation (nil instance name is not allowed), when
           replica.uuid is not specified.
        b. Soft validation (nil instance name is allowed), when
           replica.uuid is specified.

Follow-up tarantool#426

NO_DOC=internal
Copy link
Collaborator

@Gerold103 Gerold103 left a comment

Choose a reason for hiding this comment

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

Thanks for the patch!

@Gerold103 Gerold103 merged commit aa87ac9 into tarantool:master Dec 20, 2023
8 checks passed
Serpentian added a commit to Serpentian/tarantool that referenced this pull request Dec 21, 2023
This commit adds a test, that covers the integration of tarantool's
config module with vshard and verifies correctness of changes in tarantool#9514
and tarantool/vshard#458. It checks, that we're able to upgrade several
vshard clusters without downtime.

NO_DOC=test
NO_CHANGELOG=test
Serpentian added a commit to Serpentian/tarantool that referenced this pull request Dec 21, 2023
This commit adds a test, that covers the integration of tarantool's
config module with vshard and verifies correctness of changes in tarantool#9514
and tarantool/vshard#458. It checks, that we're able to upgrade several
vshard clusters without downtime.

NO_DOC=test
NO_CHANGELOG=test
Serpentian added a commit to Serpentian/tarantool that referenced this pull request Dec 26, 2023
This commit adds a test, that covers the integration of tarantool's
config module with vshard and verifies correctness of changes in tarantool#9514
and tarantool/vshard#458. It checks, that we're able to upgrade several
vshard clusters without downtime.

NO_DOC=test
NO_CHANGELOG=test
Serpentian added a commit to Serpentian/tarantool that referenced this pull request Feb 2, 2024
This commit adds a test, that covers the integration of tarantool's
config module with vshard and verifies correctness of changes in tarantool#9514
and tarantool/vshard#458. It checks, that we're able to upgrade several
vshard clusters without downtime.

NO_DOC=test
NO_CHANGELOG=test
Serpentian added a commit to Serpentian/tarantool that referenced this pull request Feb 2, 2024
This commit adds a test, that covers the integration of tarantool's
config module with vshard and verifies correctness of changes in tarantool#9514
and tarantool/vshard#458. It checks, that we're able to upgrade several
vshard clusters without downtime.

NO_DOC=test
NO_CHANGELOG=test
Serpentian added a commit to Serpentian/tarantool that referenced this pull request Feb 2, 2024
This commit adds a test, that covers the integration of tarantool's
config module with vshard and verifies correctness of changes in tarantool#9514
and tarantool/vshard#458. It checks, that we're able to upgrade several
vshard clusters without downtime.

NO_DOC=test
NO_CHANGELOG=test
Serpentian added a commit to Serpentian/tarantool that referenced this pull request Feb 2, 2024
This commit adds a test, that covers the integration of tarantool's
config module with vshard and verifies correctness of changes in tarantool#9514
and tarantool/vshard#458. It checks, that we're able to upgrade several
vshard clusters without downtime.

NO_DOC=test
NO_CHANGELOG=test
Totktonada pushed a commit to tarantool/tarantool that referenced this pull request Feb 6, 2024
This commit adds a test, that covers the integration of tarantool's
config module with vshard and verifies correctness of changes in #9514
and tarantool/vshard#458. It checks, that we're able to upgrade several
vshard clusters without downtime.

NO_DOC=test
NO_CHANGELOG=test
Totktonada pushed a commit to Totktonada/tarantool that referenced this pull request Feb 6, 2024
This commit adds a test, that covers the integration of tarantool's
config module with vshard and verifies correctness of changes in tarantool#9514
and tarantool/vshard#458. It checks, that we're able to upgrade several
vshard clusters without downtime.

NO_DOC=test
NO_CHANGELOG=test

(cherry picked from commit 9e9ea6d)
Totktonada pushed a commit to tarantool/tarantool that referenced this pull request Feb 7, 2024
This commit adds a test, that covers the integration of tarantool's
config module with vshard and verifies correctness of changes in #9514
and tarantool/vshard#458. It checks, that we're able to upgrade several
vshard clusters without downtime.

NO_DOC=test
NO_CHANGELOG=test

(cherry picked from commit 9e9ea6d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants