Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roachprod azure add machine #111926

Merged
merged 5 commits into from
Oct 10, 2023
Merged

Conversation

smg260
Copy link
Contributor

@smg260 smg260 commented Oct 6, 2023

This PR makes several azure specific changes to roachtest and roachprod to support more roachtests.

  • Add 96 cpu machine type
  • Add s series machines for premium/ultra disks
  • Firewall port configuration for more tests and refactor
  • Set a default location from west to west2 for AZ
  • apt-get update for asyncpg

Epic: CC-25185
Release note: none

Miral Gadani added 2 commits October 6, 2023 13:39
Epic: CC-25185

Release note: None
Epic: CC-25185
Release note: none
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@smg260 smg260 marked this pull request as ready for review October 6, 2023 17:40
@smg260 smg260 requested a review from a team as a code owner October 6, 2023 17:40
@smg260 smg260 requested review from srosenberg and DarrylWong and removed request for a team October 6, 2023 17:40
Copy link
Contributor

@DarrylWong DarrylWong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, someone else should take a look if needed but seems pretty straightforward to me

@smg260 smg260 force-pushed the roachprod_azure_add_machine branch from cd825aa to 167b2a5 Compare October 6, 2023 20:13
Copy link
Contributor Author

@smg260 smg260 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @DarrylWong and @srosenberg)


pkg/roachprod/vm/azure/flags.go line 36 at r5 (raw file):

Previously, DarrylWong wrote…

random thought/nit: should we note why we use westus2? Personally I'd be pretty confused but maybe finding the commit message is good enough?

Done.

Copy link
Contributor

@renatolabs renatolabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, 3 of 3 files at r2, 1 of 1 files at r3, 2 of 2 files at r6, 1 of 1 files at r7, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @DarrylWong, @smg260, and @srosenberg)


pkg/cmd/roachtest/tests/asyncpg.go line 85 at r7 (raw file):

			ctx, t, c, node, "update apt-get", `sudo apt-get update`,
		); err != nil {
			t.Fatal(err)

Curious -- did this fix an Azure specific failure?


pkg/roachprod/vm/azure/azure.go line 897 at r3 (raw file):

	// The names for these are generated in the form Roachtest_<index>_Inbound
	genericInbound := []string{"8011", "8081", "9011", "9081-9102", "20011-20016", "27257", "27259-27280", "30258"}

Where were these port ranges obtained from? Probably a good idea to map them to services in comments if this was obtained manually after test runs, otherwise it will be hard to make sense of this list:

genericInbound := []string{
    "8011", // nginx
    "8081", // foo
}

@herkolategan recently added a change to pick a dynamic open port for cockroach. We might have to be more generous with these port ranges with that in mind.

Meta question: do we need to configure the firewall at this level for Azure? AFAIK, we don't have similar configurations for the other clouds. Given that folks might be using roachprod outside of roachtest for their own experimentation, this could be overly restrictive too.

@smg260 smg260 force-pushed the roachprod_azure_add_machine branch from 167b2a5 to 21b928b Compare October 6, 2023 22:16
Copy link
Contributor Author

@smg260 smg260 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @DarrylWong, @herkolategan, @renatolabs, and @srosenberg)


pkg/cmd/roachtest/tests/asyncpg.go line 85 at r7 (raw file):

Previously, renatolabs (Renato Costa) wrote…

Curious -- did this fix an Azure specific failure?

It did, as with installing go for a cdc. The repository metadata of the vms may be old / out of date. These updates are all over roachtests. At some point it would be nice to give a more structured way of preparing the environment.


pkg/roachprod/vm/azure/azure.go line 897 at r3 (raw file):

Previously, renatolabs (Renato Costa) wrote…

Where were these port ranges obtained from? Probably a good idea to map them to services in comments if this was obtained manually after test runs, otherwise it will be hard to make sense of this list:

genericInbound := []string{
    "8011", // nginx
    "8081", // foo
}

@herkolategan recently added a change to pick a dynamic open port for cockroach. We might have to be more generous with these port ranges with that in mind.

Meta question: do we need to configure the firewall at this level for Azure? AFAIK, we don't have similar configurations for the other clouds. Given that folks might be using roachprod outside of roachtest for their own experimentation, this could be overly restrictive too.

When creating the vms, there are default deny all rules in place which are probably configurable, but these rules are only required for processes connecting to the VMs from the internet. This is really just building on what was already there.

The ports are from a number of roachtests, many related to multitenant, especially the 20000s which are dynamic tenant SQL ports. It would be cumbersome to map them all - much of it was parsed from error logs + ide search.

We probably don't need them and I don't think we restricting connections for GCE or AWS, but it never hurts to err on the side of caution. Either way, these rules are easily modified, and we can revisit removing the completely if it makes sense.

I've added an explanatory comment

// The mapped roachtests are not exhaustive, and at some point will be
// cumbersome to keep adding exceptions for. We may need to consider removing
// all rules.
genericInbound := []string{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workload has another range for prom metrics: 2112-2120 and 33333 for pprof :) (It's in pkg/workload/cli/run.go.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - updated!

Miral Gadani added 3 commits October 10, 2023 09:06
This adds some more ports required for various roachtests and
refactors their creation with a helper function.

Epic: CC-25185

Release note: None
`westus` does not support availability zones, but
`westus2` does. Over 20 roachtests use az.

Epic: CC-25185
Release note: none
This is required so that packages can be found in azure.

Epic: CC-25185

Release note: None
@smg260 smg260 force-pushed the roachprod_azure_add_machine branch from 21b928b to e7c247a Compare October 10, 2023 13:06
@smg260
Copy link
Contributor Author

smg260 commented Oct 10, 2023

TFTR

bors r=darrylwong,srosenberg

@smg260
Copy link
Contributor Author

smg260 commented Oct 10, 2023

bors r=darrylwong,srosenberg

@craig
Copy link
Contributor

craig bot commented Oct 10, 2023

Build succeeded:

@craig craig bot merged commit 77f062e into cockroachdb:master Oct 10, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants