Skip to content

Commit

Permalink
Merge #72641
Browse files Browse the repository at this point in the history
72641: release-21.2: roachprod: backport changes from master as of 2021-11-11 r=RaduBerinde a=RaduBerinde

This PR backports all changes involving roachprod as of 2021-11-11. There have been large refactorings which we want to backport, or it will make backporting any future necessary roachtest fixes much harder. We also want new upcoming features around multi-tenancy available for 21.2.

CC @cockroachdb/release 

#### roachprod/vm/aws: improve help text for multiple stores

```bash
roachprod create ajwerner-test -n1 --clouds aws \
--aws-ebs-volume='{"VolumeType": "io2", "VolumeSize": 213, "Iops": 321}' \
--aws-ebs-volume='{"VolumeType": "io2", "VolumeSize": 213, "Iops": 321}' \
--aws-enable-multiple-stores=true
roachprod stage ajwerner-test cockroach
roachprod start ajwerner-test --store-count 2
```

The above commands will create a node with multiple stores and start cockroach
on them. Hopefully these minor help changes make that clearer.

Release note: None

#### roachprod: add stageurl command

Sometimes it is useful to be able to download these artifacts
directly. For example, when trying to bisect a problem. But, the URL
can take a second to remember the format of.

The stageurl command prints the staging URL of the given application.

I've reorganized some of the code to reduce duplication between the
stage and stageurl command. There is still more duplication than I
would like. But I figured I would see if this seems useful to others
before further refactoring.

Release note: None

#### roachprod: clean up roachprod ssh keys in aws

Many SSH keys created by roachprod are no longer used, and some were created by former employees.

This needed to change because it's a security issue that former employees may exploit.

This patch adds another step to roachprod-gc cronjob to tag any untagged keys created by roachprod in AWS and delete them if they are unused.

Release note: None

#### roachprod: upgrade Azure Ubuntu image to 20.04

Previously, currently used Ubuntu 18.04 doesn't support `systemd-run
--same-dir`, which is used by some roachprod scripts. Additionally, GCE
and AWS already use Ubuntu 20.04 based images for roachprod.

Updating the base image to Ubuntu 20.04 fixes the issue above and aligns
the version with other cloud providers.

Release note: None

#### roachprod: update azure SDK

This is a partial backport of the commit below (only the part that
affects roachprod).

  metric: Add Alert and Aggregation Rule interface

  In this commit, the interfaces for Alert and Aggregation rule
  interfaces are outlined. These interfaces will be used
  by a new endpoint which will expose these rules in a YAML
  format. This endpoint can be used by our end users to
  configure alerts/monitoring for CockroachDB clusters.
  This commit also updates the prometheus dependency in the
  vendor submodule.

Release note: None

#### roachprod: fix roachprod gc docker build

Previously, the roachprod garbage collector docker image build process
was using the `go get` approach to build roachprod.

Currently, this method doesn't work, because it doesn't use any pinning,
so the build ends up with all kind of deprecation warnings and failures.

* Use multi-stage docker build in order to separate build and runtime.
  It also reduces the image size from 1.9G to 700M.
* Build roachprod using the checked out commit SHA.
* Use the Bazel build image we use in CI to build roachprod.
* Use Bazel to build roachprod.
* Added `cloudbuild.yaml` to publish the docker image to GCR and use a
  beefier instance type.
* Modify the entrypoint script to set the default region, required by
  the AWS Go SDK library.
* Add `push.sh` to script deployment.

Release note: None

#### roachprod: correct spelling mistakes

Release note: None

#### roachprod: install AWS CLI v2 for GC images

Previously, after regenerating the GC docker images, roachprod stopped
listing AWS as an available provider, because Debian ships with AWS CLI
v1, but roachprod doesn't support it.

This patch installs AWS CLI v2.

Release note: None

#### roachprod: making roachprod subcommands point to a new library

Previously, roachprod binary interfaced directly with roachorod's functionality
and there was no way for another tool to make use of that functionality.

This needed to change to create a library that can be used by roachprod binary
and also other tools.

This patch migrates the subcommands functionality to a new library and makes
the binary point to the new library.

Release note: None

#### roachprod: avoid flaky test due to unused functions

Merging #71660 trigerred a flaky test due to unused functions.

This patch avoids that test by making use of / commenting unused functions.

Release note: None

#### roachprod: minor cleanup for cloud.Cloud

This change fills in some missing comments from `cloud.Cloud` and
improves the interface a bit. Some of the related roachprod code is
cleaned up as well.

Release note: None

#### roachprod: clean up local cluster metadata

The logic around how the local cluster metadata is loaded and saved is
very convoluted. The local provider is using `install.Clusters` and is
writing directly to the `.hosts/local` file.

This commit disentangles this logic: it is now up to the main program
to call `local.AddCluster()` to inject local cluster information. The
main program also provides the implementation for a new
`local.VMStorage` interface, allowing the code for saving the hosts
file to live where it belongs.

Release note: None

#### roachprod: clean up local cluster deletion

This change moves the code to destroy the local cluster to the local
provider. The hosts file is deleted through LocalVMStorage.

Release note: None

#### roachprod: rework clusters cache

This commit changes roachprod from using `hosts`-style files in
`~/.roachprod/hosts` for caching clusters to using json files in
`~/.roachprod/clusters`.

Like before, each cluster has its own file. The main advantage is
that we can now store the entire cluster metadata instead of
manufacturing it based on one-off parsing.

WARNING: after this change, the information in `~/.roachprod/hosts`
will no longer be used. If a local cluster exists, the new `roachprod`
version will not know about it. It is recommended to destroy any local
cluster before using the new version. A local cluster can also be
cleaned up manually using:
```
killall -9 cockroach
rm -rf ~/.roachprod/local
```

Release note: None

#### roachprod: use cloud.Cluster in SyncedCluster

This change stores Cluster metadata directly in SyncedCluster, instead
of making copies of various fields.

#### roachprod: store ports in vm.VM

This change adds `SQLPort` and `AdminUIPort` fields to `vm.VM`. This
allows us to remove the special hardcoded values for the local
cluster.

Having these fields stored in the clusters cache will allow having
multiple local clusters, each with their own set of ports.

Release note: None

#### roachprod: support multiple local clusters

This change adds support for multiple local clusters. Local cluster
names must be either "local" or of the form "local-foo".

When the cluster is named "local", the node directories stay in the
same place, e.g. `~/local/1`. If the cluster is named "local-foo",
node directories are like `~/local/foo-1`.

For local clusters we include the cluster name in the ROACHPROD
variable; this is necessary to distinguish between processes of
different local clusters. The relevant code is cleaned up to
centralize the logic related to the ROACHPROD variable.

Fixes #71945.

Release note: None

meh

#### roachprod: list VMs in parallel

This commit speeds up the slowest step of roachprod: listing VMs from
all providers. We now list the VMs in parallel across all providers
instead of doing it serially.

Release note: None

#### roachprod: fix behavior when mixing GCE projects

Currently roachprod has very poor behavior when used with different
projects on the same host. For example:
```
shell1: GCE_PROJECT=andrei-jepsen roachstress.sh ... // this will run ~forever
sometime later in shell2: roachprod sync (on the default project)
```

The sync on the default project removes the cached information for the
cluster on `andrei-jepsen`, which causes `roachprod` commands against
that cluster (from within the `roachstress.sh` script) to fail.

We fix this by ignoring any cached clusters that reference a project
that the provider was not configured for - both when loading clusters
into memory and when deleting stale cluster files during `sync`.

As part of the change, we also improve the output of `list` to remove
the colon after the cluster name and to include the GCE project:

```
$ roachprod list --gce-project cockroach-ephemeral,andrei-jepsen
Syncing...
Refreshing DNS entries...
glenn-anarest                  [aws]                      9  (142h41m39s)
glenn-drive                    [aws]                      1  (141h41m39s)
jane-1635868819-01-n1cpu4      [gce:cockroach-ephemeral]  1  (10h41m39s)
lin-ana                        [aws]                      9  (178h41m39s)
local-foo                      [local]                    4  (-)
radu-foo                       [gce:andrei-jepsen]        4  (12h41m39s)
radu-test                      [gce:cockroach-ephemeral]  4  (12h41m39s)
```

Release note: None

#### roachprod: don't remove LOCK file

We use a LOCK file during sync. We create the file, acquire an
exclusive lock and at the end remove the file. The removal of the file
will fail if another process was waiting for the lock. Also, there is
a race where we could be deleting the file that is in use by another
process, and that would allow a third process to create the file
again.

To fix these issues, we let the LOCK file be; there is no need to
remove it - we are relying on `flock`, not on exclusive file creation.

Release note: None

#### roachprod: fix improperly wrapped errors

Partial backport of this commit:
  *: fix improperly wrapped errors

  I'm working on a linter that detects errors that are not wrapped
  correctly, and it discovered these.

Release note: None

#### roachprod: fix `roachprod start` ignoring --binary flag

Merging #71660 introduced a bug where roachprod ignores --binary
flag when running `roachprod start`.

This patch reverts to the old way of setting config.Binary.

Release note: None

Fixes #72425 #72420 #72373 #72372

#### roachprod: update doc on local clusters

The behavior changed in
#71970.

Release note: None

#### pkg/roachprod: allow multiple-stores to be created on GCP

Port an existing flag from the AWS roachprod flags that allows multiple
stores to be created. When this flag is enabled, multiple data
directories are created and mounted as `/mnt/data{1..N}`.

Standardize the existing ext4 disk creation logic in the GCE setup
script to match the AWS functionality. Interleave the existing ZFS setup
commands based on the `--filesystem` flag.

Fix a bug introduced in #54986 that will always create multiple data
disks, ignoring the value of the flag. This has the effect of never
creating a RAID 0 array, which is the intended default behavior.

The ability to create a RAID 0 array on GCE VMs is required for the
Pebble write-throughput benchmarks.

Release note: None

#### roachprod: move quiet determination out of the library

Moving the logic of automatically enabling Quiet in non-terminal
output.

Release note: None

#### roachprod: clean up use of SyncedCluster

`SyncedCluster` is currently used to pass the cluster name (with
optional node selector) and the settings. This is a misuse of the type
and complicates things conceptually.

This change separates out the relevant settings into a new struct
`ClusterSettings`. All commands now pass the cluster name and the
`ClusterSettings` instead of passing a `SyncedCluster`.

Release note: None


Co-authored-by: Andrew Werner <[email protected]>
Co-authored-by: Steven Danna <[email protected]>
Co-authored-by: Ahmad Abedalqader <[email protected]>
Co-authored-by: Rail Aliiev <[email protected]>
Co-authored-by: rimadeodhar <[email protected]>
Co-authored-by: Radu Berinde <[email protected]>
Co-authored-by: Rafi Shamim <[email protected]>
Co-authored-by: Tobias Grieger <[email protected]>
Co-authored-by: Nick Travers <[email protected]>
  • Loading branch information
10 people committed Nov 17, 2021
2 parents e9428d3 + 51f3015 commit 774ea54
Show file tree
Hide file tree
Showing 99 changed files with 3,803 additions and 2,120 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
/pkg/multitenant @cockroachdb/unowned
/pkg/release/ @cockroachdb/dev-inf
/pkg/roachpb/ @cockroachdb/kv-prs
/pkg/roachprod/ @cockroachdb/dev-inf
/pkg/rpc/ @cockroachdb/server-prs
/pkg/scheduledjobs/ @cockroachdb/bulk-prs
/pkg/security/ @cockroachdb/server-prs
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
url = https://github.com/cockroachdb/jemalloc.git
[submodule "pkg/ui/yarn-vendor"]
path = pkg/ui/yarn-vendor
url = https://github.com/cockroachdb/yarn-vendored
url = https://github.com/cockroachdb/yarn-vendored.git
[submodule "c-deps/krb5"]
path = c-deps/krb5
url = https://github.com/cockroachdb/krb5.git
Expand Down
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ load("@bazel_gazelle//:def.bzl", "gazelle")
# gazelle:exclude pkg/cmd/prereqs/testdata
# gazelle:exclude pkg/testutils/**/testdata/**
# gazelle:exclude pkg/security/securitytest/embedded.go
# gazelle:exclude pkg/cmd/roachprod/vm/aws/embedded.go
# gazelle:exclude pkg/roachprod/vm/aws/embedded.go
# gazelle:exclude pkg/**/*_string.go
# gazelle:exclude pkg/geo/wkt/wkt_generated.go
# gazelle:exclude pkg/sql/schemachanger/scop/backfill_visitor_generated.go
Expand Down
89 changes: 83 additions & 6 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,83 @@ def go_deps():
sum = "h1:V489lmrdkIQSfF6OAGZZ1Cavcm7eczCm2JcGvX+yHRg=",
version = "v1.38.69",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2",
sum = "h1:ZbovGV/qo40nrOJ4q8G33AGICzaPI45FHQWJ9650pF4=",
version = "v1.9.1",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_config",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/config",
sum = "h1:Dqy4ySXFmulRmZhfynm/5CD4Y6aXiTVhDtXLIuUe/r0=",
version = "v1.8.2",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_credentials",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/credentials",
sum = "h1:8kVE4Og6wlhVrMGiORQ3p9gRj2exjzhFRB+QzWBUa5Q=",
version = "v1.4.2",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_feature_ec2_imds",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/feature/ec2/imds",
sum = "h1:Nm+BxqBtT0r+AnD6byGMCGT4Km0QwHBy8mAYptNPXY4=",
version = "v1.5.1",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_internal_ini",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/internal/ini",
sum = "h1:NnXJXUz7oihrSlPKEM0yZ19b+7GQ47MX/LluLlEyE/Y=",
version = "v1.2.3",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_ec2",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/ec2",
sum = "h1:5wWtSfYRWgkpKKMW4yJ5llzI9s24Fls7Pv7uw2BiYbk=",
version = "v1.18.0",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_iam",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/iam",
sum = "h1:VJXUtZTgUAZ9Xng8svkIeOcWQWOlZW5sonCtCHxtA1I=",
version = "v1.10.0",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_internal_presigned_url",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url",
sum = "h1:APEjhKZLFlNVLATnA/TJyA+w1r/xd5r5ACWBDZ9aIvc=",
version = "v1.3.1",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_sso",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/sso",
sum = "h1:RfgQyv3bFT2Js6XokcrNtTjQ6wAVBRpoCgTFsypihHA=",
version = "v1.4.1",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_sts",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/sts",
sum = "h1:7ce9ugapSgBapwLhg7AJTqKW5U92VRX3vX65k2tsB+g=",
version = "v1.7.1",
)
go_repository(
name = "com_github_aws_smithy_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/smithy-go",
sum = "h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc=",
version = "v1.8.0",
)
go_repository(
name = "com_github_axiomhq_hyperloglog",
build_file_proto_mode = "disable_global",
Expand All @@ -221,8 +298,8 @@ def go_deps():
name = "com_github_azure_azure_sdk_for_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/azure-sdk-for-go",
sum = "h1:yzJKzcKTX0WwDdZC8kAqxiGVZz66uqpajhgphstEUN0=",
version = "v33.4.0+incompatible",
sum = "h1:TKQ3ieyB0vVKkF6t9dsWbMjq56O1xU3eh3Ec09v6ajM=",
version = "v57.1.0+incompatible",
)
go_repository(
name = "com_github_azure_azure_storage_blob_go",
Expand Down Expand Up @@ -250,8 +327,8 @@ def go_deps():
name = "com_github_azure_go_autorest_autorest",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest/autorest",
sum = "h1:eVvIXUKiTgv++6YnWb42DUA1YL7qDugnKP0HljexdnQ=",
version = "v0.11.1",
sum = "h1:s8H1PbCZSqg/DH7JMlOz6YMig6htWLNPsjDdlLqCx3M=",
version = "v0.11.20",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_adal",
Expand Down Expand Up @@ -292,8 +369,8 @@ def go_deps():
name = "com_github_azure_go_autorest_autorest_to",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest/autorest/to",
sum = "h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8=",
version = "v0.3.0",
sum = "h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk=",
version = "v0.4.0",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_validation",
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@ optgen-package = ./pkg/sql/opt/optgen/cmd/optgen
logictest-package = ./pkg/sql/logictest
logictestccl-package = ./pkg/ccl/logictestccl
logictestopt-package = ./pkg/sql/opt/exec/execbuilder
terraformgen-package = ./pkg/cmd/roachprod/vm/aws/terraformgen
terraformgen-package = ./pkg/roachprod/vm/aws/terraformgen
logictest-bins := bin/logictest bin/logictestopt bin/logictestccl

# Additional dependencies for binaries that depend on generated code.
Expand Down
8 changes: 4 additions & 4 deletions build/bazelutil/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ EXISTING_GO_GENERATE_COMMENTS="
pkg/ccl/sqlproxyccl/throttler/service.go://go:generate mockgen -package=throttler -destination=mocks_generated.go -source=service.go . Service
pkg/ccl/sqlproxyccl/denylist/service.go://go:generate mockgen -package=denylist -destination=mocks_generated.go -source=service.go . Service
pkg/ccl/sqlproxyccl/tenant/directory.go://go:generate mockgen -package=tenant -destination=mocks_generated.go . DirectoryClient,Directory_WatchEndpointsClient
pkg/cmd/roachprod/vm/aws/config.go://go:generate go-bindata -mode 0600 -modtime 1400000000 -pkg aws -o embedded.go config.json old.json
pkg/cmd/roachprod/vm/aws/config.go://go:generate gofmt -s -w embedded.go
pkg/cmd/roachprod/vm/aws/config.go://go:generate goimports -w embedded.go
pkg/cmd/roachprod/vm/aws/config.go://go:generate terraformgen -o terraform/main.tf
pkg/roachprod/vm/aws/config.go://go:generate go-bindata -mode 0600 -modtime 1400000000 -pkg aws -o embedded.go config.json old.json
pkg/roachprod/vm/aws/config.go://go:generate gofmt -s -w embedded.go
pkg/roachprod/vm/aws/config.go://go:generate goimports -w embedded.go
pkg/roachprod/vm/aws/config.go://go:generate terraformgen -o terraform/main.tf
pkg/geo/wkt/wkt.go://go:generate sh generate.sh
pkg/kv/kvserver/concurrency/lock_table.go://go:generate ../../../util/interval/generic/gen.sh *lockState concurrency
pkg/kv/kvserver/spanlatch/manager.go://go:generate ../../../util/interval/generic/gen.sh *latch spanlatch
Expand Down
10 changes: 7 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ go 1.16
require (
cloud.google.com/go v0.90.0 // indirect
cloud.google.com/go/storage v1.16.0
github.com/Azure/azure-sdk-for-go v33.4.0+incompatible
github.com/Azure/azure-sdk-for-go v57.1.0+incompatible
github.com/Azure/azure-storage-blob-go v0.14.0
github.com/Azure/go-autorest/autorest v0.11.1
github.com/Azure/go-autorest/autorest v0.11.20
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2
github.com/Azure/go-autorest/autorest/to v0.3.0
github.com/Azure/go-autorest/autorest/to v0.4.0
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
github.com/BurntSushi/toml v0.3.1
github.com/DataDog/datadog-go v4.4.0+incompatible // indirect
Expand All @@ -28,6 +28,10 @@ require (
github.com/apache/thrift v0.0.0-20181211084444-2b7365c54f82 // indirect
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e
github.com/aws/aws-sdk-go v1.38.69
github.com/aws/aws-sdk-go-v2 v1.9.1
github.com/aws/aws-sdk-go-v2/config v1.8.2
github.com/aws/aws-sdk-go-v2/service/ec2 v1.18.0
github.com/aws/aws-sdk-go-v2/service/iam v1.10.0
github.com/axiomhq/hyperloglog v0.0.0-20181223111420-4b99d0c2c99e
github.com/bazelbuild/rules_go v0.26.0
github.com/biogo/store v0.0.0-20160505134755-913427a1d5e8
Expand Down
37 changes: 28 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOv
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U=
github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k=
github.com/Azure/azure-sdk-for-go v33.4.0+incompatible h1:yzJKzcKTX0WwDdZC8kAqxiGVZz66uqpajhgphstEUN0=
github.com/Azure/azure-sdk-for-go v33.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v57.1.0+incompatible h1:TKQ3ieyB0vVKkF6t9dsWbMjq56O1xU3eh3Ec09v6ajM=
github.com/Azure/azure-sdk-for-go v57.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0=
github.com/Azure/azure-storage-blob-go v0.14.0 h1:1BCg74AmVdYwO3dlKwtFU1V0wU2PZdREkXvAmZJRUlM=
github.com/Azure/azure-storage-blob-go v0.14.0/go.mod h1:SMqIBi+SuiQH32bvyjngEewEeXoPfKMgWlBDaYf6fck=
Expand All @@ -64,13 +64,12 @@ github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0=
github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630=
github.com/Azure/go-autorest/autorest v0.11.1 h1:eVvIXUKiTgv++6YnWb42DUA1YL7qDugnKP0HljexdnQ=
github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
github.com/Azure/go-autorest/autorest v0.11.20 h1:s8H1PbCZSqg/DH7JMlOz6YMig6htWLNPsjDdlLqCx3M=
github.com/Azure/go-autorest/autorest v0.11.20/go.mod h1:o3tqFY+QR40VOlk+pV4d77mORO64jOXSgEnPQgLK6JY=
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q=
github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwpKNMpV+/FTWjwEbuPD495Tk=
Expand All @@ -84,15 +83,13 @@ github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSY
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8=
github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA=
github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk=
github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE=
github.com/Azure/go-autorest/autorest/validation v0.2.0 h1:15vMO4y76dehZSq7pAaOLQxC6dZYsSrj2GQpflyM/L4=
github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI=
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg=
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
Expand Down Expand Up @@ -204,6 +201,28 @@ github.com/aws/aws-sdk-go v1.28.8/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
github.com/aws/aws-sdk-go v1.38.69 h1:V489lmrdkIQSfF6OAGZZ1Cavcm7eczCm2JcGvX+yHRg=
github.com/aws/aws-sdk-go v1.38.69/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v1.9.1 h1:ZbovGV/qo40nrOJ4q8G33AGICzaPI45FHQWJ9650pF4=
github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4=
github.com/aws/aws-sdk-go-v2/config v1.8.2 h1:Dqy4ySXFmulRmZhfynm/5CD4Y6aXiTVhDtXLIuUe/r0=
github.com/aws/aws-sdk-go-v2/config v1.8.2/go.mod h1:r0bkX9NyuCuf28qVcsEMtpAQibT7gA1Q0gzkjvgJdLU=
github.com/aws/aws-sdk-go-v2/credentials v1.4.2 h1:8kVE4Og6wlhVrMGiORQ3p9gRj2exjzhFRB+QzWBUa5Q=
github.com/aws/aws-sdk-go-v2/credentials v1.4.2/go.mod h1:9Sp6u121/f0NnvHyhG7dgoYeUTEFC2vsvJqJ6wXpkaI=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.5.1 h1:Nm+BxqBtT0r+AnD6byGMCGT4Km0QwHBy8mAYptNPXY4=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.5.1/go.mod h1:W1ldHfsgeGlKpJ4xZMKZUI6Wmp6EAstU7PxnhbXWWrI=
github.com/aws/aws-sdk-go-v2/internal/ini v1.2.3 h1:NnXJXUz7oihrSlPKEM0yZ19b+7GQ47MX/LluLlEyE/Y=
github.com/aws/aws-sdk-go-v2/internal/ini v1.2.3/go.mod h1:EES9ToeC3h063zCFDdqWGnARExNdULPaBvARm1FLwxA=
github.com/aws/aws-sdk-go-v2/service/ec2 v1.18.0 h1:5wWtSfYRWgkpKKMW4yJ5llzI9s24Fls7Pv7uw2BiYbk=
github.com/aws/aws-sdk-go-v2/service/ec2 v1.18.0/go.mod h1:d8R2f1hFcknkA3MW4SeExwEua2KpR+dhSrwWlnlwe5Q=
github.com/aws/aws-sdk-go-v2/service/iam v1.10.0 h1:VJXUtZTgUAZ9Xng8svkIeOcWQWOlZW5sonCtCHxtA1I=
github.com/aws/aws-sdk-go-v2/service/iam v1.10.0/go.mod h1:8jDIYQgKHgBEQcAye4lC7DnKqZLqROyOE4etd6nY2jw=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.1 h1:APEjhKZLFlNVLATnA/TJyA+w1r/xd5r5ACWBDZ9aIvc=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.1/go.mod h1:Ve+eJOx9UWaT/lMVebnFhDhO49fSLVedHoA82+Rqme0=
github.com/aws/aws-sdk-go-v2/service/sso v1.4.1 h1:RfgQyv3bFT2Js6XokcrNtTjQ6wAVBRpoCgTFsypihHA=
github.com/aws/aws-sdk-go-v2/service/sso v1.4.1/go.mod h1:ycPdbJZlM0BLhuBnd80WX9PucWPG88qps/2jl9HugXs=
github.com/aws/aws-sdk-go-v2/service/sts v1.7.1 h1:7ce9ugapSgBapwLhg7AJTqKW5U92VRX3vX65k2tsB+g=
github.com/aws/aws-sdk-go-v2/service/sts v1.7.1/go.mod h1:r1i8QwKPzwByXqZb3POQfBs7jozrdnHz8PVbsvyx73w=
github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc=
github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/axiomhq/hyperloglog v0.0.0-20181223111420-4b99d0c2c99e h1:190ugM9MsyFauTkR/UqcHG/mn5nmFe6SvHJqEHIrtrA=
github.com/axiomhq/hyperloglog v0.0.0-20181223111420-4b99d0c2c99e/go.mod h1:IOXAcuKIFq/mDyuQ4wyJuJ79XLMsmLM+5RdQ+vWrL7o=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
Expand Down
8 changes: 5 additions & 3 deletions pkg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ ALL_TESTS = [
"//pkg/cmd/prereqs:prereqs_test",
"//pkg/cmd/publish-artifacts:publish-artifacts_test",
"//pkg/cmd/publish-provisional-artifacts:publish-provisional-artifacts_test",
"//pkg/cmd/roachprod/install:install_test",
"//pkg/cmd/roachprod/ssh:ssh_test",
"//pkg/cmd/roachprod/vm:vm_test",
"//pkg/cmd/roachtest/prometheus:prometheus_test",
"//pkg/cmd/roachtest/spec:spec_test",
"//pkg/cmd/roachtest/tests:tests_test",
Expand Down Expand Up @@ -159,6 +156,11 @@ ALL_TESTS = [
"//pkg/migration/migrations:migrations_test",
"//pkg/roachpb:roachpb_test",
"//pkg/roachpb:string_test",
"//pkg/roachprod/cloud:cloud_test",
"//pkg/roachprod/config:config_test",
"//pkg/roachprod/install:install_test",
"//pkg/roachprod/ssh:ssh_test",
"//pkg/roachprod/vm:vm_test",
"//pkg/rpc/nodedialer:nodedialer_test",
"//pkg/rpc:rpc_test",
"//pkg/security/certmgr:certmgr_test",
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/import-tools/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main
import (
"fmt"

_ "github.com/aws/aws-sdk-go-v2"
_ "github.com/bufbuild/buf/cmd/buf"
_ "github.com/client9/misspell/cmd/misspell"
_ "github.com/cockroachdb/crlfmt"
Expand Down
33 changes: 12 additions & 21 deletions pkg/cmd/roachprod/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,25 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
name = "roachprod_lib",
srcs = [
"hosts.go",
"main.go",
],
srcs = ["main.go"],
importpath = "github.com/cockroachdb/cockroach/pkg/cmd/roachprod",
visibility = ["//visibility:private"],
deps = [
"//pkg/build",
"//pkg/cmd/roachprod/cloud",
"//pkg/cmd/roachprod/config",
"//pkg/cmd/roachprod/errors",
"//pkg/cmd/roachprod/install",
"//pkg/cmd/roachprod/ssh",
"//pkg/cmd/roachprod/ui",
"//pkg/cmd/roachprod/vm",
"//pkg/cmd/roachprod/vm/aws",
"//pkg/cmd/roachprod/vm/azure",
"//pkg/cmd/roachprod/vm/gce",
"//pkg/cmd/roachprod/vm/local",
"//pkg/util/ctxgroup",
"//pkg/roachprod",
"//pkg/roachprod/config",
"//pkg/roachprod/errors",
"//pkg/roachprod/install",
"//pkg/roachprod/ssh",
"//pkg/roachprod/ui",
"//pkg/roachprod/vm",
"//pkg/roachprod/vm/aws",
"//pkg/roachprod/vm/azure",
"//pkg/roachprod/vm/gce",
"//pkg/roachprod/vm/local",
"//pkg/util/flagutil",
"//pkg/util/httputil",
"//pkg/util/syncutil",
"//pkg/util/timeutil",
"@com_github_cockroachdb_errors//:errors",
"@com_github_cockroachdb_errors//oserror",
"@com_github_spf13_cobra//:cobra",
"@org_golang_x_sys//unix",
"@org_golang_x_term//:term",
],
)
Expand Down
19 changes: 0 additions & 19 deletions pkg/cmd/roachprod/cloud/BUILD.bazel

This file was deleted.

Loading

0 comments on commit 774ea54

Please sign in to comment.