Skip to content

Commit

Permalink
Merge #73235
Browse files Browse the repository at this point in the history
73235: roachprod: fix node url parsing issue r=tbg a=healthy-pod

Passing node url without quoting it causes issues in parsing
it and results in ignoring some parameters.

This patch fixes this by quoting node url.

Release note: None

Fixes #73230 #73229 #73228 #73227 #73211

Co-authored-by: Ahmad Abedalqader <[email protected]>
  • Loading branch information
craig[bot] and Ahmad Abedalqader committed Nov 28, 2021
2 parents 3b30a0e + 4b8321f commit 2c014c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/cmd/roachtest/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2096,6 +2096,9 @@ func (c *clusterImpl) pgURLErr(
if err != nil {
return nil, err
}
for i, url := range urls {
urls[i] = strings.Trim(url, "'")
}
return urls, nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/roachprod/install/cockroach.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (c *SyncedCluster) NodeURL(host string, port int) string {
v.Add("sslmode", "disable")
}
u.RawQuery = v.Encode()
return u.String()
return "'" + u.String() + "'"
}

// NodePort returns the SQL port for the given node.
Expand Down

0 comments on commit 2c014c4

Please sign in to comment.