Add registeredIPAddresses (reserve specific IPs in IPAM without NIC allocation)#435
Open
yingzhan-msft wants to merge 2 commits into
Open
Add registeredIPAddresses (reserve specific IPs in IPAM without NIC allocation)#435yingzhan-msft wants to merge 2 commits into
yingzhan-msft wants to merge 2 commits into
Conversation
…llocation)
Add proto support for the new registeredIPAddresses feature, which lets a
caller mark specific IPs as reserved in IPAM without allocating them to a
NIC/LB. The reserved IPs are persisted on each IPPool and survive
restarts.
Proto changes:
- rpc/common/moc_common_networkcommon.proto:
- IPPool.registeredIPAddresses (field 7): per-pool list of registered IPs
(storage layer; rehydration loops directly without re-running pool
range-routing).
- IPUpdateErrorCode enum: per-IP failure codes
(UNKNOWN, INVALID_FORMAT, OUT_OF_RANGE, SUBNET_NOT_FOUND,
ALREADY_ALLOCATED, NO_POOLS_IN_SUBNET).
- IPAddressUpdateFailure message: { SubnetName, IPAddress, Code, Error }.
- rpc/cloudagent/network/{logicalnetwork,virtualnetwork}/*.proto:
- UpdateRegisteredIPs RPC.
- {Logical,Virtual}NetworkIPUpdateRequest / Response.
- {Logical,Virtual}SubnetIPUpdate { SubnetName, RegisteredIPAddresses[] }
(subnet-scoped flat list; cloudagent routes IPs to pools by range).
The dual layer (subnet-scoped on the wire, per-pool in storage) keeps the
RPC ergonomic while making rehydration cheap and self-describing.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
962d2cc to
4bb9f73
Compare
The Error field on LogicalNetworkIPUpdateResponse and VirtualNetworkIPUpdateResponse was never reachable on the wire: the cloudagent only set it together with a non-OK gRPC status, and gRPC clients discard the response body on non-OK status. Document Failures as the per-IP failure channel and the gRPC status as the whole-batch failure channel; regenerate the .pb.go files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
madhanrm
reviewed
May 19, 2026
| // This RPC is independent of spec Update: it does not run Validate or | ||
| // validateUpdate, does not touch ProvisionState, and does not fan out | ||
| // to nodeagents. | ||
| rpc UpdateRegisteredIPs(LogicalNetworkIPUpdateRequest) returns (LogicalNetworkIPUpdateResponse) {} |
Collaborator
There was a problem hiding this comment.
Please refrain from making API changes. We do not plan to make any API changes in MOC.
It is in bug fix mode.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add registeredIPAddresses (reserve specific IPs in IPAM without NIC allocation)
Add proto support for the new registeredIPAddresses feature, which lets a
caller mark specific IPs as reserved in IPAM without allocating them to a
NIC/LB. The reserved IPs are persisted on each IPPool and survive
restarts.
Proto changes:
rpc/common/moc_common_networkcommon.proto:
(storage layer; rehydration loops directly without re-running pool
range-routing).
(UNKNOWN, INVALID_FORMAT, OUT_OF_RANGE, SUBNET_NOT_FOUND,
ALREADY_ALLOCATED, NO_POOLS_IN_SUBNET).
rpc/cloudagent/network/{logicalnetwork,virtualnetwork}/*.proto:
(subnet-scoped flat list; cloudagent routes IPs to pools by range).
The dual layer (subnet-scoped on the wire, per-pool in storage) keeps the
RPC ergonomic while making rehydration cheap and self-describing.