
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
mygithub.libinneed.workers.dev/tikv/pd
PD is the abbreviation for Placement Driver. It is used to manage and schedule the TiKV cluster.
PD supports distribution and fault-tolerance by embedding etcd.
$GOPATH
is set. (For example, export GOPATH=$HOME/go
)git clone git@github.com:pingcap/pd.git $GOPATH/src/github.com/pingcap/pd
.make
to install PD. PD is installed in the bin
directory.See configuration.
You can run pd-server
directly on your local machine, if you want to connect to PD from outside,
you can let PD listen on the host IP.
# Set correct HostIP here.
export HostIP="192.168.199.105"
pd-server --name="pd" \
--data-dir="pd" \
--client-urls="http://${HostIP}:2379" \
--peer-urls="http://${HostIP}:2380" \
--log-file=pd.log
Using curl
to see PD member:
curl http://${HostIP}:2379/v2/members
{"members":[{"id":"f62e88a6e81c149","name":"pd","peerURLs":["http://192.168.199.105:2380"],"clientURLs":["http://192.168.199.105:2379"]}]}
A better tool httpie is recommended:
http http://${HostIP}:2379/v2/members
HTTP/1.1 200 OK
Content-Length: 144
Content-Type: application/json
Date: Thu, 21 Jul 2016 09:37:12 GMT
X-Etcd-Cluster-Id: 33dc747581249309
{
"members": [
{
"clientURLs": [
"http://192.168.199.105:2379"
],
"id": "f62e88a6e81c149",
"name": "pd",
"peerURLs": [
"http://192.168.199.105:2380"
]
}
]
}
You can use the following command to build a PD image directly:
docker build -t pingcap/pd .
Or you can also use following command to get PD from Docker hub:
docker pull pingcap/pd
Run a single node with Docker:
# Set correct HostIP here.
export HostIP="192.168.199.105"
docker run -d -p 2379:2379 -p 2380:2380 --name pd pingcap/pd \
--name="pd" \
--data-dir="pd" \
--client-urls="http://0.0.0.0:2379" \
--advertise-client-urls="http://${HostIP}:2379" \
--peer-urls="http://0.0.0.0:2380" \
--advertise-peer-urls="http://${HostIP}:2380" \
--log-file=pd.log
PD is a component in TiDB project, you must run it with TiDB and TiKV together, see TiDB-Ansible to learn how to set up the cluster and run them.
You can also use Docker to run the cluster.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.