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

server: add metadata for cloud provider and instance class to diagnostics #37272

Merged
merged 1 commit into from
Jun 3, 2019
Merged

server: add metadata for cloud provider and instance class to diagnostics #37272

merged 1 commit into from
Jun 3, 2019

Conversation

sploiselle
Copy link
Contributor

Track the cloud provider and the machine type for nodes in the diagnostics report at /_status/diagnostics/local. Include tooling to capture this data for VMs running on AWS, GCP, and Azure. All other platforms return empty strings.

@dt @BramGruneir Do we have anything that would let us simply test the metadata endpoints that this code uses, given that they're internal to remote VMs?

Release note: None

@sploiselle sploiselle requested review from dt, BramGruneir and a team May 2, 2019 19:47
@cockroach-teamcity
Copy link
Member

This change is Reviewable

pkg/server/updates.go Outdated Show resolved Hide resolved
pkg/server/updates.go Outdated Show resolved Hide resolved
@dt
Copy link
Member

dt commented May 11, 2019

For the cloud storage stuff, what we did was write tests that check env vars that configured a given cloud and then call skip on the test if they're missing. That meant the tests are usually skipped which isn't great but if you run them by hand on a given cloud, you can confirm it works as expected.

I like testing against the captured string snapshots here since that can be run anywhere, but similar skipped-if-not-on-aws tests could complement them (though I wouldn't hold up this change for them)

Track the cloud provider and the machine type for nodes in the diagnostics report at /_status/diagnostics/local. Include tooling to capture this data for VMs running on AWS, GCP, and Azure.

Release note: None
@sploiselle
Copy link
Contributor Author

sploiselle commented May 29, 2019

@dt Can I get you to take a quick peek at the cloudinfo package I created?

@dt
Copy link
Member

dt commented May 29, 2019

whoops, sorry I didn't notice the revisions!

@sploiselle
Copy link
Contributor Author

bors r+

@sploiselle
Copy link
Contributor Author

bors r+

@cockroachdb cockroachdb deleted a comment from awoods187 Jun 3, 2019
@dt dt closed this Jun 3, 2019
@dt dt reopened this Jun 3, 2019
craig bot pushed a commit that referenced this pull request Jun 3, 2019
37272: server: add metadata for cloud provider and instance class to diagnostics r=sploiselle a=sploiselle

Track the cloud provider and the machine type for nodes in the diagnostics report at `/_status/diagnostics/local`. Include tooling to capture this data for VMs running on AWS, GCP, and Azure. All other platforms return empty strings.

@dt @BramGruneir Do we have anything that would let us simply test the metadata endpoints that this code uses, given that they're internal to remote VMs?

Release note: None

Co-authored-by: Sean Loiselle <himself@seanloiselle.com>
@craig
Copy link
Contributor

craig bot commented Jun 3, 2019

Build succeeded

@craig craig bot merged commit 55ac4bb into cockroachdb:master Jun 3, 2019
craig bot pushed a commit that referenced this pull request Jul 2, 2019
38008: server: add metadata for cloud provider region to diagnostics r=sploiselle a=sploiselle

Track the name of the cloud provider's region where nodes are located at
`/_status/diagnostics/local`. Include functions to capture this data for
VMs running on AWS, GCP, and Azure. All other platforms return empty
strings.

Also refactor prior PR (#37272) with a more modular/extensible design.

Co-authored-by: Sean Loiselle <himself@seanloiselle.com>
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.

3 participants