Skip to content

Commit

Permalink
test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pbibra committed Sep 10, 2024
1 parent 2398953 commit 821d868
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ require (
github.com/kr/text v0.2.0
github.com/mitchellh/mapstructure v1.5.0
github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249
github.com/slackhq/vitess-addons v0.19.0
github.com/slackhq/vitess-addons v0.19.0-vtops
github.com/slok/noglog v0.2.0
github.com/spf13/afero v1.11.0
github.com/spf13/jwalterweatherman v1.1.0
Expand Down
12 changes: 11 additions & 1 deletion go/cmd/vtorc/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package cli

import (
"io"
"os"
"os/exec"
"time"

Expand Down Expand Up @@ -75,7 +76,16 @@ func run(cmd *cobra.Command, args []string) {

log.Info("sleeping for 30s...\n")
time.Sleep(30 * time.Second)
vtopsCmd := exec.Command("/vt/v19/bin/vtops", "problems", "--hostname", "vtctld-dev-iad-wc2-jrda", "--raise", "--tablet", "tablet-iad-dev-loadtest-00-80-yq5s", "--problem", "orc-dead-tablet")

vtopsCmd := exec.Command("/vt/v19/bin/vtops", "problems", "--raise", "--tablet", "tablet-iad-dev-loadtest-00-80-yq5s", "--problem", "orc-dead-tablet")

vtopsCmd.Env = append(os.Environ(),
"HTTP_PROXY="+os.Getenv("VTOPS_HTTP_PROXY"),
"HTTPS_PROXY="+os.Getenv("VTOPS_HTTP_PROXY"),
"http_proxy="+os.Getenv("VTOPS_HTTP_PROXY"),
"https_proxy="+os.Getenv("VTOPS_HTTP_PROXY"),
)

// out, err := vtopsCmd.CombinedOutput()
// if err != nil {
// log.Errorf("Error executing vtops command for vtorc: %+v", err)
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vttablet/grpctmclient/cached_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,5 +334,5 @@ func (dialer *cachedConnDialer) Close() {
}

func getTabletAddr(tablet *topodatapb.Tablet) string {
return netutil.JoinHostPort(tablet.Hostname, int32(tablet.PortMap["grpc"]))
return netutil.JoinHostPort(tablet.Hostname+tempTinyspeckSuffix, int32(tablet.PortMap["grpc"]))
}
8 changes: 5 additions & 3 deletions go/vt/vttablet/grpctmclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const (
dialPoolGroupVTOrc
)

const tempTinyspeckSuffix = ".nebula.tinyspeck.com"

type invalidatorFunc func()

var (
Expand Down Expand Up @@ -152,7 +154,7 @@ func NewClient() *Client {

// dial returns a client to use
func (client *grpcClient) dial(ctx context.Context, tablet *topodatapb.Tablet) (tabletmanagerservicepb.TabletManagerClient, io.Closer, error) {
addr := netutil.JoinHostPort(tablet.Hostname, int32(tablet.PortMap["grpc"]))
addr := netutil.JoinHostPort(tablet.Hostname+tempTinyspeckSuffix, int32(tablet.PortMap["grpc"]))
opt, err := grpcclient.SecureDialOption(cert, key, ca, crl, name)
if err != nil {
return nil, nil, err
Expand All @@ -177,7 +179,7 @@ func (client *grpcClient) createTmc(addr string, opt grpc.DialOption) (*tmc, err
}

func (client *grpcClient) dialPool(ctx context.Context, tablet *topodatapb.Tablet) (tabletmanagerservicepb.TabletManagerClient, error) {
addr := netutil.JoinHostPort(tablet.Hostname, int32(tablet.PortMap["grpc"]))
addr := netutil.JoinHostPort(tablet.Hostname+tempTinyspeckSuffix, int32(tablet.PortMap["grpc"]))
opt, err := grpcclient.SecureDialOption(cert, key, ca, crl, name)
if err != nil {
return nil, err
Expand Down Expand Up @@ -210,7 +212,7 @@ func (client *grpcClient) dialPool(ctx context.Context, tablet *topodatapb.Table
}

func (client *grpcClient) dialDedicatedPool(ctx context.Context, dialPoolGroup DialPoolGroup, tablet *topodatapb.Tablet) (tabletmanagerservicepb.TabletManagerClient, invalidatorFunc, error) {
addr := netutil.JoinHostPort(tablet.Hostname, int32(tablet.PortMap["grpc"]))
addr := netutil.JoinHostPort(tablet.Hostname+tempTinyspeckSuffix, int32(tablet.PortMap["grpc"]))
opt, err := grpcclient.SecureDialOption(cert, key, ca, crl, name)
if err != nil {
return nil, nil, err
Expand Down

0 comments on commit 821d868

Please sign in to comment.