@@ -18,11 +18,13 @@ import (
1818 "database/sql"
1919 "errors"
2020 "fmt"
21+ "log"
2122 "net"
2223 "net/url"
2324 "os/exec"
2425 "path/filepath"
2526 "strconv"
27+ "strings"
2628)
2729
2830func (ts * testServerImpl ) isTenant () bool {
@@ -144,17 +146,22 @@ func (ts *testServerImpl) NewTenantServer(proxy bool) (TestServer, error) {
144146 "start-proxy" ,
145147 "--listen-addr" ,
146148 ts .proxyAddr ,
147- "--target-addr " ,
149+ "--routing-rule " ,
148150 sqlAddr ,
149151 "--listen-cert" ,
150152 filepath .Join (certsDir , "node.crt" ),
151153 "--listen-key" ,
152154 filepath .Join (certsDir , "node.key" ),
155+ "--listen-metrics=:0" ,
156+ "--skip-verify" ,
153157 }
154158 cmd := exec .Command (cockroachBinary , args ... )
155159 if err := cmd .Start (); err != nil {
156160 return "" , err
157161 }
162+ if cmd .Process != nil {
163+ log .Printf ("process %d started: %s" , cmd .Process .Pid , strings .Join (args , " " ))
164+ }
158165 ts .proxyProcess = cmd .Process
159166
160167 return ts .proxyAddr , nil
@@ -172,6 +179,7 @@ func (ts *testServerImpl) NewTenantServer(proxy bool) (TestServer, error) {
172179 fmt .Sprintf ("--tenant-id=%d" , tenantID ),
173180 "--kv-addrs=" + pgURL .Host ,
174181 "--sql-addr=" + sqlAddr ,
182+ "--http-addr=:0" ,
175183 }
176184
177185 tenant := & testServerImpl {
@@ -227,7 +235,7 @@ func (ts *testServerImpl) NewTenantServer(proxy bool) (TestServer, error) {
227235 tenantURL .Host = proxyAddr
228236 // Massage the query string. The proxy expects the magic cluster name 'prancing-pony'. We remove the client
229237 // certs since we won't be using them (and they don't work through the proxy anyway).
230- v .Add ("options" , "--cluster=prancing-pony" )
238+ v .Add ("options" , "--cluster=prancing-pony-2 " )
231239 }
232240
233241 // Client certs should not be used; we're using password auth.
0 commit comments