Skip to content

Add tt [cluster] replicaset promote/demote reference #4194

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
May 21, 2024

Conversation

p7nov
Copy link
Contributor

@p7nov p7nov commented May 16, 2024

Resolves #4088 #4109 #4121

  • tt replicaset reference page:
    • add new sections for promote and demote commands
    • move subsections Authorization and Options to the top level
  • tt cluster reference page:
    • make top-level subsections for each subcommand and reorganize content accordingly
    • add tt cluster replicaset, promote and demote subsections

Deployment: https://docs.d.tarantool.io/en/doc/gh-4088-tt-replicaset-promote/reference/tooling/tt_cli/replicaset/#tt-replicaset-promote

@p7nov p7nov changed the title Add tt replicaset promote reference Add tt replicaset promote/demote reference May 16, 2024
@p7nov p7nov requested a review from askalt May 17, 2024 11:48
@p7nov p7nov changed the title Add tt replicaset promote/demote reference Add tt [cluster] replicaset promote/demote reference May 17, 2024
Copy link

@askalt askalt left a comment

Choose a reason for hiding this comment

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

lgtm

@p7nov p7nov requested a review from andreyaksenov May 21, 2024 04:16
Copy link
Contributor

@andreyaksenov andreyaksenov left a comment

Choose a reason for hiding this comment

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

LGTM, added some minor comments below.

Suggestion: shouldn't we use more consistent names for these topics?
For example:

  • Managing replica sets
  • Managing cluster configurations (or Managing clusters ?)


.. include:: _includes/cartridge_deprecation_note.rst

``tt replicaset promote`` promotes instances in Cartridge clusters the following way:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
``tt replicaset promote`` promotes instances in Cartridge clusters the following way:
``tt replicaset promote`` promotes instances in Cartridge clusters in the following way:

They all apply to both etcd and Tarantool-based storages. The following list
shows these ways ordered by precedence, from highest to lowest:

#. Credentials specified in the storage URI: ``https://username:password@host:port/prefix``:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd use an unordered list here

In this case, the command selects the key for patching automatically. A key's priority
is determined by the detail level of the instance or replicaset configuration stored
under this key. For example, when failover is ``off``, a key with
``instance.database`` options takes precedence over a key with the only ``instance`` field.
Copy link
Contributor

Choose a reason for hiding this comment

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

instance.database options takes

option or take?

Copy link
Contributor Author

@p7nov p7nov May 21, 2024

Choose a reason for hiding this comment

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

subject (a key with "database" options) takes precedence ...

Comment on lines +126 to +127
In the ``election`` failover mode, ``tt replicaset promote`` initiates the new leader
election by calling :ref:`box_ctl-promote` on the specified instance. The
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd added a third list item to the list above to make this info more visible. In this case, a reader gets all the required "concepts" in one place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've separated it because of conceptually different action: in this case, the command doesn't write the cluster config (unlike with failover off or manual). Also, the tt environment doesn't matter in this case (the paragraph above).

$ tt cluster show myapp

.. _tt-cluster-centralized:
.. _tt-cluster-publish-centralized:

Managing configurations in centralized storages
Copy link
Contributor

Choose a reason for hiding this comment

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

Managing configurations in centralized storages

Publishing ?

@p7nov p7nov merged commit 42f3050 into latest May 21, 2024
1 check passed
@p7nov p7nov deleted the gh-4088-tt-replicaset-promote branch May 21, 2024 10:01
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.

tt replicaset promote, tt cluster replicaset promote promotes an instance
3 participants