Skip to content

Add registeredIPAddresses (reserve specific IPs in IPAM without NIC allocation)#435

Draft
yingzhan-msft wants to merge 1 commit into
mainfrom
users/yingzhan/moc-reserveip
Draft

Add registeredIPAddresses (reserve specific IPs in IPAM without NIC allocation)#435
yingzhan-msft wants to merge 1 commit into
mainfrom
users/yingzhan/moc-reserveip

Conversation

@yingzhan-msft
Copy link
Copy Markdown
Contributor

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:

    • 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.

…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>
@yingzhan-msft yingzhan-msft force-pushed the users/yingzhan/moc-reserveip branch from 962d2cc to 4bb9f73 Compare May 11, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant