apache / apache/cloudstack

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

Đang mở
#13,184 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
component:networking type:improvement
Ngôn ngữ chính
Java
Star
3.1k
Fork
1.4k
Merge trung bình
6 ngày 19 giờ
Pull request đã merge (30 ngày)
32

Mô tả

### 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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu tại server/src/main/java/com/cloud/network/IpAddressManagerImpl.java, khoảng dòng 1641, và tái hiện lệnh cloudmonkey create network với --srcipaddress. Theo dõi việc xác thực cho chế độ định tuyến và các network không có SourceNat, sau đó kiểm tra việc triển khai VR với một IP công khai được chỉ định thủ công. Được coi là hoàn tất khi chế độ định tuyến chấp nhận địa chỉ, trong khi các loại network không được hỗ trợ vẫn bị từ chối.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
cloud, networking
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
52/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.