Repository navigation
remove listen_addr requirement for rpw startup - #117
Conversation
|
Initially I was a bit concerned about how this would interact with early networking. As this will result in the RPW starting up sooner. But it looks like we assign a non-localhost address in |
That sounds correct to me. If the RPW starts up before nexus is available, that should not be a big deal since it will sleep and retry again later. At a high(er) level, I came to the conclusion that the RPW startup logic should not concern itself at all with the listen addresses for dendrite's API, since we have separate logic in place managing the listen addresses and SMF updates there, and the only information the RPW really requires to get started is the address to reach nexus on, which is provided upon startup or via DNS. Overall, a racklette run sounds like a great confidence booster as well. |
|
Sanity check on madrid: We can see that the rpw in dendrite waits until it gets an SMF update to build the nexus client, then when it tries to reach nexus before exus is up it gets a communication error and retries later, eventually running successfully once nexus is available. |
…e is unresponsive (#8914) This PR addresses two issues that impacts users in circumstances where a switch zone is unavailable: 1. When resolving which switch slot is managed by which switch zone, we would continuously retry whenever there was a communication error. This causes RPWs to stop running / Sagas to get stuck whenever a switch zone becomes unavailable but still has entries in DNS. 2. In the `dpd_ensure` node of the `instance_start` saga, we were bailing out if we encountered any errors while notifying dpd of nat changes. This means that in the event of one of our switch zones being unavailable we would no longer allow users to start instances, which is probably a bit too strict. This PR makes the following adjustments to the switch slot resolution behavior: * Log an error instead of a warning whenever a DNS entry exists for a switch zone service but communication fails * Return the mappings of the Slot -> Address for the switch zones that we were successfully able to resolve * Let the caller decide whether or not they should retry or proceed. After checking all of the current call sites, it appears that the logic already accommodates scenarios where switch zone mappings are missing. This PR makes the following changes to the behavior to the NAT configuration steps for instance related sagas: * Do not bail if we fail to notify a dendrite service of NAT changes. Log a warning and rely on the NAT RPW to catch us back up whenever the switch zone becomes available again. Still return a `Result` from the `notify` function so that callers can decide if they want to make a subsequent decision based on the error. This PR makes the following changes to the behavior of NAT garbage collection: * Pause GC (exit early) if we detect that both switches cannot be reached Before now, due to a configuration issue, the instant start saga tests weren't actually driving ensuring that NAT configurations were eventually landing on the dendrite instances. It also turns out that Nexus in the `TestContext` could not actually communicate with dendrite because the port values were hard coded and our resolution logic relied on comparing the different addresses for MGS (and all mgs instances listen on localhost in testing). This PR introduces the following changes: * Use an updated version of Dendrite that allows us to provide a MGS `SocketAddr` on startup so it can use a simulated MGS to learn switch slot information * Adjust the `TestContext` Builder logic to provide MGS information to dendrite * Have Nexus ask dendrite for its switch slot information instead of having Nexus attempt to resolve it via MGS * Change the test configuration to create a NIC for the instance so we actually exercise the NAT creation logic in the `dpd_ensure` saga node * Introduce a test that ensures we still land configurations on the remaining switch even when one of our switches are unavailable Related --- #8206 #6896 #8999 Depends On --- oxidecomputer/dendrite#117 --------- Co-authored-by: David Pacheco <[email protected]>
Required for oxidecomputer/omicron#8914
We were requiring non-localhost
listen_addrs for NAT RPW startup, and there isn't really a good reason to do so (this may have just been a copy-paste thing). Requiring non-localhost listen addrs means that the RPW will never run in the omicron test suite, since the test suite exclusively uses localhost listen addrs.We also allow the optional injection of
mgs_addrso that we can get dendrite working properly in the test suite. Normally we can just listen onlocalhost:[MGS_PORT]but once again, the omicron test suite relies on randomized ports so it can run multiple tests in parallel, so we can't exclusively rely on that pattern if we want dendrite to work properly in the omicron test environment.