docs icon indicating copy to clipboard operation
docs copied to clipboard

Document pre/post upgrade and reload scripts

Open dveeden opened this issue 1 year ago • 3 comments

What is changed, added or deleted? (Required)

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • [x] master (the latest development version)
  • [x] v8.2 (TiDB 8.2 versions)
  • [x] v8.1 (TiDB 8.1 versions)
  • [x] v8.0 (TiDB 8.0 versions)
  • [ ] v7.6 (TiDB 7.6 versions)
  • [ ] v7.5 (TiDB 7.5 versions)
  • [ ] v7.1 (TiDB 7.1 versions)
  • [ ] v6.5 (TiDB 6.5 versions)
  • [ ] v6.1 (TiDB 6.1 versions)
  • [ ] v5.4 (TiDB 5.4 versions)
  • [ ] v5.3 (TiDB 5.3 versions)
  • [ ] v5.2 (TiDB 5.2 versions)
  • [ ] v5.1 (TiDB 5.1 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

https://github.com/pingcap/tiup/pull/2130

Do your changes match any of the following descriptions?

  • [ ] Delete files
  • [ ] Change aliases
  • [ ] Need modification after applied to another branch
  • [ ] Might cause conflicts after applied to another branch

dveeden avatar May 23 '24 14:05 dveeden

@kaaaaaaang: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

ti-chi-bot[bot] avatar May 27 '24 06:05 ti-chi-bot[bot]

The option is set here: https://github.com/pingcap/tiup/blob/e543145831d44a863366ff8c379d25980730bbd1/components/cluster/command/reload.go#L58-L59

And here: https://github.com/pingcap/tiup/blob/e543145831d44a863366ff8c379d25980730bbd1/components/cluster/command/upgrade.go#L76-L77

And executed/used here: https://github.com/pingcap/tiup/blob/e543145831d44a863366ff8c379d25980730bbd1/pkg/cluster/operation/upgrade.go#L245

And here: https://github.com/pingcap/tiup/blob/e543145831d44a863366ff8c379d25980730bbd1/pkg/cluster/operation/upgrade.go#L268

dveeden avatar Jul 05 '24 10:07 dveeden

From the help info:

$ tiup cluster reload --help
Checking updates for component cluster... Timedout (after 2s)
Reload a TiDB cluster's config and restart if needed

Usage:
  tiup cluster reload <cluster-name> [flags]

Flags:
      --force                        Force reload without transferring PD leader and ignore remote error
  -h, --help                         help for reload
      --ignore-config-check          Ignore the config check result
  -N, --node strings                 Only reload specified nodes
      --post-restart-script string   (EXPERIMENTAL) Custom script to be executed on each server after the service is restarted, does not take effect when --skip-restart is set to true
      --pre-restart-script string    (EXPERIMENTAL) Custom script to be executed on each server before the service is restarted, does not take effect when --skip-restart is set to true
  -R, --role strings                 Only reload specified roles
      --skip-restart                 Only refresh configuration to remote and do not restart services
      --transfer-timeout uint        Timeout in seconds when transferring PD and TiKV store leaders, also for TiCDC drain one capture (default 600)

Global Flags:
  -c, --concurrency int     max number of parallel tasks allowed (default 5)
      --format string       (EXPERIMENTAL) The format of output, available values are [default, json] (default "default")
      --ssh string          (EXPERIMENTAL) The executor type: 'builtin', 'system', 'none'.
      --ssh-timeout uint    Timeout in seconds to connect host via SSH, ignored for operations that don't need an SSH connection. (default 5)
      --wait-timeout uint   Timeout in seconds to wait for an operation to complete, ignored for operations that don't fit. (default 120)
  -y, --yes                 Skip all confirmations and assumes 'yes'

--post-restart-script string: "(EXPERIMENTAL) Custom script to be executed on each server after the service is restarted, does not take effect when --skip-restart is set to true"

--pre-restart-script string: "(EXPERIMENTAL) Custom script to be executed on each server before the service is restarted, does not take effect when --skip-restart is set to true"

dveeden avatar Jul 05 '24 10:07 dveeden

[LGTM Timeline notifier]

Timeline:

  • 2024-06-17 08:22:52.201851011 +0000 UTC m=+16698.687339843: :ballot_box_with_check: agreed by qiancai.
  • 2024-07-16 11:14:01.108037501 +0000 UTC m=+352463.098978974: :ballot_box_with_check: agreed by hfxsd.

ti-chi-bot[bot] avatar Jul 16 '24 11:07 ti-chi-bot[bot]

/approve

qiancai avatar Jul 23 '24 10:07 qiancai

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiancai

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

ti-chi-bot[bot] avatar Jul 23 '24 10:07 ti-chi-bot[bot]

In response to a cherrypick label: new pull request created to branch release-8.1: #18336.

ti-chi-bot avatar Jul 23 '24 10:07 ti-chi-bot

In response to a cherrypick label: new pull request created to branch release-8.2: #18337.

ti-chi-bot avatar Jul 23 '24 10:07 ti-chi-bot

In response to a cherrypick label: new pull request created to branch release-8.0: #18338.

ti-chi-bot avatar Jul 23 '24 10:07 ti-chi-bot