-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add cockroach-admin
dropshot server
#5822
Conversation
sled-agent/src/services.rs
Outdated
.add_property("listen_addr", "astring", crdb_listen_addr) | ||
.add_property("listen_port", "astring", crdb_listen_port) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, feel free to tell me to go do this myself, but if we're passing the socketaddr directly to the cockroach-admin
service, should we do the same for the cockroachdb
service?
(Just feels weird to be asymmetrical with "ip + port" vs "socketaddr" here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's fair. I skimmed over this and thought maybe cockroach wanted them as separate args, but it looks like our method script just squishes them back into a socket address. I'll change this to match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# See omicron-rpaths for more about the "pq-sys" dependency. | ||
pq-sys = "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little surprised we need this + the build.rs script. I thought we would have needed this to get access to a copy of postgres - this is normally necessary for Diesel, but is it also necessary to invoke the CLI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required by the unit tests that want to spin up cockroach. I could maybe change this to a dev-dependency
, but then I have to tweak the build script to also only set rpaths when building for tests? Seems fine-ish, although we have that
// NOTE: This file MUST be kept in sync with the other build.rs files in this
// repository.
bit in the copy-paste build.rs
that wouldn't be valid anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhhh, gotcha, because the unit test scaffolding is making calls with diesel? no objection to this as-is, just was curious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess so - I didn't really look into it when I saw the rpath failure in CI.
// Ensure that if `cockroach node status` changes in a future CRDB version | ||
// bump, we have a test that will fail to force us to check whether our | ||
// current parsing is still valid. | ||
#[tokio::test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hell yeah, was looking for this test, thrilled it's here
The goal here is to use this server to run
cockroach node decommission
for expunged cockroach zones. For this initial PR, the only endpoint provided wrapscockroach node status
; wrappingdecommission
is not as trivial so I figured it should go into a separate PR.There are currently no callers of this service, but stood up an a4x2 and confirmed I could talk to it from the switch zone via
curl
: