Skip to content

Commit

Permalink
Merge #114097
Browse files Browse the repository at this point in the history
114097: roachprod: remove default port assumption in start and start-sql r=srosenberg a=DarrylWong

Previously, the default sql port and admin ui port were set to 26257
and 26258 respectively in start and start-sql. This change now removes
that default assignment and now randomly assigns an available open port.

Many roachtests rely on this default port assumption and fail after this
change. To fix this, we now explicity specify the port when applicable.
Some roachtests use a third party library, where the port cannot be easily
passed in and is hardcoded. In these cases, we retain the previous behaviour
by specifying StartOpts.RoachprodOpts.SQLPort.

Epic: None
Fixes: #111052
Release note: none

Co-authored-by: DarrylWong <[email protected]>
  • Loading branch information
craig[bot] and DarrylWong committed Dec 13, 2023
2 parents 28457a0 + b9f2d19 commit c92d216
Show file tree
Hide file tree
Showing 60 changed files with 419 additions and 141 deletions.
10 changes: 0 additions & 10 deletions pkg/cmd/roachprod/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,16 +569,6 @@ environment variables to the cockroach process.
install.NumRacksOption(numRacks),
}

// Always pick a random available port when starting virtual
// clusters. We do not expose the functionality of choosing a
// specific port for separate-process deployments; for
// shared-process, the port will always be based on the system
// tenant service.
//
// TODO(renato): remove this once #111052 is addressed.
startOpts.SQLPort = 0
startOpts.AdminUIPort = 0

startOpts.Target = install.StartSharedProcessForVirtualCluster
if externalProcessNodes != "" {
startOpts.Target = install.StartServiceForVirtualCluster
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/roachtest/roachtestutil/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ go_library(
"//pkg/cmd/roachtest/cluster",
"//pkg/cmd/roachtest/option",
"//pkg/cmd/roachtest/test",
"//pkg/roachprod/config",
"//pkg/roachprod/install",
"//pkg/roachprod/logger",
"//pkg/testutils/sqlutils",
Expand Down
40 changes: 39 additions & 1 deletion pkg/cmd/roachtest/roachtestutil/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,48 @@

package roachtestutil

import "github.com/cockroachdb/cockroach/pkg/roachprod/install"
import (
"context"

"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
"github.com/cockroachdb/cockroach/pkg/roachprod/config"
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
"github.com/cockroachdb/cockroach/pkg/roachprod/logger"
)

// SystemInterfaceSystemdUnitName is a convenience function that
// returns the systemd unit name for the system interface
func SystemInterfaceSystemdUnitName() string {
return install.VirtualClusterLabel(install.SystemInterfaceName, 0)
}

// DefaultPGUrl is a wrapper over ExternalPGUrl that calls it with the arguments
// that *almost* all roachtests want: single tenant and only a single node.
// This wrapper will also make fixing #63145 in the future easier as we can
// add "password authenticated" to the above.
func DefaultPGUrl(
ctx context.Context, c cluster.Cluster, l *logger.Logger, node option.NodeListOption,
) (string, error) {
pgurl, err := c.ExternalPGUrl(ctx, l, node, "", 0)
if err != nil {
return "", err
}
return pgurl[0], nil
}

// SetDefaultSQLPort sets the SQL port to the default of 26257 if it is
// a non-local cluster. Local clusters don't support changing the port.
func SetDefaultSQLPort(c cluster.Cluster, opts install.StartOpts) {
if !c.IsLocal() {
opts.SQLPort = config.DefaultSQLPort
}
}

// SetDefaultAdminUIPort sets the AdminUI port to the default of 26258 if it is
// a non-local cluster. Local clusters don't support changing the port.
func SetDefaultAdminUIPort(c cluster.Cluster, opts install.StartOpts) {
if !c.IsLocal() {
opts.AdminUIPort = config.DefaultAdminUIPort
}
}
5 changes: 4 additions & 1 deletion pkg/cmd/roachtest/tests/activerecord.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
"github.com/cockroachdb/cockroach/pkg/roachprod/config"
rperrors "github.com/cockroachdb/cockroach/pkg/roachprod/errors"
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
"github.com/cockroachdb/errors"
Expand All @@ -48,7 +49,9 @@ func registerActiveRecord(r registry.Registry) {
}
node := c.Node(1)
t.Status("setting up cockroach")
c.Start(ctx, t.L(), option.DefaultStartOptsInMemory(), install.MakeClusterSettings(), c.All())
startOpts := option.DefaultStartOptsInMemory()
startOpts.RoachprodOpts.SQLPort = config.DefaultSQLPort
c.Start(ctx, t.L(), startOpts, install.MakeClusterSettings(), c.All())

version, err := fetchCockroachVersion(ctx, t.L(), c, node[0])
if err != nil {
Expand Down
7 changes: 6 additions & 1 deletion pkg/cmd/roachtest/tests/admission_control_database_drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/clusterupgrade"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
Expand Down Expand Up @@ -94,7 +95,9 @@ func registerDatabaseDrop(r registry.Registry) {
runTPCE(ctx, t, c, tpceOptions{
start: func(ctx context.Context, t test.Test, c cluster.Cluster) {
settings := install.MakeClusterSettings(install.NumRacksOption(crdbNodes))
if err := c.StartE(ctx, t.L(), option.DefaultStartOptsNoBackups(), settings, c.Range(1, crdbNodes)); err != nil {
startOpts := option.DefaultStartOptsNoBackups()
roachtestutil.SetDefaultSQLPort(c, startOpts.RoachprodOpts)
if err := c.StartE(ctx, t.L(), startOpts, settings, c.Range(1, crdbNodes)); err != nil {
t.Fatal(err)
}
},
Expand Down Expand Up @@ -196,6 +199,8 @@ func registerDatabaseDrop(r registry.Registry) {
runTPCE(ctx, t, c, tpceOptions{
start: func(ctx context.Context, t test.Test, c cluster.Cluster) {
startOpts := option.DefaultStartOptsNoBackups()
roachtestutil.SetDefaultSQLPort(c, startOpts.RoachprodOpts)
roachtestutil.SetDefaultAdminUIPort(c, startOpts.RoachprodOpts)
settings := install.MakeClusterSettings(install.NumRacksOption(crdbNodes))
if err := c.StartE(ctx, t.L(), startOpts, settings, c.Range(1, crdbNodes)); err != nil {
t.Fatal(err)
Expand Down
2 changes: 2 additions & 0 deletions pkg/cmd/roachtest/tests/admission_control_elastic_io.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/grafana"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
Expand Down Expand Up @@ -70,6 +71,7 @@ func registerElasticIO(r registry.Registry) {

c.Put(ctx, t.DeprecatedWorkload(), "./workload", c.Node(workAndPromNode))
startOpts := option.DefaultStartOptsNoBackups()
roachtestutil.SetDefaultAdminUIPort(c, startOpts.RoachprodOpts)
startOpts.RoachprodOpts.ExtraArgs = append(startOpts.RoachprodOpts.ExtraArgs,
"--vmodule=io_load_listener=2")
settings := install.MakeClusterSettings()
Expand Down
7 changes: 6 additions & 1 deletion pkg/cmd/roachtest/tests/admission_control_index_backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/clusterupgrade"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
Expand Down Expand Up @@ -93,7 +94,9 @@ func registerIndexBackfill(r registry.Registry) {
// is not running.
c.Run(ctx, c.All(), fmt.Sprintf("cp %s ./cockroach", path))
settings := install.MakeClusterSettings(install.NumRacksOption(crdbNodes))
if err := c.StartE(ctx, t.L(), option.DefaultStartOptsNoBackups(), settings, c.Range(1, crdbNodes)); err != nil {
startOpts := option.DefaultStartOptsNoBackups()
roachtestutil.SetDefaultSQLPort(c, startOpts.RoachprodOpts)
if err := c.StartE(ctx, t.L(), startOpts, settings, c.Range(1, crdbNodes)); err != nil {
t.Fatal(err)
}
},
Expand Down Expand Up @@ -150,6 +153,8 @@ func registerIndexBackfill(r registry.Registry) {
runTPCE(ctx, t, c, tpceOptions{
start: func(ctx context.Context, t test.Test, c cluster.Cluster) {
startOpts := option.DefaultStartOptsNoBackups()
roachtestutil.SetDefaultSQLPort(c, startOpts.RoachprodOpts)
roachtestutil.SetDefaultAdminUIPort(c, startOpts.RoachprodOpts)
settings := install.MakeClusterSettings(install.NumRacksOption(crdbNodes))
if err := c.StartE(ctx, t.L(), startOpts, settings, c.Range(1, crdbNodes)); err != nil {
t.Fatal(err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/grafana"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
Expand Down Expand Up @@ -70,6 +71,8 @@ func registerIntentResolutionOverload(r registry.Registry) {
startOpts := option.DefaultStartOptsNoBackups()
startOpts.RoachprodOpts.ExtraArgs = append(startOpts.RoachprodOpts.ExtraArgs,
"--vmodule=io_load_listener=2")
roachtestutil.SetDefaultSQLPort(c, startOpts.RoachprodOpts)
roachtestutil.SetDefaultAdminUIPort(c, startOpts.RoachprodOpts)
settings := install.MakeClusterSettings()
c.Start(ctx, t.L(), startOpts, settings, c.Range(1, crdbNodes))
setAdmissionControl(ctx, t, c, true)
Expand Down
22 changes: 16 additions & 6 deletions pkg/cmd/roachtest/tests/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/clusterstats"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
Expand All @@ -47,11 +48,17 @@ func registerAllocator(r registry.Registry) {
db := c.Conn(ctx, t.L(), 1)
defer db.Close()

pgurl, err := roachtestutil.DefaultPGUrl(ctx, c, t.L(), c.Nodes(1))
if err != nil {
t.Fatal(err)
}

m := c.NewMonitor(ctx, c.Range(1, start))
m.Go(func(ctx context.Context) error {
t.Status("loading fixture")
if err := c.RunE(
ctx, c.Node(1), "./cockroach", "workload", "fixtures", "import", "tpch", "--scale-factor", "10",
ctx, c.Node(1),
"./cockroach", "workload", "fixtures", "import", "tpch", "--scale-factor", "10", pgurl,
); err != nil {
t.Fatal(err)
}
Expand All @@ -66,7 +73,7 @@ func registerAllocator(r registry.Registry) {
WithCluster(clusNodes.InstallNodes()).
WithPrometheusNode(promNode.InstallNodes()[0])

err := c.StartGrafana(ctx, t.L(), cfg)
err = c.StartGrafana(ctx, t.L(), cfg)
require.NoError(t, err)

cleanupFunc := func() {
Expand All @@ -84,14 +91,13 @@ func registerAllocator(r registry.Registry) {

// Start the remaining nodes to kick off upreplication/rebalancing.
c.Start(ctx, t.L(), startOpts, install.MakeClusterSettings(), c.Range(start+1, nodes))

c.Run(ctx, c.Node(1), `./cockroach workload init kv --drop`)
c.Run(ctx, c.Node(1), fmt.Sprintf("./cockroach workload init kv --drop '%s'", pgurl))
for node := 1; node <= nodes; node++ {
node := node
// TODO(dan): Ideally, the test would fail if this queryload failed,
// but we can't put it in monitor as-is because the test deadlocks.
go func() {
const cmd = `./cockroach workload run kv --tolerate-errors --min-block-bytes=8 --max-block-bytes=127`
cmd := fmt.Sprintf("./cockroach workload run kv --tolerate-errors --min-block-bytes=8 --max-block-bytes=127 {pgurl%s}", c.Node(node))
l, err := t.L().ChildLogger(fmt.Sprintf(`kv-%d`, node))
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -451,9 +457,13 @@ FROM crdb_internal.kv_store_status
t.Fatalf("expected 0 mis-replicated ranges, but found %d", n)
}

pgurl, err := roachtestutil.DefaultPGUrl(ctx, c, t.L(), c.Nodes(1))
if err != nil {
t.Fatal(err)
}
decom := func(id int) {
c.Run(ctx, c.Node(1),
fmt.Sprintf("./cockroach node decommission --insecure --wait=none %d", id))
fmt.Sprintf("./cockroach node decommission --insecure --url=%s --wait=none %d", pgurl, id))
}

// Decommission a node. The ranges should down-replicate to 7 replicas.
Expand Down
9 changes: 7 additions & 2 deletions pkg/cmd/roachtest/tests/alterpk.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
Expand Down Expand Up @@ -104,10 +105,14 @@ func registerAlterPK(r registry.Registry) {
const duration = 10 * time.Minute

roachNodes, loadNode := setupTest(ctx, t, c)

pgurl, err := roachtestutil.DefaultPGUrl(ctx, c, t.L(), c.Node(1))
if err != nil {
t.Fatal(err)
}
cmd := fmt.Sprintf(
"./cockroach workload fixtures import tpcc --warehouses=%d --db=tpcc",
"./cockroach workload fixtures import tpcc --warehouses=%d --db=tpcc '%s'",
warehouses,
pgurl,
)
if err := c.RunE(ctx, c.Node(roachNodes[0]), cmd); err != nil {
t.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/tests/asyncpg.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
const asyncpgRunTestCmd = `
source venv/bin/activate &&
cd /mnt/data1/asyncpg &&
PGPORT=26257 PGHOST=localhost PGUSER=root PGDATABASE=defaultdb python3 setup.py test > asyncpg.stdout
PGPORT={pgport:1} PGHOST=localhost PGUSER=root PGDATABASE=defaultdb python3 setup.py test > asyncpg.stdout
`

var asyncpgReleaseTagRegex = regexp.MustCompile(`^(?P<major>v\d+)\.(?P<minor>\d+)\.(?P<point>\d+)$`)
Expand Down
8 changes: 6 additions & 2 deletions pkg/cmd/roachtest/tests/autoupgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
"github.com/cockroachdb/cockroach/pkg/testutils"
Expand Down Expand Up @@ -73,9 +74,12 @@ func registerAutoUpgrade(r registry.Registry) {

decommissionAndStop := func(node int) error {
t.WorkerStatus("decommission")
port := fmt.Sprintf("{pgport:%d}", node)
pgurl, err := roachtestutil.DefaultPGUrl(ctx, c, t.L(), c.Node(node))
if err != nil {
return err
}
if err := c.RunE(ctx, c.Node(node),
fmt.Sprintf("./cockroach node decommission %d --insecure --port=%s", node, port)); err != nil {
fmt.Sprintf("./cockroach node decommission %d --insecure --url=%s", node, pgurl)); err != nil {
return err
}
t.WorkerStatus("stop")
Expand Down
6 changes: 5 additions & 1 deletion pkg/cmd/roachtest/tests/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,15 @@ func registerBackup(r registry.Registry) {
m := c.NewMonitor(ctx)
m.Go(func(ctx context.Context) error {
t.Status(`running backup`)
pgurl, err := roachtestutil.DefaultPGUrl(ctx, c, t.L(), c.Node(1))
if err != nil {
return err
}
// Tick once before starting the backup, and once after to capture the
// total elapsed time. This is used by roachperf to compute and display
// the average MB/sec per node.
tick()
c.Run(ctx, c.Node(1), `./cockroach sql --insecure -e "
c.Run(ctx, c.Node(1), `./cockroach sql --insecure --url=`+pgurl+` -e "
BACKUP bank.bank TO 'gs://`+backupTestingBucket+`/`+dest+`?AUTH=implicit'"`)
tick()

Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/tests/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ func newCDCTester(ctx context.Context, t test.Test, c cluster.Cluster) cdcTester
}
tester.logger = changefeedLogger

startOpts, settings := makeCDCBenchOptions()
startOpts, settings := makeCDCBenchOptions(c)

// With a target_duration of 10s, we won't see slow span logs from changefeeds untils we are > 100s
// behind, which is well above the 60s targetSteadyLatency we have in some tests.
Expand Down
10 changes: 7 additions & 3 deletions pkg/cmd/roachtest/tests/cdc_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
"github.com/cockroachdb/cockroach/pkg/jobs"
Expand Down Expand Up @@ -167,7 +168,7 @@ func formatSI(num int64) string {
}

// makeCDCBenchOptions creates common cluster options for CDC benchmarks.
func makeCDCBenchOptions() (option.StartOpts, install.ClusterSettings) {
func makeCDCBenchOptions(c cluster.Cluster) (option.StartOpts, install.ClusterSettings) {
opts := option.DefaultStartOpts()
settings := install.MakeClusterSettings()
settings.ClusterSettings["kv.rangefeed.enabled"] = "true"
Expand Down Expand Up @@ -209,6 +210,9 @@ func makeCDCBenchOptions() (option.StartOpts, install.ClusterSettings) {
// Scheduled backups may interfere with performance, disable them.
opts.RoachprodOpts.ScheduleBackups = false

// Prom helpers assume AdminUIPort is at 26258
roachtestutil.SetDefaultAdminUIPort(c, opts.RoachprodOpts)

// Backpressure writers when rangefeed clients can't keep up. This gives more
// reliable results, since we can otherwise randomly hit timeouts and incur
// catchup scans.
Expand Down Expand Up @@ -248,7 +252,7 @@ func runCDCBenchScan(

// Start data nodes first to place data on them. We'll start the changefeed
// coordinator later, since we don't want any data on it.
opts, settings := makeCDCBenchOptions()
opts, settings := makeCDCBenchOptions(c)

switch protocol {
case cdcBenchMuxProtocol:
Expand Down Expand Up @@ -408,7 +412,7 @@ func runCDCBenchWorkload(

// Start data nodes first to place data on them. We'll start the changefeed
// coordinator later, since we don't want any data on it.
opts, settings := makeCDCBenchOptions()
opts, settings := makeCDCBenchOptions(c)
settings.ClusterSettings["kv.rangefeed.enabled"] = strconv.FormatBool(cdcEnabled)

switch protocol {
Expand Down
Loading

0 comments on commit c92d216

Please sign in to comment.