-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nexus: don't require sled ID to delete v2p mappings (#4139)
Nexus's `delete_instance_v2p_mappings` fetches the target instance's DB record to get the instance's current sled ID. This allows this function to (a) skip the sled when deleting V2P mappings, and (b) obtain the sled's physical host IP to pass into a `SetVirtualNetworkInterfaceHost` parameter block to pass to sled agent. Change `delete_instance_v2p_mappings` not to need the sled ID for either of these purposes: 1. It's already safe to ask a sled to delete a V2P mapping that its XDE driver has already deleted. (Currently, this is true because explicitly asking to destroy a V2P mapping is actually a no-op. But even if it weren't, Nexus already assumes this request is idempotent, since it can be invoked from the instance deletion saga.) 2. The physical host IP is not necessary for the `oxide-vpc` lib to identify a V2P mapping for removal; only the VNI and virtual IP are needed (see `VpcMappings::del` in the OPTE repo). This helps to clear a path for upcoming changes that will make an instance's sled ID optional (i.e. it is possible for an instance not to have one, or for the last-known location of a running instance to be more challenging to reason about than this routine presupposes). Tested: cargo test, including integration test updates for tests that are affected by this behavior; ran an instance on a dev cluster, verified it was externally accessible, verified the expected sled agent calls were seen when stopping/deleting the instance, and verified a new instance that reused the previous instance's external IP was also reachable.
- Loading branch information
Showing
9 changed files
with
72 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters