Giter Site home page Giter Site logo

pingcap / tiup Goto Github PK

View Code? Open in Web Editor NEW
400.0 19.0 305.0 13.61 MB

A component manager for TiDB

Home Page: https://tiup.io

License: Apache License 2.0

Makefile 0.42% Go 93.81% Shell 4.05% Dockerfile 0.10% Smarty 1.62%
tidb tidb-components tiup playground cluster

tiup's Introduction

LICENSE Language Go Report Card Coverage Status FOSSA Status

What is TiUP

tiup is a tool to download and install TiDB components.

Documentation

Blog

Installation

curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh

Quick start

Run playground

tiup playground

Install components

tiup install tidb tikv pd

Uninstall components

tiup uninstall tidb tikv pd

Update components

tiup update --all

Usage

After installing tiup, you can use it to install binaries of TiDB components and create clusters.

See our doc for more information on how to use TiUP.

Contributing to TiUP

Contributions of code, tests, docs, and bug reports are welcome! To get started, take a look at our open issues.

For docs on how to build, test, and run TiUP, see our dev docs.

See also the Contribution Guide in PingCAP's community repo.

License

FOSSA Status

tiup's People

Contributors

3aceshowhand avatar astroprofundis avatar baurine avatar birdstorm avatar breezewish avatar c4pt0r avatar dveeden avatar glkappe avatar hundundm avatar iosmanthus avatar jayson-huang avatar jsvisa avatar july2993 avatar kaaaaaaang avatar kanshiori avatar king-dylan avatar lichunzhu avatar liubo0127 avatar lonng avatar lucklove avatar nexustar avatar nrc avatar pingyu avatar qinzuoyan avatar rleungx avatar srstack avatar unbyte avatar xhebox avatar yangkeao avatar zanmato1984 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tiup's Issues

The cluster cannot be shutdown properly when using nohup

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

Execute in terminal

nohup tiup playground nightly >tiup.log 2>&1 &
echo "$\!" >tiup.pid
kill `cat tiup.pid`
  1. What did you expect to see?
Got signal interrupt (Component: tidb ; PID: XXX)
Got signal interrupt (Component: tikv ; PID: XXX)
Got signal interrupt (Component: playground ; PID: XXX)
Got signal interrupt (Component: pd ; PID: XXX)
  1. What did you see instead?

Only the playground was stopped normally. PD stopped unexpectedly, TiDB and TiKV are still running.

Got signal terminated (Component: playground ; PID: XXX)
Error: start `~/.tiup/components/pd/nightly/pd-server` (wd:~/.tiup/data/RvTgZcK/pd-0) failed: exit status 1

They cannot be stopped by tiup clean --all, only by kill <PID>.

  1. What version of TiUP are you using (tiup --version)?
    tiup version v0.0.3 tiup

UCP: Supports transparent transmission of parameters when running components

Description

Supports transparent transmission of parameters when running components.
e.g:

Currently, we want to pass some parameters to the component, we need to use -- to transparent transmission. tiup playground nightly -- --db 3 --pd 3 --kv 4. The ideal approach of running a playground with extras parameters is tiup playground nightly --db 3 --pd 3 --kv 4.

So, we need a mechical to transparent transmission paramaters to component in this sceniaro.

Score

  • 300

Mentor(s)

Contact the mentors: #tidb-challenge-program channel in TiDB Community Slack Workspace

Recommended Skills

  • Golang

check conflict Host in topo

version:
b6509b9

topo.yml:

tidb_servers:
  - host: 172.19.0.101
  - host: 172.19.0.101

pd_servers:
  - host: 172.19.0.102
  - host: 172.19.0.103
  - host: 172.19.0.103

tikv_servers:
  - host: 172.19.0.102
  - host: 172.19.0.103
  - host: 172.19.0.103

deploy cluster
result:

github.com/pingcap-incubator/tiops/pkg/task.Parallel.Execute.func1
	/Users/huangjiahao/go/src/github.com/pingcap-incubator/tiops/pkg/task/task.go:171
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1373
Error: Process exited with status 1
stderr: rm: cannot remove '/home/tidb/deploy/tidb-4000/bin/tidb-v4.0.0-beta.2-linux-amd64.tar.gz': No such file or directory

github.com/pingcap-incubator/tiops/pkg/task.(*CopyComponent).Execute
	/Users/huangjiahao/go/src/github.com/pingcap-incubator/tiops/pkg/task/copy_component.go:57
github.com/pingcap-incubator/tiops/pkg/task.Serial.Execute
	/Users/huangjiahao/go/src/github.com/pingcap-incubator/tiops/pkg/task/task.go:131
github.com/pingcap-incubator/tiops/pkg/task.Parallel.Execute.func1
	/Users/huangjiahao/go/src/github.com/pingcap-incubator/tiops/pkg/task/task.go:171
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1373

Got error when first run tiup playground nigihtly

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    Install tiup
    run tiup playground nightly

  2. What did you expect to see?

Cluster established

  1. What did you see instead?
~ tiup playground nigitlyThe component `playground` doesn't installed, download from repository
download https://tiup-mirrors.pingcap.com/playground-v0.0.5-linux-amd64.tar.gz:5869399 / 5869399 [----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 3111849 p/$
Starting /home/fullstop/.tiup/components/playground/v0.0.5/playground nigitlyError: component `pd` doesn't release the version `nigitly`
Error: exit status 1
Playground bootstrapping failed: exit status 1
Error: start `/home/fullstop/.tiup/components/playground/v0.0.5/playground` (wd:/home/fullstop/.tiup/data/RtBpKiJ) failed: exit status 1
  1. What version of TiUP are you using (tiup --version)?
    0.0.0

By the way, I ran tiup playground nigitly again and it establishes a cluster with no error.

Support custom timeout when evicting leaders

We currently hard code the timeout settings in pdapi, but for some large clusters, the leader transferring process may take far more long time (and that's acceptable for the circumstances).

We need to add support of custom timeout values for those operations. Rolling upgrade is in my mind, but there might be more places.

Feature Request: provide bash/zsh completions

Feature Request

Is your feature request related to a problem? Please describe:
No.

Describe the feature you'd like:
Generate completion files for bash/zsh. It makes much easier with using this cli tool.

Describe alternatives you've considered:
Hands-write a completion script. 🤔

Teachability, Documentation, Adoption, Migration Strategy:
Nothing here. 😁

UCP: Support zsh/bash auto-completion for TiUP

Description

Support zsh/bash auto-completion for TiUP, make the tiup easy to use. We should support component auto-completion if possible.

Score

  • 605

Mentor(s)

Contact the mentors: #tidb-challenge-program channel in TiDB Community Slack Workspace

Recommended Skills

  • Golang

Learning Materials

testing: if `make test` fails, mock directory is not tidied up

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
  • Change a file so that a test fails
  • Run make test
  1. What did you expect to see?
  • Tests fail
  • Project is left unchanged
  1. What did you see instead?
  • Tests fail
  • There are two temporary files left in the mock folder and mock.go has been changed
  1. What version of TiUP are you using (tiup --version)?

master (b66eb8a)

Write to .bashrc if .bash_profile doesn't exist?

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

Ran the tiup installer.

  1. What did you expect to see?

I am not a bash expert, but after running the install the tiup binary was not in my PATH. I debugged it, and it looks like it created+wrote to .bash_profile (which Ubuntu doesn't use).

I thought that it would use .bash_profile if it existed.. but it seems not. So I moved the contents to my .bashrc file and it works reliably. I also tried .profile, but that didn't work.

I am using a pretty much stock Ubuntu 20.04 beta with bash 5.0.16(1)-release.

  1. What did you see instead?
$ tiup

Command 'tiup' not found, did you mean:

  command 'tilp' from deb tilp2 (1.18-3)
  command 'tup' from deb tup (0.7.8-3)

Try: sudo apt install <deb name>
  1. What version of TiUP are you using (tiup --version)?
tiup version v0.0.3 tiup

Cannot run playground nightly command with "--monitor" flag

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

I run

tiup playground nightly --monitor 
  1. What did you expect to see?

The cluster setup.

  1. What did you see instead?
➜  tiup git:(master) ✗ tiup playground nightly --monitor 
Error: unknown flag: --monitor
  1. What version of TiUP are you using (tiup --version)?

tiup version v0.0.2+master(d1a8dad-dirty)

Fail to run `tiup update --all`

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    tiup update --all

  2. What did you expect to see?

Update ok

  1. What did you see instead?
    image

  2. What version of TiUP are you using (tiup --version)?

tiup version v0.0.2+Unknown(Unknown)

Download progress indicator should be human formatted

Feature Request

Is your feature request related to a problem? Please describe:

The progress bars are useful, but on large files it is hard to see the size without formatting. i.e.

download https://tiup-mirrors.pingcap.com/pd-nightly-linux-amd64.tar.gz:
33213324 / 33213324 [-----------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 7776611 p/s

I believe the p/s should also be k/s.

Describe the feature you'd like:

It would be nice if it looked like this instead:

download https://tiup-mirrors.pingcap.com/pd-nightly-linux-amd64.tar.gz:
31.67 M / 31.67 M [-----------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 13.6 M/s

Describe alternatives you've considered:

I use gnome terminal, so I can see the sizes in human format by right clicking on them. But that is a bit of an inconvenience.. and not available to all users.

Teachability, Documentation, Adoption, Migration Strategy:

N/A, cosmetic change.

Scaling out TiKV to deployed machine will get monitor path conflict

Original Topo:

14:03:52  ID                  Role  Host          Ports        Status     Data Dir         Deploy Dir
14:03:52  --                  ----  ----          -----        ------     --------         ----------
14:03:52  172.19.0.102:2379   pd    172.19.0.102  2379/2380    Healthy|L  data/pd-2379     deploy/pd-2379
14:03:52  172.19.0.103:20160  tikv  172.19.0.103  20160/20180  Up         data/tikv-20160  deploy/tikv-20160
14:03:52  172.19.0.101:4000   tidb  172.19.0.101  4000/10080   Up         -                deploy/tidb-4000
14:03:52  172.19.0.104:4000   tidb  172.19.0.104  4000/10080   Up         -                deploy/tidb-4000

Scale out TiKV to 172.19.0.104 will get:

14:03:52  Error: Deploy directory conflicts to an existing cluster (cmd.deploy.dir_conflict)
14:03:52  
14:03:52  The directory you specified in the topology file is:
14:03:52    Directory: monitor deploy directory /home/tidb/deploy/monitor-9100
14:03:52    Component: tikv 172.19.0.104
14:03:52  
14:03:52  It conflicts to a directory in the existing cluster:
14:03:52    Existing Cluster Name: test-cluster
14:03:52    Existing Directory:    monitor deploy directory /home/tidb/deploy/monitor-9100
14:03:52    Existing Component:    tidb 172.19.0.104
14:03:52  
14:03:52  Please change to use another directory or another host.

unknow error log when deploy every time

+ [ Serial ] - EnvInit: user=tidb, host=172.19.0.105
+ [ Serial ] - RootSSH: user=root, host=172.19.0.101, port=22, key=/root/.ssh/id_rsa.pub
+ [ Serial ] - EnvInit: user=tidb, host=172.19.0.101
2020-03-29 03:52:07.476094 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:07.476788 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:07.478195 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:07.826246 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:07.836064 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:07.852511 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:07.937122 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:07.970862 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:08.024777 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:08.033232 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:08.040116 I | getKeyFile error: ssh: no key found
2020-03-29 03:52:08.172155 I | getKeyFile error: ssh: no key found
+ [ Serial ] - UserSSH: user=tidb, host=172.19.0.103

failed to start pd with the host name in topo.yaml

topo.yaml

tidb_servers:
  - host: n1
  - host: n2

pd_servers:
  - host: n3
  - host: n4
  - host: n5

tikv_servers:
  - host: n3
  - host: n4
  - host: n5

run deploy and start, failed to start pd

pd log:

[2020/03/24 16:27:17.759 +00:00] [INFO] [server.go:217] ["PD Config"] [config="{\"client-urls\":\"http://n3:2379\",\"peer-urls\":\"http://n3:2380\",\"advertise-client-urls\":\"http://n3:2379\",\"advertise-peer-urls\":\"http://n3:2380\",\"name\":\"pd-n3\",\"data-dir\":\"/home/tidb/deploy/pd-2379/data\",\"force-new-cluster\":false,\"enable-grpc-gateway\":true,\"initial-cluster\":\"pd-n3=http://n3:2380,pd-n4=http://n4:2380,pd-n5=http://n5:2380\",\"initial-cluster-state\":\"new\",\"join\":\"\",\"lease\":3,\"log\":{\"level\":\"\",\"format\":\"text\",\"disable-timestamp\":false,\"file\":{\"filename\":\"logs/pd.log\",\"max-size\":300,\"max-days\":0,\"max-backups\":0},\"development\":false,\"disable-caller\":false,\"disable-stacktrace\":false,\"disable-error-verbose\":true,\"sampling\":null},\"log-file\":\"\",\"log-level\":\"\",\"tso-save-interval\":\"3s\",\"metric\":{\"job\":\"pd-n3\",\"address\":\"\",\"interval\":\"15s\"},\"schedule\":{\"max-snapshot-count\":3,\"max-pending-peer-count\":16,\"max-merge-region-size\":20,\"max-merge-region-keys\":200000,\"split-merge-interval\":\"1h0m0s\",\"enable-one-way-merge\":\"false\",\"enable-cross-table-merge\":\"false\",\"patrol-region-interval\":\"100ms\",\"max-store-down-time\":\"30m0s\",\"leader-schedule-limit\":4,\"leader-schedule-policy\":\"count\",\"region-schedule-limit\":2048,\"replica-schedule-limit\":64,\"merge-schedule-limit\":8,\"hot-region-schedule-limit\":4,\"hot-region-cache-hits-threshold\":3,\"store-balance-rate\":15,\"tolerant-size-ratio\":0,\"low-space-ratio\":0.8,\"high-space-ratio\":0.6,\"scheduler-max-waiting-operator\":5,\"enable-remove-down-replica\":\"true\",\"enable-replace-offline-replica\":\"true\",\"enable-make-up-replica\":\"true\",\"enable-remove-extra-replica\":\"true\",\"enable-location-replacement\":\"true\",\"enable-debug-metrics\":\"false\",\"schedulers-v2\":[{\"type\":\"balance-region\",\"args\":null,\"disable\":false,\"args-payload\":\"\"},{\"type\":\"balance-leader\",\"args\":null,\"disable\":false,\"args-payload\":\"\"},{\"type\":\"hot-region\",\"args\":null,\"disable\":false,\"args-payload\":\"\"},{\"type\":\"label\",\"args\":null,\"disable\":false,\"args-payload\":\"\"}],\"schedulers-payload\":null,\"store-limit-mode\":\"manual\"},\"replication\":{\"max-replicas\":3,\"location-labels\":\"\",\"strictly-match-label\":\"false\",\"enable-placement-rules\":\"false\"},\"pd-server\":{\"use-region-storage\":\"true\",\"max-reset-ts-gap\":86400000000000,\"key-type\":\"table\",\"runtime-services\":\"\",\"metric-storage\":\"\"},\"cluster-version\":\"0.0.0\",\"quota-backend-bytes\":\"8GiB\",\"auto-compaction-mode\":\"periodic\",\"auto-compaction-retention-v2\":\"1h\",\"TickInterval\":\"500ms\",\"ElectionInterval\":\"3s\",\"PreVote\":true,\"security\":{\"cacert-path\":\"\",\"cert-path\":\"\",\"key-path\":\"\",\"client-cert-auth\":false,\"cert-allowed-cn\":null},\"label-property\":null,\"WarningMsgs\":null,\"DisableStrictReconfigCheck\":false,\"HeartbeatStreamBindInterval\":\"1m0s\",\"LeaderPriorityCheckInterval\":\"1m0s\",\"enable-dynamic-config\":true,\"EnableDashboard\":true}"]
[2020/03/24 16:27:17.780 +00:00] [INFO] [server.go:190] ["register REST path"] [path=/pd/api/v1]
[2020/03/24 16:27:17.787 +00:00] [INFO] [apiserver.go:109] ["Enabled Dashboard API"] [path=/dashboard/api/]
[2020/03/24 16:27:17.787 +00:00] [INFO] [server.go:190] ["register REST path"] [path=/dashboard/api/]
[2020/03/24 16:27:17.787 +00:00] [INFO] [uiserver.go:38] ["Enabled Dashboard UI"] [path=/dashboard/]
[2020/03/24 16:27:17.787 +00:00] [INFO] [server.go:190] ["register REST path"] [path=/dashboard/]
[2020/03/24 16:27:17.787 +00:00] [FATAL] [main.go:125] ["run server failed"] [error="expected IP in URL for binding (http://n3:2380)"] [stack="github.com/pingcap/log.Fatal\n\t/home/jenkins/agent/workspace/release_tidb_4.0/go/pkg/mod/github.com/pingcap/[email protected]/global.go:59\nmain.main\n\t/home/jenkins/agent/workspace/release_tidb_4.0/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:125\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203"]

note the error expected IP in URL for binding (http://n3:2380)

Merge config file from existing instances for imported cluster

Currently we copy config files from existing instances to the profile directory, but not applying them to the cluster metadata, thus when deploying new node, or upgrading, the configs may be reset to defaults.

We need to properly handle configs files during importing and save them to the metadata of the cluster.

This also involve TiKV labels set during the deploy process of TiDB-Ansible.

Traking issue: developer support

Running and testing TiDB and TiKV when developing is tricky. TiUp has potential to make it easy and thus to encourage contribution. This issue is for tracking ideas for ways in which TiUp could help developers. Good ideas should be spun out into their own issues.

updating while running is causes 'text file busy' error

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

This is two bugs in one:

  • I ran tidb update --nightly --all (after having executed it only 5 minutes ago). I expect that it should be able to compare either modification date or checksum and not download a new file.

  • Second bug is that it failed to update while a playground was running. This could be made more predictable by either refusing to update a running component, or moving the existing file before clobbering it:

$ tiup update --nightly --all
The component `client` does not have a nightly version; skipped.
The component `grafana` does not have a nightly version; skipped.
download https://tiup-mirrors.pingcap.com/pd-nightly-linux-amd64.tar.gz:
33213324 / 33213324 [----------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 14267940 p/s
Error: open /home/XXX/.tiup/components/pd/nightly/pd-server: text file busy
  1. What did you expect to see?
  • Check for actual updates
  • Either refuse to upgrade, or fail predictably.
  1. What did you see instead?

See above.

  1. What version of TiUP are you using (tiup --version)?
tiup version v0.0.3 tiup

UCP: Add integration tests for playground component

Description

The component playground doesn't have any integration test cases so far, it's behavior may be broken by new features or code change. It's better to add some integration tests for it.

Score

  • 200

Mentor(s)

Contact the mentors: #tidb-challenge-program channel in TiDB Community Slack Workspace

Recommended Skills

  • Go

Cannot download `tikv-nightly-linux-amd64.tar.gz`

➜  ~ lsb_release -a
LSB Version:	n/a
Distributor ID:	ManjaroLinux
Description:	Manjaro Linux
Release:	18.1.4
Codename:	Juhraya

➜  ~ tiup run playground nightly
Starting /home/fall/.tiup/components/playground/v0.0.4/playground nightly 
download https://tiup-mirrors.pingcap.com/tikv-nightly-linux-amd64.tar.gz:
126130806 / 126130806 [------------------------------------------------------------------------------------------] 100.00% 11191001 p/s
Error: stream error: stream ID 1; INTERNAL_ERROR
Error: exit status 1
Playground bootstrapping failed: exit status 1
Error: start `/home/fall/.tiup/components/playground/v0.0.4/playground` (wd:/home/fall/.tiup/data/RsR7BqX) failed: exit status 1

Retry and the same error throw again.
No proxy set in my environment variable.

Improve PD client

we only pass the first instance's address of PD and use it in client.
so it can't work if the first instance is unnormal.

WeChatWorkScreenshot_e60b1d84-d490-4e1e-8ab9-83f49cd59cdb

if stop the first pd, all tikv display as down cause we can't get the statu from pd.
WeChatWorkScreenshot_cb8f037a-95c4-4ac2-b927-97737ea40624

Unit tests should only test single actions

Some of our unit tests are more like integration tests at the moment in that they test more than one stage in the TiUp pipeline. It is better practice to test this sort of thing in integration tests and for unit tests to test small, modular actions. In particular, unit tests should almost never do IO. Doing this will require some mocking of interfaces and extracting interfaces where there are currently only concrete types

UCP: Integrate Grafana into playground

Description

Currently, the playground has integrated TiKV/TiDB/PD/Prometheus, but the Grafana doesn't been integrated. It's better to start Grafana if the --monitor specified.

e.g: tiup playground --monitor

Score

  • 300

Mentor(s)

Contact the mentors: #tidb-challenge-program channel in TiDB Community Slack Workspace

Recommended Skills

  • Go
  • Grafana

Learning Materials

Reference the playground implementation.

Fail to run `tiup playground`

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    Run tiup playground

  2. What did you expect to see?
    Set up a cluster

  3. What did you see instead?

~/dev/tidb-dashboard(tcp_lb ✔) tiup playgorund
Error: unkonwn component `playgorund` (see supported components via `tiup list --refresh`)
~/dev/tidb-dashboard(tcp_lb ✔) tiup playground
Starting /home/fullstop/.tiup/components/playground/v0.0.5/playground
Playground Bootstrapping...
Starting /home/fullstop/.tiup/components/pd/v4.0.0-beta.2/pd-server -- --name=pd-0 --data-dir=/home/fullstop/.tiup/data/RucaQpD/pd-0/data --peer-urls=http://127.0.0.1:2380 --advertise-peer-urls=http://127.0.0.1:2380 --client-urls=http://127.0.0.1:2379 --advertise-client-urls=http://127.0.0.1:2379 --log-file=/home/fullstop/.tiup/data/RucaQpD/pd-0/pd.log --ini
tial-cluster=pd-0=http://127.0.0.1:2380
Starting /home/fullstop/.tiup/components/tikv/nightly/tikv-server -- --addr=127.0.0.1:20160 --status-addr=127.0.0.1:20180 --pd=http://127.0.0.1:2379 --config=/home/fullstop/.tiup/data/RucaQpD/tikv-0/tikv.toml --data-dir=/home/fullstop/.tiup/data/RucaQpD/tikv-0/data --log-file=/home/fullstop/.tiup/data/RucaQpD/tikv-0/tikv.log
Starting /home/fullstop/.tiup/components/tidb/v4.0.0-beta.2/tidb-server -- -P 4000 --store=tikv --host=127.0.0.1 --status=10080 --path=127.0.0.1:2379 --log-file=/home/fullstop/.tiup/data/RucaQpD/tidb-0/tidb.log
error: Found argument '--addr=127.0.0.1:20160' which wasn't expected, or isn't valid in this context

USAGE:
    tikv-server [FLAGS] [OPTIONS]

For more information try --help
Error: start `/home/fullstop/.tiup/components/tikv/nightly/tikv-server` (wd:/home/fullstop/.tiup/data/RucaQpD/tikv-0) failed: exit status 1
[2020/03/29 19:06:23.104 +08:00] [FATAL] [main.go:56] ["parse cmd flags error"] [error="'--name=pd-0' is an invalid flag"] [errorVerbose="'--name=pd-0' is an invalid flag\ngithub.com/pingcap/pd/v4/server/config.(*Config).Parse\n\t/home/jenkins/agent/workspace/release_tidb_4.0/go/src/github.com/pingcap/pd/server/config/config.go:293\nmain.main\n\t/home/jenkin
s/agent/workspace/release_tidb_4.0/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:42\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357"] [stack="github.com/pingcap/log.Fatal\n\t/home/jenkins/agent/workspace/release_tidb_4.0/go/pkg/mod/github.com/pingcap/[email protected]
1cd/global.go:59\nmain.main\n\t/home/jenkins/agent/workspace/release_tidb_4.0/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:56\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203"]
[2020/03/29 19:06:23.114 +08:00] [INFO] [printer.go:41] ["Welcome to TiDB."] ["Release Version"=v4.0.0-beta-446-g5268094af] ["Git Commit Hash"=5268094afe05c7efef0d91d2deeec428cc85abe6] ["Git Branch"=master] ["UTC Build Time"="2020-03-17 02:22:07"] [GoVersion=go1.13] ["Race Enabled"=false] ["Check Table Before Drop"=false] ["TiKV Min Version"=v3.0.0-60965b006
877ca7234adaced7890d7b029ed1306]
Error: start `/home/fullstop/.tiup/components/pd/v4.0.0-beta.2/pd-server` (wd:/home/fullstop/.tiup/data/RucaQpD/pd-0) failed: exit status 1
[2020/03/29 19:06:23.115 +08:00] [INFO] [printer.go:54] ["loaded config"] [config="{\"host\":\"0.0.0.0\",\"advertise-address\":\"0.0.0.0\",\"port\":4000,\"cors\":\"\",\"store\":\"mocktikv\",\"path\":\"/tmp/tidb\",\"socket\":\"\",\"lease\":\"45s\",\"run-ddl\":true,\"split-table\":true,\"token-limit\":1000,\"oom-use-tmp-storage\":true,\"tmp-storage-path\":\"/t
mp/tidb/tmp-storage\",\"oom-action\":\"cancel\",\"mem-quota-query\":1073741824,\"enable-streaming\":false,\"enable-batch-dml\":false,\"txn-local-latches\":{\"enabled\":false,\"capacity\":2048000},\"lower-case-table-names\":2,\"server-version\":\"\",\"log\":{\"level\":\"info\",\"format\":\"text\",\"disable-timestamp\":null,\"enable-timestamp\":null,\"disable-
error-stack\":null,\"enable-error-stack\":null,\"file\":{\"filename\":\"\",\"max-size\":300,\"max-days\":0,\"max-backups\":0},\"enable-slow-log\":true,\"slow-query-file\":\"tidb-slow.log\",\"slow-threshold\":300,\"expensive-threshold\":10000,\"query-log-max-len\":4096,\"record-plan-in-slow-log\":1},\"security\":{\"skip-grant-table\":false,\"ssl-ca\":\"\",\"s
sl-cert\":\"\",\"ssl-key\":\"\",\"require-secure-transport\":false,\"cluster-ssl-ca\":\"\",\"cluster-ssl-cert\":\"\",\"cluster-ssl-key\":\"\",\"cluster-verify-cn\":null},\"status\":{\"status-host\":\"0.0.0.0\",\"metrics-addr\":\"\",\"status-port\":10080,\"metrics-interval\":15,\"report-status\":true,\"record-db-qps\":false},\"performance\":{\"max-procs\":0,\
"max-memory\":0,\"stats-lease\":\"3s\",\"stmt-count-limit\":5000,\"feedback-probability\":0.05,\"query-feedback-limit\":1024,\"pseudo-estimate-ratio\":0.8,\"force-priority\":\"NO_PRIORITY\",\"bind-info-lease\":\"3s\",\"txn-total-size-limit\":104857600,\"tcp-keep-alive\":true,\"cross-join\":true,\"run-auto-analyze\":true},\"prepared-plan-cache\":{\"enabled\":
false,\"capacity\":100,\"memory-guard-ratio\":0.1},\"opentracing\":{\"enable\":false,\"rpc-metrics\":false,\"sampler\":{\"type\":\"const\",\"param\":1,\"sampling-server-url\":\"\",\"max-operations\":0,\"sampling-refresh-interval\":0},\"reporter\":{\"queue-size\":0,\"buffer-flush-interval\":0,\"log-spans\":false,\"local-agent-host-port\":\"\"}},\"proxy-protoc
ol\":{\"networks\":\"\",\"header-timeout\":5},\"tikv-client\":{\"grpc-connection-count\":4,\"grpc-keepalive-time\":10,\"grpc-keepalive-timeout\":3,\"commit-timeout\":\"41s\",\"max-batch-size\":128,\"overload-threshold\":200,\"max-batch-wait-time\":0,\"batch-wait-size\":8,\"enable-chunk-rpc\":true,\"region-cache-ttl\":600,\"store-limit\":0,\"copr-cache\":{\"e
nabled\":false,\"capacity-mb\":0,\"admission-max-result-mb\":0,\"admission-min-process-ms\":0}},\"binlog\":{\"enable\":false,\"ignore-error\":false,\"write-timeout\":\"15s\",\"binlog-socket\":\"\",\"strategy\":\"range\"},\"compatible-kill-query\":false,\"plugin\":{\"dir\":\"\",\"load\":\"\"},\"pessimistic-txn\":{\"enable\":true,\"max-retry-count\":256},\"che
ck-mb4-value-in-utf8\":true,\"max-index-length\":3072,\"alter-primary-key\":false,\"treat-old-version-utf8-as-utf8mb4\":true,\"enable-table-lock\":false,\"delay-clean-table-lock\":0,\"split-region-max-num\":1000,\"stmt-summary\":{\"enable\":true,\"max-stmt-count\":200,\"max-sql-length\":4096,\"refresh-interval\":1800,\"history-size\":24},\"repair-mode\":fals
e,\"repair-table-list\":[],\"isolation-read\":{\"engines\":[\"tikv\",\"tiflash\",\"tidb\"]},\"max-server-connections\":4096,\"new_collations_enabled_on_first_bootstrap\":false,\"experimental\":{\"allow-auto-random\":false},\"enable-dynamic-config\":true}"]
[2020/03/29 19:06:23.115 +08:00] [INFO] [main.go:280] ["disable Prometheus push client"]
[2020/03/29 19:06:23.115 +08:00] [INFO] [store.go:68] ["new store"] [path=mocktikv:///tmp/tidb]
[2020/03/29 19:06:23.116 +08:00] [INFO] [systime_mon.go:25] ["start system time monitor"]
[2020/03/29 19:06:23.138 +08:00] [INFO] [store.go:74] ["new store with retry success"]
[2020/03/29 19:06:23.139 +08:00] [INFO] [tidb.go:72] ["new domain"] [store=033afd03-c31a-42f9-b845-b660768f91a4] ["ddl lease"=45s] ["stats lease"=3s]
[2020/03/29 19:06:23.142 +08:00] [INFO] [ddl.go:278] ["[ddl] start DDL"] [ID=a97638ad-2516-4caa-8412-f2253b6c2e17] [runWorker=true]
[2020/03/29 19:06:23.143 +08:00] [INFO] [ddl.go:266] ["[ddl] start delRangeManager OK"] ["is a emulator"=true]
[2020/03/29 19:06:23.143 +08:00] [INFO] [ddl_worker.go:130] ["[ddl] start DDL worker"] [worker="worker 1, tp general"]
[2020/03/29 19:06:23.143 +08:00] [INFO] [ddl_worker.go:130] ["[ddl] start DDL worker"] [worker="worker 2, tp add index"]
[2020/03/29 19:06:23.143 +08:00] [INFO] [delete_range.go:133] ["[ddl] start delRange emulator"]
[2020/03/29 19:06:23.148 +08:00] [INFO] [domain.go:144] ["full load InfoSchema success"] [usedSchemaVersion=0] [neededSchemaVersion=22] ["start time"=5.1632ms]
[2020/03/29 19:06:23.148 +08:00] [INFO] [domain.go:368] ["full load and reset schema validator"]
[2020/03/29 19:06:23.157 +08:00] [INFO] [server.go:232] ["server is running MySQL protocol"] [addr=0.0.0.0:4000]
[2020/03/29 19:06:23.158 +08:00] [INFO] [domain.go:1015] ["init stats info time"] ["take time"=2.5038ms]
[2020/03/29 19:06:23.158 +08:00] [INFO] [http_status.go:275] ["for status and metrics report"] ["listening on addr"=0.0.0.0:10080]
[2020/03/29 19:06:24.073 +08:00] [INFO] [server.go:383] ["new connection"] [conn=1] [remoteAddr=127.0.0.1:56422]
[2020/03/29 19:06:24.073 +08:00] [INFO] [server.go:386] ["connection closed"] [conn=1]
CLUSTER START SUCCESSFULLY, Enjoy it ^-^
To connect TiDB: mysql --host 127.0.0.1 --port 4000 -u root
Error: exit status 1
Playground bootstrapping failed: exit status 1
Error: start `/home/fullstop/.tiup/components/playground/v0.0.5/playground` (wd:/home/fullstop/.tiup/data/RucaQpD) failed: exit status 1
  1. What version of TiUP are you using (tiup --version)?
    ~/dev/tidb-dashboard(tcp_lb ✔) tiup --version
    tiup version v0.0.2+Unknown(Unknown)

Fail to run `tiup playground`

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

Run tiup playground

  1. What did you expect to see?
    Set up a cluster

  2. What did you see instead?
    tidb.log

[2020/04/10 16:56:04.980 +08:00] [INFO] [main.go:280] ["disable Prometheus push client"]
[2020/04/10 16:56:04.980 +08:00] [INFO] [store.go:68] ["new store"] [path=tikv://127.0.0.1:2379]
[2020/04/10 16:56:04.980 +08:00] [INFO] [client.go:135] ["[pd] create pd client with endpoints"] [pd-address="[127.0.0.1:2379]"]
[2020/04/10 16:56:04.981 +08:00] [INFO] [systime_mon.go:25] ["start system time monitor"]
[2020/04/10 16:56:04.981 +08:00] [WARN] [base_client.go:170] ["[pd] failed to get cluster id"] [url=http://127.0.0.1:2379] [error="error:rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:2379: connect: connection refused\" target:127.0.0.1:2379 status:TRANSIENT_FAILURE"]
[2020/04/10 16:56:05.984 +08:00] [WARN] [base_client.go:170] ["[pd] failed to get cluster id"] [url=http://127.0.0.1:2379] [error="error:rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:2379: connect: connection refused\" target:127.0.0.1:2379 status:TRANSIENT_FAILURE"]
[2020/04/10 16:56:07.585 +08:00] [WARN] [base_client.go:170] ["[pd] failed to get cluster id"] [url=http://127.0.0.1:2379] [error="error:rpc error: code = Unknown desc = server not started target:127.0.0.1:2379 status:READY"]
[2020/04/10 16:56:08.598 +08:00] [INFO] [base_client.go:242] ["[pd] switch leader"] [new-leader=http://127.0.0.1:2379] [old-leader=]
[2020/04/10 16:56:08.599 +08:00] [INFO] [base_client.go:92] ["[pd] init cluster id"] [cluster-id=6814004129680144671]
[2020/04/10 16:56:08.602 +08:00] [INFO] [store.go:74] ["new store with retry success"]
[2020/04/10 16:56:29.089 +08:00] [WARN] [backoff.go:309] ["pdRPC backoffer.maxSleep 20000ms is exceeded, errors:\nregion not found for key \"mBootstra\\xffpKey\\x00\\x00\\x00\\x00\\xfb\\x00\\x00\\x00\\x00\\x00\\x00\\x00s\" at 2020-04-10T16:56:25.168466511+08:00\nregion not found for key \"mBootstra\\xffpKey\\x00\\x00\\x00\\x00\\xfb\\x00\\x00\\x00\\x00\\x00\\x00\\x00s\" at 2020-04-10T16:56:27.23407044+08:00\nregion not found for key \"mBootstra\\xffpKey\\x00\\x00\\x00\\x00\\xfb\\x00\\x00\\x00\\x00\\x00\\x00\\x00s\" at 2020-04-10T16:56:29.089404542+08:00"]
[2020/04/10 16:56:29.089 +08:00] [FATAL] [session.go:1850] ["check bootstrapped failed"] [error="[tikv:9001]PD server timeout"] [stack="github.com/pingcap/tidb/session.getStoreBootstrapVersion\n\t/home/jenkins/agent/workspace/tidb_v4.0.0-rc/go/src/github.com/pingcap/tidb/session/session.go:1850\ngithub.com/pingcap/tidb/session.BootstrapSession\n\t/home/jenkins/agent/workspace/tidb_v4.0.0-rc/go/src/github.com/pingcap/tidb/session/session.go:1650\nmain.createStoreAndDomain\n\t/home/jenkins/agent/workspace/tidb_v4.0.0-rc/go/src/github.com/pingcap/tidb/tidb-server/main.go:234\nmain.main\n\t/home/jenkins/agent/workspace/tidb_v4.0.0-rc/go/src/github.com/pingcap/tidb/tidb-server/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203"]
~                                                                                     

pd.log

[2020/04/10 16:56:05.055 +08:00] [INFO] [util.go:51] ["Welcome to Placement Driver (PD)"]
[2020/04/10 16:56:05.055 +08:00] [INFO] [util.go:52] [PD] [release-version=v4.0.0-rc]
[2020/04/10 16:56:05.055 +08:00] [INFO] [util.go:53] [PD] [git-hash=6f06805f3b0070107fcb4af68b2fc224dee0714d]
[2020/04/10 16:56:05.055 +08:00] [INFO] [util.go:54] [PD] [git-branch=heads/refs/tags/v4.0.0-rc]
[2020/04/10 16:56:05.055 +08:00] [INFO] [util.go:55] [PD] [utc-build-time="2020-04-08 07:49:10"]
[2020/04/10 16:56:05.055 +08:00] [INFO] [metricutil.go:81] ["disable Prometheus push client"]
[2020/04/10 16:56:05.055 +08:00] [INFO] [server.go:220] ["PD Config"] [config="{\"client-urls\":\"http://127.0.0.1:2379\",\"peer-urls\":\"http://127.0.0.1:2380\",\"advertise-client-urls\":\"http://127.0.0.1:2379\",\"advertise-peer-urls\":\"http://127.0.0.1:2380\",\"name\":\"pd-0\",\"data-dir\":\"/home/jackyan/.tiup/data/tt/pd-0/data\",\"force-new-cluster\":false,\"enable-grpc-gateway\":true,\"initial-cluster\":\"pd-0=http://127.0.0.1:2380\",\"initial-cluster-state\":\"new\",\"join\":\"\",\"lease\":3,\"log\":{\"level\":\"\",\"format\":\"text\",\"disable-timestamp\":false,\"file\":{\"filename\":\"/home/jackyan/.tiup/data/tt/pd-0/pd.log\",\"max-size\":300,\"max-days\":0,\"max-backups\":0},\"development\":false,\"disable-caller\":false,\"disable-stacktrace\":false,\"disable-error-verbose\":true,\"sampling\":null},\"log-file\":\"\",\"log-level\":\"\",\"tso-save-interval\":\"3s\",\"metric\":{\"job\":\"pd-0\",\"address\":\"\",\"interval\":\"15s\"},\"schedule\":{\"max-snapshot-count\":3,\"max-pending-peer-count\":16,\"max-merge-region-size\":20,\"max-merge-region-keys\":200000,\"split-merge-interval\":\"1h0m0s\",\"enable-one-way-merge\":\"false\",\"enable-cross-table-merge\":\"false\",\"patrol-region-interval\":\"100ms\",\"max-store-down-time\":\"30m0s\",\"leader-schedule-limit\":4,\"leader-schedule-policy\":\"count\",\"region-schedule-limit\":2048,\"replica-schedule-limit\":64,\"merge-schedule-limit\":8,\"hot-region-schedule-limit\":4,\"hot-region-cache-hits-threshold\":3,\"store-balance-rate\":15,\"tolerant-size-ratio\":0,\"low-space-ratio\":0.8,\"high-space-ratio\":0.7,\"scheduler-max-waiting-operator\":5,\"enable-remove-down-replica\":\"true\",\"enable-replace-offline-replica\":\"true\",\"enable-make-up-replica\":\"true\",\"enable-remove-extra-replica\":\"true\",\"enable-location-replacement\":\"true\",\"enable-debug-metrics\":\"false\",\"schedulers-v2\":[{\"type\":\"balance-region\",\"args\":null,\"disable\":false,\"args-payload\":\"\"},{\"type\":\"balance-leader\",\"args\":null,\"disable\":false,\"args-payload\":\"\"},{\"type\":\"hot-region\",\"args\":null,\"disable\":false,\"args-payload\":\"\"},{\"type\":\"label\",\"args\":null,\"disable\":false,\"args-payload\":\"\"}],\"schedulers-payload\":null,\"store-limit-mode\":\"manual\"},\"replication\":{\"max-replicas\":3,\"location-labels\":\"\",\"strictly-match-label\":\"false\",\"enable-placement-rules\":\"false\"},\"pd-server\":{\"use-region-storage\":\"true\",\"max-reset-ts-gap\":86400000000000,\"key-type\":\"table\",\"runtime-services\":\"\",\"metric-storage\":\"\",\"dashboard-address\":\"auto\"},\"cluster-version\":\"0.0.0\",\"quota-backend-bytes\":\"8GiB\",\"auto-compaction-mode\":\"periodic\",\"auto-compaction-retention-v2\":\"1h\",\"TickInterval\":\"500ms\",\"ElectionInterval\":\"3s\",\"PreVote\":true,\"security\":{\"cacert-path\":\"\",\"cert-path\":\"\",\"key-path\":\"\",\"cert-allowed-cn\":null},\"label-property\":null,\"WarningMsgs\":null,\"DisableStrictReconfigCheck\":false,\"HeartbeatStreamBindInterval\":\"1m0s\",\"LeaderPriorityCheckInterval\":\"@@@                                                         

tikv.log

[2020/04/10 16:56:05.161 +08:00] [INFO] [lib.rs:90] ["Welcome to TiKV"]
[2020/04/10 16:56:05.161 +08:00] [INFO] [lib.rs:92] []
[2020/04/10 16:56:05.161 +08:00] [INFO] [lib.rs:92] ["Release Version:   4.0.0-rc"]
[2020/04/10 16:56:05.161 +08:00] [INFO] [lib.rs:92] ["Git Commit Hash:   f45d0c963df3ee4b1011caf5eb146cacd1fbbad8"]
[2020/04/10 16:56:05.161 +08:00] [INFO] [lib.rs:92] ["Git Commit Branch: heads/refs/tags/v4.0.0-rc"]
[2020/04/10 16:56:05.164 +08:00] [INFO] [lib.rs:92] ["UTC Build Time:    2020-04-08 07:25:16"]
[2020/04/10 16:56:05.164 +08:00] [INFO] [lib.rs:92] ["Rust Version:      rustc 1.42.0-nightly (0de96d37f 2019-12-19)"]
[2020/04/10 16:56:05.164 +08:00] [INFO] [lib.rs:92] ["Enable Features:   jemalloc portable sse protobuf-codec"]
[2020/04/10 16:56:05.164 +08:00] [INFO] [lib.rs:92] ["Profile:           dist_release"]
[2020/04/10 16:56:05.164 +08:00] [WARN] [lib.rs:527] ["environment variable `TZ` is missing, using `/etc/localtime`"]
[2020/04/10 16:56:05.164 +08:00] [INFO] [lib.rs:539] ["environment variable is present"] [http_proxy=http://192.168.43.183:1080/]
[2020/04/10 16:56:05.164 +08:00] [INFO] [lib.rs:539] ["environment variable is present"] [https_proxy=http://192.168.43.183:1080/]
[2020/04/10 16:56:05.164 +08:00] [WARN] [server.rs:813] ["check: kernel"] [err="kernel parameters net.core.somaxconn got 128, expect 32768"]
[2020/04/10 16:56:05.164 +08:00] [WARN] [server.rs:813] ["check: kernel"] [err="kernel parameters net.ipv4.tcp_syncookies got 1, expect 0"]
[2020/04/10 16:56:05.164 +08:00] [WARN] [server.rs:813] ["check: kernel"] [err="kernel parameters vm.swappiness got 60, expect 0"]
[2020/04/10 16:56:05.165 +08:00] [INFO] [util.rs:427] ["connecting to PD endpoint"] [endpoints=http://127.0.0.1:2379]
[2020/04/10 16:56:05.165 +08:00] [INFO] [<unknown>] ["Connecting to server 127.0.0.1:2379 via HTTP proxy ipv4:192.168.43.183:1080"]
[2020/04/10 16:56:05.168 +08:00] [INFO] [<unknown>] ["New connected subchannel at 0x7fe20e064150 for subchannel 0x7fe21293b1c0"]
[2020/04/10 16:56:05.512 +08:00] [INFO] [util.rs:387] ["PD failed to respond"] [err="Grpc(RpcFailure(RpcStatus { status: 14-UNAVAILABLE, details: Some(\"Socket closed\") }))"] [endpoints=http://127.0.0.1:2379]
[2020/04/10 16:56:05.512 +08:00] [WARN] [client.rs:58] ["validate PD endpoints failed"] [err="Other(\"[components/pd_client/src/util.rs:418]: PD cluster failed to respond\")"]
[2020/04/10 16:56:05.813 +08:00] [INFO] [util.rs:427] ["connecting to PD endpoint"] [endpoints=http://127.0.0.1:2379]
[2020/04/10 16:56:05.816 +08:00] [INFO] [<unknown>] ["Connecting to server 127.0.0.1:2379 via HTTP proxy ipv4:192.168.43.183:1080"]
[2020/04/10 16:56:05.823 +08:00] [INFO] [<unknown>] ["New connected subchannel at 0x7fe210e89dd0 for subchannel 0x7fe21293b380"]
[2020/04/10 16:56:06.123 +08:00] [INFO] [util.rs:387] ["PD failed to respond"] [err="Grpc(RpcFailure(RpcStatus { status: 14-UNAVAILABLE, details: Some(\"Socket closed\") }))"] [endpoints=http://127.0.0.1:2379]
[2020/04/10 16:56:06.424 +08:00] [INFO] [util.rs:427] ["connecting to PD endpoint"] [endpoints=http://127.0.0.1:2379]
jackyan@jackyan-virtual-machine:~$ tiup playground
Starting /home/jackyan/.tiup/components/playground/v0.0.6/playground  
Playground Bootstrapping...
Starting /home/jackyan/.tiup/components/pd/v4.0.0-rc/pd-server --name=pd-0 --data-dir=/home/jackyan/.tiup/data/RvkAAqA/pd-0/data --peer-urls=http://127.0.0.1:2380 --advertise-peer-urls=http://127.0.0.1:2380 --client-urls=http://127.0.0.1:2379 --advertise-client-urls=http://127.0.0.1:2379 --log-file=/home/jackyan/.tiup/data/RvkAAqA/pd-0/pd.log --initial-cluster=pd-0=http://127.0.0.1:2380 
Starting /home/jackyan/.tiup/components/tikv/v4.0.0-rc/tikv-server --addr=127.0.0.1:20160 --status-addr=127.0.0.1:20180 --pd=http://127.0.0.1:2379 --config=/home/jackyan/.tiup/data/RvkAAqA/tikv-0/tikv.toml --data-dir=/home/jackyan/.tiup/data/RvkAAqA/tikv-0/data --log-file=/home/jackyan/.tiup/data/RvkAAqA/tikv-0/tikv.log 
Starting /home/jackyan/.tiup/components/tidb/v4.0.0-rc/tidb-server -P 4000 --store=tikv --host=127.0.0.1 --status=10080 --path=127.0.0.1:2379 --log-file=/home/jackyan/.tiup/data/RvkAAqA/tidb-0/tidb.log 
........................Error: start `/home/jackyan/.tiup/components/tidb/v4.0.0-rc/tidb-server` (wd:/home/jackyan/.tiup/data/RvkAAqA/tidb-0) failed: exit status 1
....................................To view the dashboard: http://127.0.0.1:2379/dashboard
  1. What version of TiUP are you using (tiup --version)?
    tiup version v0.0.2+Unknown(Unknown)
jackyan@jackyan-virtual-machine:~$ tiup list
Available components (Last Modified: 2020-02-27T15:20:35+08:00):
Name               Installed                     Platforms                 Description
----               ---------                     ---------                 -----------
tidb               YES(v4.0.0-beta.2,v4.0.0-rc)  darwin/amd64,linux/amd64  TiDB is an open source distributed HTAP database compatible with the MySQL protocol
tikv               YES(v4.0.0-beta.2,v4.0.0-rc)  darwin/amd64,linux/amd64  Distributed transactional key-value database, originally created to complement TiDB
pd                 YES(v4.0.0-beta.2,v4.0.0-rc)  darwin/amd64,linux/amd64  PD is the abbreviation for Placement Driver. It is used to manage and schedule the TiKV cluster
playground         YES(v0.0.5,v0.0.6)            darwin/amd64,linux/amd64  Bootstrap a local TiDB cluster
client             YES(v0.0.5,v0.0.6)            darwin/amd64,linux/amd64  A simple mysql client to connect TiDB
prometheus                                       darwin/amd64,linux/amd64  The Prometheus monitoring system and time series database.
tpc                                              darwin/amd64,linux/amd64  A toolbox to benchmark workloads in TPC
package                                          darwin/amd64,linux/amd64  A toolbox to package tiup component
tiops                                            darwin/amd64,linux/amd64  Bootstrap a remote TiDB cluster
grafana                                          linux/amd64,darwin/amd64  Grafana is the open source analytics & monitoring solution for every database
alertmanager                                     darwin/amd64,linux/amd64  Prometheus Alertmanager
blackbox_exporter                                darwin/amd64,linux/amd64  Blackbox prober exporter
node_exporter                                    darwin/amd64,linux/amd64  Blackbox prober exporter
pushgateway                                      darwin/amd64,linux/amd64  Blackbox prober exporter
tiflash                                          linux/amd64               
drainer                                          linux/amd64               The drainer componet of TiDB binlog service
pump                                             linux/amd64               The pump componet of TiDB binlog service
cluster                                          linux/amd64,darwin/amd64  Deploy a TiDB cluster for production

Unable to update self under linux

Because the binary /home/mi/.tiup/bin/tiup is locked by the running tiup process (dead lock):

~$ tiup version
v0.0.0 Initial Demo
~$ tiup status       
Name  Component  PID  Status  Created Time  Directory  Binary
----  ---------  ---  ------  ------------  ---------  ------
~$ tiup update --self
Error: open /home/mi/.tiup/bin/tiup: text file busy

UCP: Output the TAG name when playground bootstrapping

Description

Currently, we will specify a TAG name for each running instance, but users must use tiup status to display the name. It's better to display the TAG name when playground bootstrapping.

We can use an environment variable to synchronize the TAG to the instance (e.g: TIUP_INSTANCE_TAG).

Score

  • 50

Mentor(s)

Contact the mentors: #tidb-challenge-program channel in TiDB Community Slack Workspace

Recommended Skills

  • Go

Learning Materials

Move related code to this repo

Code for generating the manifests and server-side layouts should be part of this repository so that the two codebases can be kept in sync. If this work is done manually at the moment, then we should implement it in code :-)

Support custom inventory file name

Some user may use different names for inventory file as a workaround when using TiDB-Ansible to manage multiple clusters, we should support custom inventory file name on importing.

PD always logs a warning at startup

The warning log level includes a stack trace, so below is what I see which consists mostly of a non-useful stack trace (in a terminal without horizontal scrolling so it takes most of the vertical space). I see 2 possible solutions

  1. configure the warning level to not show the stack trace
  2. don't log this message at the warning level, at least when it is the first time after startup
...
[2020/04/02 09:27:37.569 -07:00] [INFO] [config_client.go:50] ["[pd] create pd configuration client with endpoints"] [pd-address="[127.0.0.1:2379]"]
[2020/04/02 09:27:37.963 -07:00] [WARN] [base_client.go:170] ["[pd] failed to get cluster id"] [url=http://127.0.0.1:2379] [error="error:rpc error: code = Unknown desc = server not started target:127.0.0.1:2379 status:READY"] [errorVerbose="error:rpc error: code = Unknown desc = server not started target:127.0.0.1:2379 status:READY\ngithub.com/pingcap/pd/v4/client.(*baseClient).getMembers\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/base_client.go:208\ngithub.com/pingcap/pd/v4/client.(*baseClient).initClusterID\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/base_client.go:167\ngithub.com/pingcap/pd/v4/client.(*baseClient).initRetry\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/base_client.go:103\ngithub.com/pingcap/pd/v4/client.newBaseClient\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/base_client.go:84\ngithub.com/pingcap/pd/v4/client.NewConfigClientWithContext\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/config_client.go:51\ngithub.com/pingcap/pd/v4/client.NewConfigClient\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/config_client.go:45\ngithub.com/pingcap/tidb/config.newPDConfHandler\n\t/Users/pingcap/gopkg/src/github.com/pingcap/tidb/config/config_handler.go:116\ngithub.com/pingcap/tidb/config.NewConfHandler\n\t/Users/pingcap/gopkg/src/github.com/pingcap/tidb/config/config_handler.go:50\ngithub.com/pingcap/tidb/config.InitializeConfig\n\t/Users/pingcap/gopkg/src/github.com/pingcap/tidb/config/config.go:729\nmain.main\n\t/Users/pingcap/gopkg/src/github.com/pingcap/tidb/tidb-server/main.go:163\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357\ngithub.com/pingcap/pd/v4/client.(*baseClient).getMembers\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/base_client.go:209\ngithub.com/pingcap/pd/v4/client.(*baseClient).initClusterID\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/base_client.go:167\ngithub.com/pingcap/pd/v4/client.(*baseClient).initRetry\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/base_client.go:103\ngithub.com/pingcap/pd/v4/client.newBaseClient\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/base_client.go:84\ngithub.com/pingcap/pd/v4/client.NewConfigClientWithContext\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/config_client.go:51\ngithub.com/pingcap/pd/v4/client.NewConfigClient\n\t/Users/pingcap/gopkg/pkg/mod/github.com/pingcap/pd/[email protected]/client/config_client.go:45\ngithub.com/pingcap/tidb/config.newPDConfHandler\n\t/Users/pingcap/gopkg/src/github.com/pingcap/tidb/config/config_handler.go:116\ngithub.com/pingcap/tidb/config.NewConfHandler\n\t/Users/pingcap/gopkg/src/github.com/pingcap/tidb/config/config_handler.go:50\ngithub.com/pingcap/tidb/config.InitializeConfig\n\t/Users/pingcap/gopkg/src/github.com/pingcap/tidb/config/config.go:729\nmain.main\n\t/Users/pingcap/gopkg/src/github.com/pingcap/tidb/tidb-server/main.go:163\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357"]
[2020/04/02 09:27:38.965 -07:00] [INFO] [base_client.go:242] ["[pd] switch leader"] [new-leader=http://127.0.0.1:2379] [old-leader=]
[2020/04/02 09:27:38.965 -07:00] [INFO] [base_client.go:92] ["[pd] init cluster id"] [cluster-id=6811151798369236776]
CLUSTER START SUCCESSFULLY, Enjoy it ^-^
To connect TiDB: mysql --host 127.0.0.1 --port 4000 -u root
To view the dashboard: http://127.0.0.1:2379/dashboard

bug: can not install pd:v3.0.8

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

run tiup install pd:v3.0.8

  1. What did you expect to see?
    Error: component 'pd' doesn't release the version 'v3.0.8'

  2. What did you see instead?

installed successfully.

  1. What version of TiUP are you using (tiup --version)?

tiup version v0.0.2+Unknown(Unknown)

Disable space_placeholder_file for playgrounds

Feature Request

I think what you are doing with tiup is great! I have a small nit:

Is your feature request related to a problem? Please describe:

Each of the playgrounds create TiKV's space_placeholder_file (2GB). I think this makes sense for production environments, but less so on a desktop where you might have multiple playgrounds.

Describe the feature you'd like:

Disable space place holders.

Describe alternatives you've considered:

It's not that harmful, alternative would be to keep as is. That will limit having multiple playgrounds.

Teachability, Documentation, Adoption, Migration Strategy:

N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.