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

Fix missing "tmp_path" in tiflash configuration make cluster_manager can not start #4106

Merged
merged 2 commits into from
Feb 24, 2022

Conversation

JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Feb 23, 2022

What problem does this PR solve?

Issue Number: close #4091

Problem Summary:

Without "tmp_path" in the config.toml, the cluster_manager.py fail to start itself without any error message in the logging files

[root@main-cluster-tiflash-2 root]# /tiflash/flash_cluster_manager/flash_cluster_manager --config /data0/config.toml
Traceback (most recent call last):
  File "flash_cluster_manager.py", line 8, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "PyInstaller/loader/pyimod03_importers.py", line 531, in exec_module
  File "conf.py", line 23, in <module>
  File "flash_tools.py", line 17, in __init__
KeyError: 'tmp_path'

https://github.com/pingcap/tics/blob/release-5.4/cluster_manage/flash_tools.py#L17

What is changed and how it works?

Only get "tmp_path" when we actually need it, and give it a default value if not exist

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Feb 23, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • CalvinNeo

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. needs-cherry-pick-release-4.0 PR which needs to be cherry-picked to release-4.0 needs-cherry-pick-release-5.0 PR which needs to be cherry-picked to release-5.0 needs-cherry-pick-release-5.1 PR which needs to be cherry-picked to release-5.1 needs-cherry-pick-release-5.2 PR which needs to be cherry-picked to release-5.2 needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 23, 2022
@JaySon-Huang
Copy link
Contributor Author

@CalvinNeo PTAL

Copy link
Member

@CalvinNeo CalvinNeo left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 23, 2022
@JaySon-Huang
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 2b22876

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 24, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented Feb 24, 2022

Coverage for changed files

no c/c++ source change detected

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16674      9492             43.07%    184392  95895        47.99%

full coverage report (for internal network access only)

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #4121.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #4122.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #4123.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #4124.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #4125.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #4126.

@JaySon-Huang JaySon-Huang deleted the fix_cm_log_path branch February 24, 2022 03:43
ti-chi-bot added a commit that referenced this pull request Apr 14, 2022
ti-chi-bot added a commit that referenced this pull request Apr 26, 2022
ti-chi-bot added a commit that referenced this pull request Jun 15, 2022
ti-chi-bot added a commit that referenced this pull request Jun 15, 2022
ti-chi-bot added a commit that referenced this pull request Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-4.0 PR which needs to be cherry-picked to release-4.0 needs-cherry-pick-release-5.0 PR which needs to be cherry-picked to release-5.0 needs-cherry-pick-release-5.1 PR which needs to be cherry-picked to release-5.1 needs-cherry-pick-release-5.2 PR which needs to be cherry-picked to release-5.2 needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClusterManager fail to start without "tmp_path"
4 participants