apache / apache/cloudstack

Allow manual assignment of VR public IP address in Routed Mode networks

未关闭
#13,184 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
component:networking type:improvement
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

### The required feature described as a wish

Hi,

**Description**

In routed mode networks, the VR currently receives its public IP address dynamically from the available public IP pool. There is no supported mechanism to manually assign or pin a specific public IP address to the VR itself.

For operators integrating CloudStack into existing routed infrastructure, deterministic VR public IP assignment is often required for:

- Upstream firewall rules
- Static routing policies
- BGP/edge integrations
- Monitoring and observability
- DNS and reverse DNS consistency
- HA/failover operational predictability
- Migration scenarios from existing infrastructure

**Current Behavior**

When a routed mode network is created, the VR public IP is automatically selected from the public IP range by CloudStack.

**Operators cannot:**

- Specify a desired public IP during network creation
- Reserve a public IP specifically for VR assignment
- Reassign the VR to a chosen public IP after deployment

**Proposed Feature**

As an Operator I would like to deterministicly assign public IP address of a VR in Routed Mode networks.

**Proof of Concept / Observed Behavior**

I tested this by modifying the validation logic that currently rejects --srcipaddress on networks without NAT enabled (which includes routed mode networks).

After relaxing the conditional check to allow --srcipaddress in routed networks [(Starting here)](https://github.com/apache/cloudstack/blob/5893ba5a8c00aa445be252e2dd0bc557b0cec3fc/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java#L1641), the VR was successfully deployed using the manually specified public IP and operated correctly.

This suggests the limitation is primarily an API/CLI validation restriction rather than a fundamental networking or VR capability limitation.

**Example**

**Current behavior:**

`cloudmonkey create network ... --srcipaddress=`

Give a result that the parameter srcipaddress is not supported for networks without SourceNat.

**Modified behavior:**

Allow srcipaddress for routed mode networks
VR deploys successfully with the specified public IP

**Suggestion**

The validation logic could potentially be updated to:

- Continue rejecting srcipaddress for unsupported network types
- Explicitly allow it for routed mode networks where deterministic VR addressing is desired

What are your thoughts?

贡献指南

打开贡献指南

调研方向

从 server/src/main/java/com/cloud/network/IpAddressManagerImpl.java 第 1641 行附近开始,复现带有 --srcipaddress 的 cloudmonkey create network 命令。跟踪路由模式和不带 SourceNat 的网络的验证,然后使用手动指定的公共 IP 验证 VR 部署。完成标准是路由模式接受该地址,同时不支持的网络类型仍被拒绝。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
cloud, networking
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。