You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
"description": "The data needed to identify a virtual IP for which a sled maintains an OPTE virtual-to-physical mapping such that that mapping can be deleted.",
1176
+
"type": "object",
1177
+
"properties": {
1178
+
"virtual_ip": {
1179
+
"description": "The virtual IP whose mapping should be deleted.",
1180
+
"type": "string",
1181
+
"format": "ip"
1182
+
},
1183
+
"vni": {
1184
+
"description": "The VNI for the network containing the virtual IP whose mapping should be deleted.",
1185
+
"allOf": [
1186
+
{
1187
+
"$ref": "#/components/schemas/Vni"
1188
+
}
1189
+
]
1190
+
}
1191
+
},
1192
+
"required": [
1193
+
"virtual_ip",
1194
+
"vni"
1195
+
]
1196
+
},
1174
1197
"DiskEnsureBody": {
1175
1198
"description": "Sent from to a sled agent to establish the runtime state of a Disk",
0 commit comments