Skip to content
Merged
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ pytest:
lint:
golangci-lint run

pcsm-run: build
./bin/pcsm --source=$(SOURCE) --target=$(TARGET) --log-level=debug --reset-state
Copy link
Copy Markdown
Collaborator

@chupe chupe Dec 24, 2025

Choose a reason for hiding this comment

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

--reset-state is ineffectual here.
It doesn't have an effect unless starting the replication via --start

Copy link
Copy Markdown
Collaborator

@inelpandzic inelpandzic Dec 24, 2025

Choose a reason for hiding this comment

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

No it does, you run like this pcsm --reset-state you will run PCSM and it will reset the state before starting to accept command like start or something.

It doesn't matter if you pass --start or not, it will simply reset the state (meaning cleanup percona_clustersync_mongodb db that PCSM maintains on the target for it state) on this root pcsm command.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Found it, you're right 👍 Thanks!


pcsm-start: build
./bin/pcsm --source=$(SOURCE) --target=$(TARGET) --log-level=debug --reset-state --start

# Clean generated files
clean:
rm -rf bin/*
go clean -cache -testcache

.PHONY: all build test-build test clean
.PHONY: all build test-build test pcsm-start clean
12 changes: 6 additions & 6 deletions hack/rs/compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
rs00:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: rs00
hostname: rs00
ports: ["30000:30000"]
Expand All @@ -19,7 +19,7 @@ services:
]

rs01:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: rs01
hostname: rs01
ports: ["30001:30001"]
Expand All @@ -38,7 +38,7 @@ services:
]

rs02:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: rs02
hostname: rs02
ports: ["30002:30002"]
Expand All @@ -57,7 +57,7 @@ services:
]

rs10:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: rs10
hostname: rs10
ports: ["30100:30100"]
Expand All @@ -76,7 +76,7 @@ services:
]

rs11:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: rs11
hostname: rs11
ports: ["30101:30101"]
Expand All @@ -95,7 +95,7 @@ services:
]

rs12:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: rs12
hostname: rs12
ports: ["30102:30102"]
Expand Down
40 changes: 20 additions & 20 deletions hack/sh-ha/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:

# ----------------- Source -----------------
src-mongos:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-mongos
hostname: src-mongos
ports: ["27017:27017"]
Expand All @@ -17,7 +17,7 @@ services:
]

src-cfg0:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-cfg0
hostname: src-cfg0
ports: ["27000:27000"]
Expand All @@ -33,7 +33,7 @@ services:
"27000",
]
src-cfg1:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-cfg1
hostname: src-cfg1
ports: ["27001:27001"]
Expand All @@ -49,7 +49,7 @@ services:
"27001",
]
src-cfg2:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-cfg2
hostname: src-cfg2
ports: ["27002:27002"]
Expand All @@ -66,7 +66,7 @@ services:
]

src-rs00:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-rs00
hostname: src-rs00
ports: ["30000:30000"]
Expand All @@ -82,7 +82,7 @@ services:
"30000",
]
src-rs01:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-rs01
hostname: src-rs01
ports: ["30001:30001"]
Expand All @@ -98,7 +98,7 @@ services:
"30001",
]
src-rs02:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-rs02
hostname: src-rs02
ports: ["30002:30002"]
Expand All @@ -115,7 +115,7 @@ services:
]

src-rs10:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-rs10
hostname: src-rs10
ports: ["30100:30100"]
Expand All @@ -131,7 +131,7 @@ services:
"30100",
]
src-rs11:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-rs11
hostname: src-rs11
ports: ["30101:30101"]
Expand All @@ -147,7 +147,7 @@ services:
"30101",
]
src-rs12:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-rs12
hostname: src-rs12
ports: ["30102:30102"]
Expand All @@ -165,7 +165,7 @@ services:

# ----------------- Target -----------------
tgt-mongos:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-mongos
hostname: tgt-mongos
ports: ["29017:27017"]
Expand All @@ -180,7 +180,7 @@ services:
]

tgt-cfg0:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-cfg0
hostname: tgt-cfg0
ports: ["28000:28000"]
Expand All @@ -196,7 +196,7 @@ services:
"28000",
]
tgt-cfg1:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-cfg1
hostname: tgt-cfg1
ports: ["28001:28001"]
Expand All @@ -212,7 +212,7 @@ services:
"28001",
]
tgt-cfg2:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-cfg2
hostname: tgt-cfg2
ports: ["28002:28002"]
Expand All @@ -229,7 +229,7 @@ services:
]

tgt-rs00:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-rs00
hostname: tgt-rs00
ports: ["40000:40000"]
Expand All @@ -245,7 +245,7 @@ services:
"40000",
]
tgt-rs01:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-rs01
hostname: tgt-rs01
ports: ["40001:40001"]
Expand All @@ -261,7 +261,7 @@ services:
"40001",
]
tgt-rs02:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-rs02
hostname: tgt-rs02
ports: ["40002:40002"]
Expand All @@ -278,7 +278,7 @@ services:
]

tgt-rs10:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-rs10
hostname: tgt-rs10
ports: ["40100:40100"]
Expand All @@ -294,7 +294,7 @@ services:
"40100",
]
tgt-rs11:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-rs11
hostname: tgt-rs11
ports: ["40101:40101"]
Expand All @@ -310,7 +310,7 @@ services:
"40101",
]
tgt-rs12:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-rs12
hostname: tgt-rs12
ports: ["40102:40102"]
Expand Down
20 changes: 10 additions & 10 deletions hack/sh/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:

# ----------------- Source -----------------
src-mongos:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-mongos
hostname: src-mongos
ports: ["27017:27017"]
Expand All @@ -17,7 +17,7 @@ services:
]

src-cfg0:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-cfg0
hostname: src-cfg0
ports: ["27000:27000"]
Expand All @@ -34,7 +34,7 @@ services:
]

src-rs00:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-rs00
hostname: src-rs00
ports: ["30000:30000"]
Expand All @@ -51,7 +51,7 @@ services:
]

src-rs10:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-rs10
hostname: src-rs10
ports: ["30100:30100"]
Expand All @@ -68,7 +68,7 @@ services:
]

src-rs20:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: src-rs20
hostname: src-rs20
ports: ["30200:30200"]
Expand All @@ -86,7 +86,7 @@ services:

# ----------------- Target -----------------
tgt-mongos:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-mongos
hostname: tgt-mongos
ports: ["29017:27017"]
Expand All @@ -101,7 +101,7 @@ services:
]

tgt-cfg0:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-cfg0
hostname: tgt-cfg0
ports: ["28000:28000"]
Expand All @@ -118,7 +118,7 @@ services:
]

tgt-rs00:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-rs00
hostname: tgt-rs00
ports: ["40000:40000"]
Expand All @@ -135,7 +135,7 @@ services:
]

tgt-rs10:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-rs10
hostname: tgt-rs10
ports: ["40100:40100"]
Expand All @@ -152,7 +152,7 @@ services:
]

tgt-rs20:
image: "${MONGO_IMAGE:-percona/percona-server-mongodb:8.0}"
image: "percona/percona-server-mongodb:${MONGO_VERSION:-8.0}"
container_name: tgt-rs20
hostname: tgt-rs20
ports: ["40200:40200"]
Expand Down
Loading
Loading