-
Notifications
You must be signed in to change notification settings - Fork 67
Optionally configure crdb listen port in dev. #9696
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
base: main
Are you sure you want to change the base?
Conversation
2cda6fd to
1bdd25f
Compare
1bdd25f to
c2fa9c3
Compare
At the moment, omicron-dev starts crdb on port 0, which tells the database to use any available port. This is fine for most use cases, but less fine for running a second nexus alongside an existing run-all: https://github.com/oxidecomputer/omicron/blob/main/docs/how-to-run-simulated.adoc#using-both-omicron-dev-run-all-and-running-nexus-manually. This process involves copying the randomly selected ports from the output of run-all and writing them to a custom nexus config. To make the process simpler, this patch allows the user to configure the crdb listen port, defaulting to the current choice of 0.
c2fa9c3 to
03a67c7
Compare
|
I think this makes sense. If I remember right, the fully manual instructions wind up using a fixed set of ports for a lot of things, which is helpful because you don't have to edit config files as part of that process, but then they use random-available ports for other things. I've long meant to clean that up. Would it make sense for |
|
For context, my first thought was to add something like a
That would work for my use case. For some reason, it feels a little strange to me to tell the xtask to use some known, fixed port for each service rather than asking for specific ports for the services that we care about, but it would also be more concise. I think my weak preference would be to expose ports for the three services that I actually care about for my use case, but I'm happy to try either alternative.
@lgfa29 and I also thought about just running the parts that we need for our automated testing, but it looks like that's known broken at the moment. Making that work could also be useful, but this seemed like the path of least resistance for now. |
|
That's interesting. For what it's worth, the underlying mechanism for running
Yeah, I hear what you mean. In the limit you could imagine having all of these modes:
This isn't as complicated as it sounds. One simple way to do this is to accept a configuration file that specifies all the ports and ship with two config files: one that uses
This is fine, too. It doesn't get in the way of building the other stuff and we don't have to do all that other stuff right now. |
73d557a to
970301a
Compare
This completes the set of omicron-dev ports used in the simulated workflow that includes `run-all` and a second nexus: https://github.com/oxidecomputer/omicron/blob/main/docs/how-to-run-simulated.adoc#using-both-omicron-dev-run-all-and-running-nexus-manually
970301a to
cf8c300
Compare
|
All right, I added the other ports used in the "second nexus" workflow. It should be easy enough to group these into a config file that we can we can point to with a |
At the moment, omicron-dev starts crdb on port 0, which tells the database to use any available port. This is fine for most use cases, but less fine for running a second nexus alongside an existing run-all: https://github.com/oxidecomputer/omicron/blob/main/docs/how-to-run-simulated.adoc#using-both-omicron-dev-run-all-and-running-nexus-manually. This process involves copying the randomly selected ports from the output of run-all and writing them to a custom nexus config. To make the process simpler, this patch allows the user to configure the crdb listen port, defaulting to the current choice of 0.
cc @lgfa29. We've been talking about this to simplify automated testing of nexus upgrades for the terraform provider. Note that we'd want to be able to configure ports for a few additional services as well to make that happen—just starting with a small change at first.