Skip to content

Fix TiUP deployment doc inconsistencies - #24451

Open
doc-claw-bot wants to merge 1 commit into
pingcap:masterfrom
doc-claw-bot:docs/fix-tiup-deployment-inconsistencies
Open

doc-claw-bot wants to merge 1 commit into
pingcap:masterfrom
doc-claw-bot:docs/fix-tiup-deployment-inconsistencies

Conversation

@doc-claw-bot

@doc-claw-bot doc-claw-bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

What is changed, added, or deleted? (Required)

Fix four deployment-doc inconsistencies in the TiDB Self-Managed guides:

  • clarify the difference between disabling swap and lowering swap priority, and remove the command sequence that re-enabled swap immediately
  • replace the stale v6.1.0 NUMA deployment example with the version placeholder v{{{ .tidb-version }}}
  • correct the topology section count from six scenarios to five
  • document that clusters started with tiup cluster start --init require -p when logging in as root

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.

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)

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

AI agent involvement

  • The changes in this PR were primarily made by an AI agent on behalf of the PR author.

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

Summary by CodeRabbit

  • Documentation
    • Updated swap guidance to disable swap immediately and across reboots, while retaining separate advice for low-memory systems.
    • Updated the TiUP deployment example to use the templated TiDB version.
    • Added a database login command for clusters initialized with --init, including guidance to enter the generated password.
    • Corrected the production deployment guide to refer to five common deployment scenarios.

@ti-chi-bot

ti-chi-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign icemap for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

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

Details 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 ti-chi-bot Bot added contribution This PR is from a community contributor. missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Walkthrough

The documentation changes update swap-disabling steps, a TiUP version example, post-installation login commands, and the stated number of common deployment scenarios.

Changes: Deployment documentation

Layer / File(s) Summary
Deployment guidance
check-before-deployment.md, production-deployment-using-tiup.md
The swap guidance now describes disabling active swap and removing or commenting out its /etc/fstab entry. The TiUP example uses the .tidb-version template, and the scenario count changes from six to five.
Post-installation login
post-installation-check.md
The instructions add a login command with -p for clusters started with --init.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: 🔵 Low · up to 9146c

Swap may remain enabled after reboot for a narrow class of supported hosts; update the deployment guidance before or shortly after merge.

### Architecture Summary

Architecture risk: 🔵 Low · up to 9146c

The change affects 3 systems.

Changed systems: check-before-deployment.md, post-installation-check.md, production-deployment-using-tiup.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — check-before-deployment.md (service) was modified; 1 changed file maps to changed impact.
  • observed — post-installation-check.md (service) was modified; 1 changed file maps to changed impact.
  • observed — production-deployment-using-tiup.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in check-before-deployment.md: The swap instructions now use swapoff -a to disable active swap and remove or comment out the /etc/fstab swap entry to keep it disabled after reboot. The previous permanent-disable procedure that set vm.swappiness = 0 and ran swapoff -a && swapon -a was removed; the separate low-memory swap-priority guidance remains unchanged.
  • observed — Modified behavior in check-before-deployment.md: The TiUP deployment example replaces the fixed v6.1.0 version with the .tidb-version template.
  • observed — Modified behavior in post-installation-check.md: Added conditional login instructions: when the cluster was started with --init, use the -p option and enter the generated password.
  • observed — Modified behavior in production-deployment-using-tiup.md: The introduction now says the examples cover five common scenarios instead of six.
Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly summarizes the main change: fixing inconsistencies in TiUP deployment documentation.
Description check Passed The description follows the required template, explains all documentation changes, identifies affected versions, provides a reference link, and completes the applicable checkboxes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@doc-claw-bot doc-claw-bot added type/bugfix This PR fixes a bug. area/tiup Indicates that the Issue or PR belongs to the area of the TiUP tool. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed missing-translation-status This PR does not have translation status info. labels Oct 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: pingcap/docs/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: aaf2cebe-2c1c-4fb6-98eb-029d69f4b9cb
📥 Commits

Reviewing files that changed from the base of the PR and between a0a22ca and 9146c06.

📒 Files selected for processing: 3
  • check-before-deployment.md
  • post-installation-check.md
  • production-deployment-using-tiup.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

swapoff -a
```

- To keep swap disabled after a reboot, remove or comment out the corresponding swap entry in `/etc/fstab`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

set -o pipefail
printf '%s\n' '--- PR diff for target file ---'
git diff --no-ext-diff --unified=30 f515483d161b557aabede94f1e3fd784bcd69d78 9146c0654bdc363b9ea398b64e051da731ed2c1b -- check-before-deployment.md
printf '%s\n' '--- current file: swap section ---'
nl -ba check-before-deployment.md | sed -n '90,135p'
printf '%s\n' '--- deployment host/platform references ---'
rg -n -i -F --glob '*.md' -e 'supported operating system' -e 'operating system' -e 'Ubuntu' -e 'CentOS' -e 'RHEL' -e 'systemd' -e 'GPT' -e 'swap' -- . | sed -n '1,240p'

Repository: pingcap/docs

Length of output: 41432


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- target metadata and links ---'
sed -n '1,45p' check-before-deployment.md
rg -n -F --glob '*.md' -e 'OS and platform requirements' -e 'Operating system and platform' -e 'systemd' -e 'GPT' hardware-and-software-requirements.md production-deployment-using-tiup.md faq/deploy-and-maintain-faq.md check-before-deployment.md || test "$?" -eq 1
printf '%s\n' '--- supported OS requirements ---'
nl -ba hardware-and-software-requirements.md | sed -n '1,180p'
printf '%s\n' '--- TiUP deployment prerequisites and service manager references ---'
nl -ba production-deployment-using-tiup.md | sed -n '1,180p'

Repository: pingcap/docs

Length of output: 21101


🌐 Web query:

systemd-gpt-auto-generator swap partition GPT type fstab official documentation

💡 Result:

**Yes—systemd can activate a GPT swap partition without an `/etc/fstab` entry.** `systemd-gpt-auto-generator` discovers swap partitions with GPT type GUID `0657fd6d-a4ab-43c4-84e5-0933c84b4f4f` (`SD_GPT_SWAP`), provided they’re on the same physical disk as the root partition. ([manpages.debian.org](https://manpages.debian.org/unstable/systemd/systemd-gpt-auto-generator.8.en.html))

The generator is enabled by default. An `/etc/fstab` swap entry is also supported, but the fstab generator handles that separately; GPT discovery is intended to make fstab configuration unnecessary. ([manpages.debian.org](https://manpages.debian.org/unstable/systemd/systemd-gpt-auto-generator.8.en.html))

Citations:

- 1: https://manpages.debian.org/unstable/systemd/systemd-gpt-auto-generator.8.en.html
- 2: https://manpages.debian.org/unstable/systemd/systemd-gpt-auto-generator.8.en.html

Cover GPT-discovered swap partitions.

On supported Linux hosts that use systemd-gpt-auto-generator, a GPT-typed swap partition on the root disk can be activated without an /etc/fstab entry. Removing or commenting out that entry may therefore not keep swap disabled after reboot.

Document the supported method to disable automatic activation for GPT-discovered swap partitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tiup Indicates that the Issue or PR belongs to the area of the TiUP tool. contribution This PR is from a community contributor. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. type/bugfix This PR fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant