New feature: Acquire specific public IP for network#3775
Conversation
Currently in cloudstack, when we click on "Acquire New Ip", it will randomly acquire IP from the pool. With this enhancement, it is possible to select the IP from the drop down IP list of that network. Same thing applies for a VPC as well.
DaanHoogland
left a comment
There was a problem hiding this comment.
code looks good, marvin test included. wonder if unit test would make sense.
|
Can I specify a public IP when creating an isolated network or VPC? |
anuragaw
left a comment
There was a problem hiding this comment.
Code looks good. Haven't tested though.
One question - When the IP Address requested is invalid or unavailable in user_ip_address do we add that reason in exception or log it? (could'nt see it).
If you comment out the first diff in network.js then you can specify any free IP in that network or VPC |
The dropdown displays only the "Free" IP's available in that particular network or VPC. If there are not free IP in that network/VPC then it wont display the drop down list |
But that doesn't cover API usage outside UI @rakgenius , which is how a large number of users access CS. |
@anuragaw Just tested it and if the IP is already allocated, it will throw |
anuragaw
left a comment
There was a problem hiding this comment.
Perfect, that's what I was looking for. Some mention of IP not available along with the exception. Even though it's a warning- 2019-12-20 15:42:35,163 WARN [c.c.n.IpAddressManagerImpl] (qtp858242339-18:ctx-9d0b2eb1 ctx-a86c335b) (logid:5b743076) Unable to get ip address in zone id=1, vlanId id=[1]: requested ip 10.11.113.150 is not available
|
Running Marvin Tests on the PR. @blueorangutan package |
|
@anuragaw a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-497 |
|
@blueorangutan test |
|
@anuragaw a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
We can merge after tests job above succeeds. |
|
Trillian test result (tid-660)
|
anuragaw
left a comment
There was a problem hiding this comment.
LGTM based on code and marvin tests
|
@anuragaw @DaanHoogland can this be merged? |
|
LGTM to be merged @rakgenius , just need to wait for some commitor's attention to have it in. (I am NOT yet a committor in ACS) |
|
@rakgenius I think you have a seat near to Wei's? ;) |
@DaanHoogland :P I sit next to him :) thanks for merging |
|
@DaanHoogland @anuragaw this was merged without an "outsider" testing this (i.e. person different to the author) which I believe we discussed to make sure is happening when possible. This breaks backward compatibility (in GUI at least) since ipaddress=-1 is sent to the API, instead of omitting this parameter when IP is not selected (which works fine, as before). @rakgenius can you please fix this in a new PR - or revert this PR and make a new one with the fix included? |
|
@andrijapanicsb I will make a new PR to fix this issue. |
|
@andrijapanicsb I have created a new PR in #3790 |
|
cool - thx! |
Currently in cloudstack, when we click on "Acquire New Ip", it will randomly acquire IP from the pool. With this enhancement, it is possible to select the IP from the drop down IP list of that network. Same thing applies for a VPC as well.


Description
Currently in cloudstack, when we click on "Acquire New Ip", it will
randomly acquire IP from the pool. With this enhancement, it is
possible to select the IP from the drop down IP list of that network.
Same thing applies for a VPC as well.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
1 . Navigate to "Networks" section in the main UI
2 . Select any network from the list.
3 . Click on "View IP address" button.
4 . Now click on "Acquire New IP" button on the top right. This will open up a new pop up window with drop down list of all IP address belonging to that network
5 . Select any of the IP address.