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

cluster: remove created directories after fio test in tiup cluster check #2511

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

djshow832
Copy link
Contributor

What problem does this PR solve?

Close #2159, #2497
In tiup cluster check topology.yaml --enable-disk=true, the parent directories of tiup-fio-test are created with root but are not removed after the test. The subsequent operations will fail because the directories exist but the user doesn't have permission.

What is changed and how it works?

Before creating tiup-fio-test, check which parent directory doesn't exist and should be removed.
After testing, remove the parent directory.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code
  1. Remove /home/xxx/data and execute tiup cluster check --enable-disk=true. After the test, check that /home/xxx/data is removed.
  2. Create ``/home/xxx/dataand executetiup cluster check --enable-disk=true`. After the test, check that `/home/xxx/data` still exists but it is empty.

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

- Fix that the newly created directory is not removed after `tiup cluster check --enable-disk=true`.

Copy link
Contributor

ti-chi-bot bot commented Feb 18, 2025

[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 xhebox for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 ti-chi-bot bot requested a review from nexustar February 18, 2025 11:19
@ti-chi-bot ti-chi-bot bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 18, 2025
@ti-chi-bot ti-chi-bot bot added the lgtm label Feb 18, 2025
Copy link
Contributor

ti-chi-bot bot commented Feb 18, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-18 12:13:41.040787585 +0000 UTC m=+963463.437009643: ☑️ agreed by xhebox.

@xhebox xhebox merged commit 6552f30 into pingcap:master Feb 18, 2025
19 of 20 checks passed
@djshow832 djshow832 deleted the fix_enable_disk branch February 18, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrong data-dir owner
2 participants