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

pdms(playground, cluster): add name to start pdms #2438

Merged
merged 4 commits into from
Jul 25, 2024

Conversation

HuSharp
Copy link
Contributor

@HuSharp HuSharp commented Jul 12, 2024

What problem does this PR solve?

Ref #8157

What is changed and how it works?

after tikv/pd#8157, we can start PDms with name.
But startup previous pd which support ms before 8.3.0 will failure because of unkown flag
img_v3_02cm_72c1d9cf-37ae-4b94-9399-ea4c42e450eg

for 8.2.0

$ cat tidb-deploy/tso-3379/scripts/run_tso.sh
#!/bin/bash
set -e

# WARNING: This file was auto-generated. Do not edit!
#          All your edit might be overwritten!
DEPLOY_DIR=/root/husharp/tidb-deploy/tso-3379

cd "${DEPLOY_DIR}" || exit 1
exec env GODEBUG=madvdontneed=1 bin/pd-server services tso \
    --backend-endpoints="http://10.2.7.79:2379" \
    --listen-addr="http://10.2.7.79:3379" \
    --advertise-listen-addr="http://10.2.7.79:3379" \
    --config=conf/tso.toml \
    --log-file="/root/husharp/tidb-deploy/tso-3379/log/tso.log" 2>> "/root/husharp/tidb-deploy/tso-3379/log/tso_stderr.log"

after ./tiup-cluster upgrade tidb-test v8.2.0 --tso-version v8.3.0 and with

tso_servers:
  - host:  10.2.7.79
    port: 3379
    name: "tso-0"

we can cat tidb-deploy/tso-3379/scripts

$ cat tidb-deploy/tso-3379/scripts/run_tso.sh
#!/bin/bash
set -e

# WARNING: This file was auto-generated. Do not edit!
#          All your edit might be overwritten!
DEPLOY_DIR=/root/husharp/tidb-deploy/tso-3379

cd "${DEPLOY_DIR}" || exit 1
exec env GODEBUG=madvdontneed=1 bin/pd-server services tso \
    --name="tso-0" \
    --backend-endpoints="http://10.2.7.79:2379" \
    --listen-addr="http://10.2.7.79:3379" \
    --advertise-listen-addr="http://10.2.7.79:3379" \
    --config=conf/tso.toml \
    --log-file="/root/husharp/tidb-deploy/tso-3379/log/tso.log" 2>> "/root/husharp/tidb-deploy/tso-3379/log/tso_stderr.log"

We need to keep compatible by changing pdms script

Check List

Tests

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

Release notes:

NONE

@ti-chi-bot ti-chi-bot bot requested review from kaaaaaaang and srstack July 12, 2024 01:26
@ti-chi-bot ti-chi-bot bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 12, 2024
Signed-off-by: husharp <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 12, 2024
Signed-off-by: husharp <[email protected]>
@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 12, 2024

PTAL, thx! @kaaaaaaang @rleungx

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 15, 2024
Signed-off-by: husharp <[email protected]>
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 25, 2024
@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 25, 2024

@kaaaaaaang @rleungx friendly ping :)

@HuSharp
Copy link
Contributor Author

HuSharp commented Jul 25, 2024

@xhebox can you take a look at this pr? thx~ :)

@ti-chi-bot ti-chi-bot bot added the lgtm label Jul 25, 2024
@xhebox
Copy link
Collaborator

xhebox commented Jul 25, 2024

/approve

Copy link
Contributor

ti-chi-bot bot commented Jul 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xhebox

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 ti-chi-bot bot added the approved label Jul 25, 2024
@ti-chi-bot ti-chi-bot bot removed the lgtm label Jul 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 25, 2024

@HuSharp: Your PR was out of date, I have automatically updated it for you.

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.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 43 lines in your changes missing coverage. Please review.

Project coverage is 48.72%. Comparing base (c3b91fe) to head (20a9171).
Report is 2 commits behind head on master.

Current head 20a9171 differs from pull request most recent head 9b8c180

Please upload reports for the commit 9b8c180 to get more accurate results.

Files Patch % Lines
pkg/cluster/spec/validate.go 0.00% 24 Missing ⚠️
pkg/cluster/spec/spec.go 0.00% 9 Missing ⚠️
pkg/cluster/spec/scheduling.go 0.00% 4 Missing ⚠️
pkg/cluster/spec/tso.go 0.00% 4 Missing ⚠️
pkg/tidbver/tidbver.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2438      +/-   ##
==========================================
- Coverage   50.23%   48.72%   -1.51%     
==========================================
  Files         333      333              
  Lines       35896    35966      +70     
==========================================
- Hits        18032    17524     -508     
- Misses      15503    16143     +640     
+ Partials     2361     2299      -62     
Flag Coverage Δ
dm 18.52% <0.00%> (-6.49%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xhebox
Copy link
Collaborator

xhebox commented Jul 25, 2024

/lgtm

@ti-chi-bot ti-chi-bot bot added the lgtm label Jul 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-25 08:56:13.241480315 +0000 UTC m=+1121795.232421784: ☑️ agreed by xhebox.
  • 2024-07-25 08:56:47.729171913 +0000 UTC m=+1121829.720113380: ✖️🔁 reset by ti-chi-bot[bot].
  • 2024-07-25 14:50:52.999027602 +0000 UTC m=+1143074.989969072: ☑️ agreed by xhebox.

@ti-chi-bot ti-chi-bot bot merged commit 9c5ad9a into pingcap:master Jul 25, 2024
20 checks passed
@HuSharp HuSharp deleted the add_name_to_pdms branch July 25, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants