apache / apache/cloudstack

VR implementation on Shared network with multiple Guest IP ranges fails

オープン
#13,616 コメント 2 件 リアクション 0 件 担当者 1 名 @sureshanaparti が担当を希望しています GitHub で見る
component:advanced-networking component:networking component:virtual-router
主要言語
Java
スター
3.1k
フォーク
1.4k
平均マージ
6日 19時間
マージ済み PR(30日)
32

説明

### problem

It was observed when creating a Shared network with multiple Guest IP ranges, the VR deployment fails but a parsing error:

````
null,"instanceType":null,"lastPolled":null,"lastUpdated":null,"processStatus":0,"removed":null,"result":null,"resultCode":0,"status":"IN_PROGRESS","userId":2,"uuid":"181dd803-48fb-4cae-bcdd-a4588a725ce4"}, job origin: 311 java.lang.NumberFormatException: For input string: "24,172.30.11.0"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Long.parseLong(Long.java:709)
at java.base/java.lang.Long.parseLong(Long.java:832)
at com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:971)
at com.cloud.network.router.VirtualNetworkApplianceManagerImpl.createGuestBootLoadArgs(VirtualNetworkApplianceManagerImpl.java:2198)
at com.cloud.network.router.VirtualNetworkApplianceManagerImpl.finalizeVirtualMachineProfile(VirtualNetworkApplianceManagerImpl.java:1991)
at com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl.finalizeVirtualMachineProfile(VpcVirtualNetworkApplianceManagerImpl.java:363)
````

In my environment, the conflicting value is coming from the network cidr value as a comma-separated value from both ranges:

````
mysql> select id, name, network_cidr, cidr from networks where id = 214;
+-----+-------------+--------------+-------------------------------+
| id | name | network_cidr | cidr |
+-----+-------------+--------------+-------------------------------+
| 214 | Shared-Test | NULL | 172.30.10.0/24,172.30.11.0/24 |
+-----+-------------+--------------+-------------------------------+
1 row in set (0.00 sec)
````

### versions

4.22.0, 4.22.1

### The steps to reproduce the bug

Scenario 1:

1. Create a Shared network
2. Add a second Guest IP range
3. Deploy VM on the network -> VR fails with error above

Scenario 1:

1. Create a Shared network
2. Deploy VM on the network -> succeeds
3. Add a second Guest IP range
4. Restart network with cleanup -> VR fails with error above

### What to do about it?

_No response_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。