-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot associate a public IP to a new isolated network (4.12.0.0) #3321
Comments
@DaanHoogland as discussed previously, here is an issue to track this problem. |
tnx @svanharmelen I will try to reproduce on master to have a look see |
@svanharmelen can you add the API you use here (if you don't use the UI), please? |
i assumed |
Cool, yeah that is indeed the call that I'm trying to make... |
found https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java#L1433 that is the root of your regression. |
Yep, that seems to be it. Good find 👍 So now the question is if this is actually the desired behavior, or that it was an oversight that this will make it harder (if not impossible) to configure a network properly before using it now? |
#3125 is a fix which has this (for you undesired) result. Not sure which way to go with this, yet. |
This is a regression, thanks for reporting @svanharmelen we'll attempt to fix it soon for the next major/minor release but that does mean we cannot do anything about 4.12.0.0. |
Ok... And is there a chance we can get a 4.12.1.0 or something? As this means both Terraform and Packer will not be able to play nice with 4.12.x.x (hashicorp/packer#7557). I can fix that one specific issue, but updating to fully support 4.12.x.x will then not be possible. |
@svanharmelen i had a look at several solution paths and came across the old persistent flag. Is it feasible for you to use a network offering with the persistent flag on? It will be implemented even without instances. |
@DaanHoogland I will try to test with this today and let you know how it worked out. |
ok, if this workaround doesn't work, we'll have to tag ipadresses with their intended usage somehow in order to know which are for static and which for (one) for source NATting. |
@svanharmelen did you try that workaround? |
Yes I did! And sorry for the late reply... But t doesn't seem to make a difference. I can do some more tests early next week (I hope). |
np, I hope we get to a solution that serves both use cases. |
@DaanHoogland I tested it again and I think I didn't test it correctly last time, as now it worked as expected when I updated the network offering to be persistent. So the good thing is that I could now test all the changes and make sure the changes work. The bad thing is that if I release an updated provider using this code, people using 4.12.0.0 will still hit this error. As workaround I can tell them to use a persistent network offering, but a much better solution would be a bug fix release to mitigate this issue. Could that be an option? |
@svanharmelen, /me discussing a solution. will keep you informed. |
@svanharmelen I had a discussion about the problem. there are two possible fixes but the underlying problem will remain in both cases.
Can you test solution 1? I think it is more viable in production environments than solution 2. of course there is a third solution, refactoring the way IpAddressManager works, but this will require the most time. I cannot even start planning that. /cc @rhtyd @PaulAngus |
@DaanHoogland as already mentioned, option 1 works and allows me to test all the logic using the simulator. So that is good news! But my remaining issue (worry) is that when people are using the updated code against a real environment they will encounter the same issue. And then asking everyone to update their network offerings seems like as poor solution for them. |
Yes, @svanharmelen. |
@DaanHoogland |
@ustcweizhou , I am not sure. |
That could also work. In the Terraform network resource I added a source_nat_ip option that adds the NAT IP right after creating the network. This abstracts the problem for our users a little, but now fails with 4.12.x.x |
@svanharmelen am I right in assuming that this will be fixed at next Cloudstack release 4.13 if none of the above options will move forward ? |
@nlindblo please define |
@svanharmelen Sorry for being unclear, basically I mean if Packer & Terraform will work again after the 4.13 Cloudstack release or if I need to consider rolling back to 4.11 to continue using the Hashicorp tools |
@nlindblo no problem! I think Packer should work as expected (it already updated to support 4.12. Terraform should work as well, except for creating certain network types. If you encounter any specific errors that seems other than mentioned here, please open an issue with the related tool. Thanks! |
@svanharmelen I'm still getting "cannot unmarshal string into Go struct field DeployVirtualMachineResponse.ostypeid of type int64" when running packer 1.4.1 as per hashicorp/packer#7557 |
If you look at the CHANGELOG you'll see that the CloudStack fix is not part of |
Actual issue reference: https://issues.apache.org/jira/browse/CLOUDSTACK-4045 cc @shwstppr |
|
Fixes #3321 This changes removes exception throwing while associating an IP address to a new isolated network which is in Allocated state. And it allows disassociating an IP address when it is used for source NAT purpose but network is in allocated state. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
I'm running my tests against the simulator container which I configured with an advanced datacenter setup:
python /root/tools/marvin/marvin/deployDataCenter.py -i /root/setup/dev/advanced.cfg
OS / ENVIRONMENT
N/A
SUMMARY
When creating an isolated network and then try to assign a public IP to the network, I get the following error:
This worked fine with the 4.11.2.0 simulator container, but now fails with 4.12.0.0.
STEPS TO REPRODUCE
Create a new isolated (
DefaultIsolatedNetworkOfferingWithSourceNatService
) network using thecreateNetwork
API call. Then try to assign a public IP using theassociateIpAddress
API call.EXPECTED RESULTS
Don't get any errors and get a network with a public IP that will be it's source NAT IP.
ACTUAL RESULTS
A network without a public IP and this error:
The text was updated successfully, but these errors were encountered: