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

endtoend: Remove usage of deprecated terminology #15827

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docker_build_old_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: true
matrix:
branch: [ latest, mysql57, percona57, percona80 ]
branch: [ latest, percona80 ]

steps:
- name: Check out code
Expand Down Expand Up @@ -256,4 +256,4 @@ jobs:
tags: ${{ env.DOCKER_TAG_DEFAULT_DEBIAN }}
build-args: |
VT_BASE_VER=${{ env.TAG_NAME }}
DEBIAN_VER=${{ matrix.debian }}-slim
DEBIAN_VER=${{ matrix.debian }}-slim
4 changes: 2 additions & 2 deletions .github/workflows/docker_build_vttestserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: true
matrix:
branch: [ mysql57, mysql80 ]
branch: [ mysql80 ]

steps:
- name: Check out code
Expand Down Expand Up @@ -62,4 +62,4 @@ jobs:
context: .
file: ${{ env.DOCKERFILE }}
push: true
tags: ${{ env.DOCKER_TAG }}
tags: ${{ env.DOCKER_TAG }}
13 changes: 2 additions & 11 deletions doc/DockerBuild.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,10 @@ Then you can run our build script for the `lite` image which extracts the Vitess
or [vendor.json](https://github.com/vitessio/vitess/blob/main/vendor/vendor.json),
for example to add new dependencies. If you do need it then build the
bootstrap image, otherwise pull the image using one of the following
commands depending on the MySQL flavor you want:
command.

```sh
vitess$ docker pull vitess/bootstrap:mysql57 # MySQL Community Edition 5.7
vitess$ docker pull vitess/bootstrap:mysql56 # MySQL Community Edition 5.6
vitess$ docker pull vitess/bootstrap:percona57 # Percona Server 5.7
vitess$ docker pull vitess/bootstrap:percona # Percona Server
vitess$ docker pull vitess/bootstrap:latest
```

**Note:** If you have already downloaded the `vitess/bootstrap:<flavor>`
Expand All @@ -41,14 +38,8 @@ Then you can run our build script for the `lite` image which extracts the Vitess
This will run a script that extracts from `vitess/bootstrap` only the files
needed to run Vitess.

Choose one of the following commands (the command without suffix builds
the default image containing MySQL 5.7):

```sh
vitess$ make docker_lite
vitess$ make docker_lite_mysql56
vitess$ make docker_lite_percona57
vitess$ make docker_lite_percona
```

1. Re-tag the image under your personal repository, then upload it.
Expand Down
2 changes: 1 addition & 1 deletion docker/local/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get install -y sudo curl vim jq

# Install dependencies
COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh
RUN /vt/dist/install_dependencies.sh mysql57
RUN /vt/dist/install_dependencies.sh mysql80

COPY docker/local/install_local_dependencies.sh /vt/dist/install_local_dependencies.sh
RUN /vt/dist/install_local_dependencies.sh
Expand Down
10 changes: 5 additions & 5 deletions docker/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
#
# Examples:
# a) Start an interactive shell within the Docker image.
# $ docker/test/run.sh mysql57 bash
# $ docker/test/run.sh mysql80 bash
#
# b) Build the code and run a test.
# $ docker/test/run.sh mysql57 "make build && ./test/keyrange_test.py -v"
# $ docker/test/run.sh mysql80 "make build && ./test/keyrange_test.py -v"
#
# c) Cache the output of the command e.g. cache "make build" as we do for Travis CI.
# $ docker/test/run.sh --create_docker_cache vitess/bootstrap:rm_mysql57_test_cache_do_NOT_push mysql57 "make build"
# c) Cache the output of the command e.g. cache "make build" as we do for CI.
# $ docker/test/run.sh --create_docker_cache vitess/bootstrap:rm_mysql80_test_cache_do_NOT_push mysql80 "make build"
#
# d) Run the test using a cache image.
# $ docker/test/run.sh --use_docker_cache vitess/bootstrap:rm_mysql57_test_cache_do_NOT_push mysql57 "./test/keyrange_test.py -v"
# $ docker/test/run.sh --use_docker_cache vitess/bootstrap:rm_mysql80_test_cache_do_NOT_push mysql80 "./test/keyrange_test.py -v"


# Functions.
Expand Down
61 changes: 0 additions & 61 deletions docker/vttestserver/Dockerfile.mysql57

This file was deleted.

6 changes: 3 additions & 3 deletions go/test/endtoend/reparent/emergencyreparent/ers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,12 @@ func TestNoReplicationStatusAndIOThreadStopped(t *testing.T) {
tablets := clusterInstance.Keyspaces[0].Shards[0].Vttablets
utils.ConfirmReplication(t, tablets[0], []*cluster.Vttablet{tablets[1], tablets[2], tablets[3]})

err := clusterInstance.VtctldClientProcess.ExecuteCommand("ExecuteFetchAsDBA", tablets[1].Alias, `STOP SLAVE`)
err := clusterInstance.VtctldClientProcess.ExecuteCommand("ExecuteFetchAsDBA", tablets[1].Alias, `STOP REPLICA`)
require.NoError(t, err)
err = clusterInstance.VtctldClientProcess.ExecuteCommand("ExecuteFetchAsDBA", tablets[1].Alias, `RESET SLAVE ALL`)
err = clusterInstance.VtctldClientProcess.ExecuteCommand("ExecuteFetchAsDBA", tablets[1].Alias, `RESET REPLICA ALL`)
require.NoError(t, err)
//
err = clusterInstance.VtctldClientProcess.ExecuteCommand("ExecuteFetchAsDBA", tablets[3].Alias, `STOP SLAVE IO_THREAD;`)
err = clusterInstance.VtctldClientProcess.ExecuteCommand("ExecuteFetchAsDBA", tablets[3].Alias, `STOP REPLICA IO_THREAD;`)
require.NoError(t, err)
// Run an additional command in the current primary which will only be acked by tablets[2] and be in its relay log.
insertedVal := utils.ConfirmReplication(t, tablets[0], nil)
Expand Down
14 changes: 7 additions & 7 deletions go/test/endtoend/reparent/plannedreparent/reparent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func TestPRSWithDrainedLaggingTablet(t *testing.T) {
utils.ConfirmReplication(t, tablets[0], []*cluster.Vttablet{tablets[1], tablets[2], tablets[3]})

// make tablets[1 lag from the other tablets by setting the delay to a large number
utils.RunSQLs(context.Background(), t, []string{`stop slave`, `CHANGE MASTER TO MASTER_DELAY = 1999`, `start slave;`}, tablets[1])
utils.RunSQLs(context.Background(), t, []string{`stop replica`, `CHANGE REPLICATION SOURCE TO SOURCE_DELAY = 1999`, `start replica;`}, tablets[1])

// insert another row in tablets[1
utils.ConfirmReplication(t, tablets[0], []*cluster.Vttablet{tablets[2], tablets[3]})
Expand Down Expand Up @@ -224,7 +224,7 @@ func reparentFromOutside(t *testing.T, clusterInstance *cluster.LocalProcessClus
}

// commands to convert a replica to be writable
promoteReplicaCommands := []string{"STOP SLAVE", "RESET SLAVE ALL", "SET GLOBAL read_only = OFF"}
promoteReplicaCommands := []string{"STOP REPLICA", "RESET REPLICA ALL", "SET GLOBAL read_only = OFF"}
utils.RunSQLs(ctx, t, promoteReplicaCommands, tablets[1])

// Get primary position
Expand All @@ -233,9 +233,9 @@ func reparentFromOutside(t *testing.T, clusterInstance *cluster.LocalProcessClus
// tablets[0] will now be a replica of tablets[1
changeReplicationSourceCommands := []string{
"RESET MASTER",
"RESET SLAVE",
"RESET REPLICA",
fmt.Sprintf("SET GLOBAL gtid_purged = '%s'", gtID),
fmt.Sprintf("CHANGE MASTER TO MASTER_HOST='%s', MASTER_PORT=%d, MASTER_USER='vt_repl', MASTER_AUTO_POSITION = 1", utils.Hostname, tablets[1].MySQLPort),
fmt.Sprintf("CHANGE REPLICATION SOURCE TO SOURCE_HOST='%s', SOURCE_PORT=%d, SOURCE_USER='vt_repl', SOURCE_AUTO_POSITION = 1", utils.Hostname, tablets[1].MySQLPort),
}
utils.RunSQLs(ctx, t, changeReplicationSourceCommands, tablets[0])

Expand All @@ -244,11 +244,11 @@ func reparentFromOutside(t *testing.T, clusterInstance *cluster.LocalProcessClus

// tablets[2 will be a replica of tablets[1
changeReplicationSourceCommands = []string{
"STOP SLAVE",
"STOP REPLICA",
"RESET MASTER",
fmt.Sprintf("SET GLOBAL gtid_purged = '%s'", gtID),
fmt.Sprintf("CHANGE MASTER TO MASTER_HOST='%s', MASTER_PORT=%d, MASTER_USER='vt_repl', MASTER_AUTO_POSITION = 1", utils.Hostname, tablets[1].MySQLPort),
"START SLAVE",
fmt.Sprintf("CHANGE REPLICATION SOURCE TO SOURCE_HOST='%s', SOURCE_PORT=%d, SOURCE_USER='vt_repl', SOURCE_AUTO_POSITION = 1", utils.Hostname, tablets[1].MySQLPort),
"START REPLICA",
}
utils.RunSQLs(ctx, t, changeReplicationSourceCommands, tablets[2])

Expand Down
4 changes: 2 additions & 2 deletions go/test/endtoend/reparent/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ func WaitForReplicationToStart(t *testing.T, clusterInstance *cluster.LocalProce

// CheckReplicaStatus checks the replication status and asserts that the replication is stopped
func CheckReplicaStatus(ctx context.Context, t *testing.T, tablet *cluster.Vttablet) {
qr := RunSQL(ctx, t, "show slave status", tablet)
qr := RunSQL(ctx, t, "show replica status", tablet)
IOThreadRunning := fmt.Sprintf("%v", qr.Rows[0][10])
SQLThreadRunning := fmt.Sprintf("%v", qr.Rows[0][10])
assert.Equal(t, IOThreadRunning, "VARCHAR(\"No\")")
Expand Down Expand Up @@ -765,7 +765,7 @@ func SetReplicationSourceFailed(tablet *cluster.Vttablet, prsOut string) bool {

// CheckReplicationStatus checks that the replication for sql and io threads is setup as expected
func CheckReplicationStatus(ctx context.Context, t *testing.T, tablet *cluster.Vttablet, sqlThreadRunning bool, ioThreadRunning bool) {
res := RunSQL(ctx, t, "show slave status", tablet)
res := RunSQL(ctx, t, "show replica status", tablet)
if ioThreadRunning {
require.Equal(t, "Yes", res.Rows[0][10].ToString())
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

var (
demoteQueries = []string{"SET GLOBAL read_only = ON", "FLUSH TABLES WITH READ LOCK", "UNLOCK TABLES"}
promoteQueries = []string{"STOP SLAVE", "RESET SLAVE ALL", "SET GLOBAL read_only = OFF"}
promoteQueries = []string{"STOP REPLICA", "RESET REPLICA ALL", "SET GLOBAL read_only = OFF"}

hostname = "localhost"
)
Expand Down Expand Up @@ -73,11 +73,11 @@ func failoverExternalReparenting(t *testing.T, clusterInstance *cluster.LocalPro
// Use 'localhost' as hostname because Travis CI worker hostnames
// are too long for MySQL replication.
changeSourceCommands := []string{
"STOP SLAVE",
"STOP REPLICA",
"RESET MASTER",
fmt.Sprintf("SET GLOBAL gtid_purged = '%s'", gtID),
fmt.Sprintf("CHANGE MASTER TO MASTER_HOST='%s', MASTER_PORT=%d, MASTER_USER='vt_repl', MASTER_AUTO_POSITION = 1", "localhost", newPrimary.MySQLPort),
"START SLAVE",
fmt.Sprintf("CHANGE REPLICATION SOURCE TO SOURCE_HOST='%s', SOURCE_PORT=%d, SOURCE_USER='vt_repl', SOURCE_AUTO_POSITION = 1", "localhost", newPrimary.MySQLPort),
"START REPLICA",
}
err = oldPrimary.VttabletProcess.QueryTabletMultiple(changeSourceCommands, keyspaceUnshardedName, true)
require.NoError(t, err)
Expand Down
8 changes: 4 additions & 4 deletions go/test/endtoend/tabletgateway/vtgate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ func TestVtgateReplicationStatusCheck(t *testing.T) {
}
}()
// Stop replication on the non-PRIMARY tablets.
_, err = clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ExecuteFetchAsDBA", clusterInstance.Keyspaces[0].Shards[0].Replica().Alias, "stop slave")
_, err = clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ExecuteFetchAsDBA", clusterInstance.Keyspaces[0].Shards[0].Replica().Alias, "stop replica")
require.NoError(t, err)
_, err = clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ExecuteMultiFetchAsDBA", clusterInstance.Keyspaces[0].Shards[0].Rdonly().Alias, "stop slave")
_, err = clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ExecuteMultiFetchAsDBA", clusterInstance.Keyspaces[0].Shards[0].Rdonly().Alias, "stop replica")
require.NoError(t, err)
// Restart replication afterward as the cluster is re-used.
defer func() {
_, err = clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ExecuteFetchAsDBA", clusterInstance.Keyspaces[0].Shards[0].Replica().Alias, "start slave")
_, err = clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ExecuteFetchAsDBA", clusterInstance.Keyspaces[0].Shards[0].Replica().Alias, "start replica")
require.NoError(t, err)
// Testing ExecuteMultiFetchAsDBA by running multiple commands in a single call:
_, err = clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ExecuteMultiFetchAsDBA", clusterInstance.Keyspaces[0].Shards[0].Rdonly().Alias, "start slave sql_thread; start slave io_thread;")
_, err = clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ExecuteMultiFetchAsDBA", clusterInstance.Keyspaces[0].Shards[0].Rdonly().Alias, "start replica sql_thread; start replica io_thread;")
require.NoError(t, err)
}()
time.Sleep(2 * time.Second) // Build up some replication lag
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/tabletmanager/tablet_health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func TestHealthCheck(t *testing.T) {

// Make sure the primary is still primary
checkTabletType(t, primaryTablet.Alias, "PRIMARY")
utils.Exec(t, conn, "stop slave")
utils.Exec(t, conn, "stop replica")

// stop replication, make sure we don't go unhealthy.
err = clusterInstance.VtctldClientProcess.ExecuteCommand("StopReplication", rTablet.Alias)
Expand Down
6 changes: 3 additions & 3 deletions go/test/endtoend/tabletmanager/tablet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ func TestResetReplicationParameters(t *testing.T) {
require.NoError(t, err)

// Set a replication source on the tablet and start replication
err = tablet.VttabletProcess.QueryTabletMultiple([]string{"stop slave", "change master to master_host = 'localhost', master_port = 123", "start slave"}, keyspaceName, false)
err = tablet.VttabletProcess.QueryTabletMultiple([]string{"stop replica", "change replication source to source_host = 'localhost', source_port = 123", "start replica"}, keyspaceName, false)
require.NoError(t, err)

// Check the replica status.
res, err := tablet.VttabletProcess.QueryTablet("show slave status", keyspaceName, false)
res, err := tablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false)
require.NoError(t, err)
// This is expected to return 1 row result
require.Len(t, res.Rows, 1)
Expand All @@ -96,7 +96,7 @@ func TestResetReplicationParameters(t *testing.T) {
require.NoError(t, err)

// Recheck the replica status and this time is should be empty
res, err = tablet.VttabletProcess.QueryTablet("show slave status", keyspaceName, false)
res, err = tablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false)
require.NoError(t, err)
require.Len(t, res.Rows, 0)
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ GRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD
GRANT SELECT, UPDATE, DELETE, DROP
ON performance_schema.* TO 'vt_monitoring'@'localhost';

RESET SLAVE ALL;
RESET REPLICA ALL;
RESET MASTER;

# custom sql is used to add custom scripts like creating users/passwords. We use it in our tests
Expand Down
20 changes: 10 additions & 10 deletions go/test/endtoend/vtorc/general/vtorc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@ func TestVTOrcRepairs(t *testing.T) {
utils.WaitForSuccessfulRecoveryCount(t, vtOrcProcess, logic.FixReplicaRecoveryName, 2)

// Stop just the IO thread on the replica
_, err = utils.RunSQL(t, "STOP SLAVE IO_THREAD", replica, "")
_, err = utils.RunSQL(t, "STOP REPLICA IO_THREAD", replica, "")
require.NoError(t, err)

// check replication is setup correctly
utils.CheckReplication(t, clusterInfo, curPrimary, []*cluster.Vttablet{replica, otherReplica}, 15*time.Second)
utils.WaitForSuccessfulRecoveryCount(t, vtOrcProcess, logic.FixReplicaRecoveryName, 3)

// Stop just the SQL thread on the replica
_, err = utils.RunSQL(t, "STOP SLAVE SQL_THREAD", replica, "")
_, err = utils.RunSQL(t, "STOP REPLICA SQL_THREAD", replica, "")
require.NoError(t, err)

// check replication is setup correctly
Expand All @@ -191,10 +191,10 @@ func TestVTOrcRepairs(t *testing.T) {
t.Run("ReplicationFromOtherReplica", func(t *testing.T) {
// point replica at otherReplica
changeReplicationSourceCommands := []string{
"STOP SLAVE",
"RESET SLAVE ALL",
fmt.Sprintf("CHANGE MASTER TO MASTER_HOST='%s', MASTER_PORT=%d, MASTER_USER='vt_repl', MASTER_AUTO_POSITION = 1", utils.Hostname, otherReplica.MySQLPort),
"START SLAVE",
"STOP REPLICA",
"RESET REPLICA ALL",
fmt.Sprintf("CHANGE REPLICATION SOURCE TO SOURCE_HOST='%s', SOURCE_PORT=%d, SOURCE_USER='vt_repl', SOURCE_AUTO_POSITION = 1", utils.Hostname, otherReplica.MySQLPort),
"START REPLICA",
}
err := utils.RunSQLs(t, changeReplicationSourceCommands, replica, "")
require.NoError(t, err)
Expand All @@ -210,10 +210,10 @@ func TestVTOrcRepairs(t *testing.T) {
t.Run("CircularReplication", func(t *testing.T) {
// change the replication source on the primary
changeReplicationSourceCommands := []string{
"STOP SLAVE",
"RESET SLAVE ALL",
fmt.Sprintf("CHANGE MASTER TO MASTER_HOST='%s', MASTER_PORT=%d, MASTER_USER='vt_repl', MASTER_AUTO_POSITION = 1", replica.VttabletProcess.TabletHostname, replica.MySQLPort),
"START SLAVE",
"STOP REPLICA",
"RESET REPLICA ALL",
fmt.Sprintf("CHANGE REPLICATION SOURCE TO SOURCE_HOST='%s', SOURCE_PORT=%d, SOURCE_USER='vt_repl', SOURCE_AUTO_POSITION = 1", replica.VttabletProcess.TabletHostname, replica.MySQLPort),
"START REPLICA",
}
err := utils.RunSQLs(t, changeReplicationSourceCommands, curPrimary, "")
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions go/test/endtoend/vtorc/readtopologyinstance/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ func TestReadTopologyInstanceBufferable(t *testing.T) {
// After this we restart the replication and enable the recoveries again.
err = logic.DisableRecovery()
require.NoError(t, err)
err = utils.RunSQLs(t, []string{`STOP SLAVE;`,
err = utils.RunSQLs(t, []string{`STOP REPLICA;`,
`SET GTID_NEXT="12345678-1234-1234-1234-123456789012:1";`,
`BEGIN;`, `COMMIT;`,
`SET GTID_NEXT="AUTOMATIC";`,
`START SLAVE;`,
`START REPLICA;`,
}, replica, "")
require.NoError(t, err)
err = logic.EnableRecovery()
Expand Down
Loading
Loading