[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2019-01-23 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16749866#comment-16749866
 ] 

ASF subversion and git services commented on CLOUDSTACK-4045:
-

Commit 323f791efca6f1d5b8bb63573d9e385c97c427e1 in cloudstack's branch 
refs/heads/master from Dingane Hlaluku
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=323f791 ]

IP address acquired with associate ip address is marked as source nat (#3125)

* CLOUDSTACK-4045 added a check for network state when determining whether a 
new IP should be source NAT. this prevents associated IP's to be marked as 
source NAT when the network is in allocated state, causing 
disassociateIpAddress to fail later

* Remove mock object that cause other tests to fail

* Remove underscores from variable types and add documentation for the created 
method

* Improve exception message to include network name

* Include network UUID with the Exception message and fix failing marvin test

* Rebase against latest master and format AssociateIPAddrCmd class


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-12-04 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16709204#comment-16709204
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


GabrielBrascher commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-444240916
 
 
   @houthuis can you please rebase against the latest master?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-09-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16624714#comment-16624714
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


DaanHoogland commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-423752319
 
 
   @houthuis can you rebase again?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-09-21 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16623734#comment-16623734
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis closed pull request #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java 
b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
index ec7adfd1057..4c4a9ec7369 100644
--- a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
@@ -1378,16 +1378,7 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
-NetworkOffering offering = 
_networkOfferingDao.findById(network.getNetworkOfferingId());
-boolean sharedSourceNat = offering.getSharedSourceNat();
-boolean isSourceNat = false;
-if (!sharedSourceNat) {
-if (getExistingSourceNatInNetwork(owner.getId(), networkId) == 
null) {
-if (network.getGuestType() == GuestType.Isolated && 
network.getVpcId() == null && !ipToAssoc.isPortable()) {
-isSourceNat = true;
-}
-}
-}
+boolean isSourceNat = isSourceNatAvailableForNetwork(owner, ipToAssoc, 
network);
 
 s_logger.debug("Associating ip " + ipToAssoc + " to network " + 
network);
 
@@ -1425,6 +1416,25 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
+protected boolean isSourceNatAvailableForNetwork(Account owner, 
IPAddressVO ipToAssoc, Network network) {
+NetworkOffering offering = 
_networkOfferingDao.findById(network.getNetworkOfferingId());
+boolean sharedSourceNat = offering.getSharedSourceNat();
+boolean isSourceNat = false;
+if (!sharedSourceNat) {
+if (getExistingSourceNatInNetwork(owner.getId(), network.getId()) 
== null) {
+if (network.getGuestType() == GuestType.Isolated && 
network.getVpcId() == null && !ipToAssoc.isPortable()) {
+if (network.getState() == Network.State.Allocated) {
+//prevent associating an ip address to an allocated 
(unimplemented network).
+//it will cause the ip to become source nat, and it 
can't be disassociated later on.
+throw new InvalidParameterValueException("Network is 
in allocated state, implement network first before acquiring an IP address");
+}
+isSourceNat = true;
+}
+}
+}
+return isSourceNat;
+}
+
 protected boolean isSharedNetworkOfferingWithServices(long 
networkOfferingId) {
 NetworkOfferingVO networkOffering = 
_networkOfferingDao.findById(networkOfferingId);
 if ((networkOffering.getGuestType() == Network.GuestType.Shared)
diff --git a/server/src/test/java/com/cloud/network/IpAddressManagerTest.java 
b/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
index 2bf989c7c1f..64e8c3419e1 100644
--- a/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
+++ b/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
@@ -17,7 +17,10 @@
 
 package com.cloud.network;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.anyLong;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -32,12 +35,20 @@
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
+import org.mockito.Spy;
 
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.network.Network.Service;
 import com.cloud.network.dao.IPAddressDao;
 import com.cloud.network.dao.IPAddressVO;
+import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
 import com.cloud.network.rules.StaticNat;
 import com.cloud.network.rules.StaticNatImpl;
+import com.cloud.offerings.NetworkOfferingVO;
+import com.cloud.offerings.dao.NetworkOfferingDao;
+import com.cloud.user.AccountVO;
 import com.cloud.utils.net.Ip;
 
 public class IpAddressManagerTest {
@@ -45,15 +56,41 @@
 @Mock
 IPAddressDao _ipAddrDao;
 
+@Mock
+NetworkDao _networkDao;
+
+@Mock
+NetworkOfferingDao _networkOfferingDao;
+
+@Mock
+

[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-09-21 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16623735#comment-16623735
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis opened a new pull request #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382
 
 
   added a check for network state when determining whether a new IP should be 
source NAT. this prevents associated IP's to be marked as source NAT when the 
network is in allocated state, causing disassociateIpAddress to fail later
   
   Code will now throw a InvalidParameterValueException in the above scenario.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-09-21 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16623365#comment-16623365
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-423482258
 
 
   > can you fix the conflict @houthuis
   
   @rohit done, awaiting test results


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-09-18 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16618900#comment-16618900
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rhtyd commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-422344136
 
 
   can you fix the conflict @houthuis 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-21 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16482271#comment-16482271
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rhtyd commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-390579519
 
 
   Ping @houthuis 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16469064#comment-16469064
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


DaanHoogland commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-387801824
 
 
   I think it is a bugfix, but no biggy. tried to just retarget but that pulls 
in unwanted stuff: rebase needed! @houthuis @rhtyd 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16469031#comment-16469031
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rhtyd commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-387796184
 
 
   @houthuis @DaanHoogland @nvazquez @PaulAngus @borisstoyanov  ping - can 
anyone advise if this needs to be in 4.11 or we should keep for master?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16462229#comment-16462229
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-386246094
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1999


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16462171#comment-16462171
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rhtyd commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-386237029
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16462174#comment-16462174
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-386237167
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16461543#comment-16461543
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-386094830
 
 
   Trillian test result (tid-2575)
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 26440 seconds
   Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2382-t2575-kvm-centos7.zip
   Intermitten failure detected: /marvin/tests/smoke/test_certauthority_root.py
   Intermitten failure detected: /marvin/tests/smoke/test_internal_lb.py
   Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
   Intermitten failure detected: /marvin/tests/smoke/test_volumes.py
   Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py
   Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py
   Smoke tests completed. 63 look OK, 4 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_secured_vm_migration | `Error` | 37.52 | test_vm_life_cycle.py
   test_02_not_secured_vm_migration | `Error` | 38.54 | test_vm_life_cycle.py
   test_03_secured_to_nonsecured_vm_migration | `Error` | 38.55 | 
test_vm_life_cycle.py
   test_04_nonsecured_to_secured_vm_migration | `Error` | 38.53 | 
test_vm_life_cycle.py
   test_11_migrate_volume_and_change_offering | `Error` | 129.43 | 
test_volumes.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 375.30 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 155.24 | test_vpc_vpn.py
   test_hostha_enable_ha_when_host_in_maintenance | `Error` | 4.69 | 
test_hostha_kvm.py
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16460917#comment-16460917
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rhtyd commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-385950273
 
 
   @blueorangutan test


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16460919#comment-16460919
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-385950452
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been 
kicked to run smoke tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16460909#comment-16460909
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-385947928
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1993


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16460880#comment-16460880
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rhtyd commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-385942642
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16460881#comment-16460881
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-385942661
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-05-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16460851#comment-16460851
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-385935862
 
 
   @DaanHoogland thanks for running the tests, I am happy.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16457472#comment-16457472
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-385155441
 
 
   @DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has 
been kicked to run smoke tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16457471#comment-16457471
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


DaanHoogland commented on issue #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-385155400
 
 
   @houthuis can you considder @rafaelweingartner 's comment?
   @blueorangutan test


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-04-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16454217#comment-16454217
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rafaelweingartner commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-384644724
 
 
   @DaanHoogland are you happy with the tests result? Or, would you like to 
execute them again?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-04-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16454214#comment-16454214
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rafaelweingartner commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-384644414
 
 
   @blueorangutan package.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-04-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16454208#comment-16454208
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rafaelweingartner commented on a change in pull request #2382: CLOUDSTACK-4045 
IP address acquired with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#discussion_r184392158
 
 

 ##
 File path: server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
 ##
 @@ -1417,6 +1408,25 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
+protected boolean isSourceNatAvailableForNetwork(Account owner, 
IPAddressVO ipToAssoc, Network network) {
 
 Review comment:
   To make it perfect a Java documentation describing when an IP is considered 
source NAT would be welcome.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-02-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16352299#comment-16352299
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis opened a new pull request #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382
 
 
   added a check for network state when determining whether a new IP should be 
source NAT. this prevents associated IP's to be marked as source NAT when the 
network is in allocated state, causing disassociateIpAddress to fail later
   
   Code will now throw a InvalidParameterValueException in the above scenario.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-02-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16352298#comment-16352298
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


DaanHoogland closed pull request #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java 
b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
index c00359c92f0..d0b3098c3d3 100644
--- a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
@@ -1370,16 +1370,7 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
-NetworkOffering offering = 
_networkOfferingDao.findById(network.getNetworkOfferingId());
-boolean sharedSourceNat = offering.getSharedSourceNat();
-boolean isSourceNat = false;
-if (!sharedSourceNat) {
-if (getExistingSourceNatInNetwork(owner.getId(), networkId) == 
null) {
-if (network.getGuestType() == GuestType.Isolated && 
network.getVpcId() == null && !ipToAssoc.isPortable()) {
-isSourceNat = true;
-}
-}
-}
+boolean isSourceNat = isSourceNatAvailableForNetwork(owner, ipToAssoc, 
network);
 
 s_logger.debug("Associating ip " + ipToAssoc + " to network " + 
network);
 
@@ -1417,6 +1408,25 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
+protected boolean isSourceNatAvailableForNetwork(Account owner, 
IPAddressVO ipToAssoc, Network network) {
+NetworkOffering offering = 
_networkOfferingDao.findById(network.getNetworkOfferingId());
+boolean sharedSourceNat = offering.getSharedSourceNat();
+boolean isSourceNat = false;
+if (!sharedSourceNat) {
+if (getExistingSourceNatInNetwork(owner.getId(), network.getId()) 
== null) {
+if (network.getGuestType() == GuestType.Isolated && 
network.getVpcId() == null && !ipToAssoc.isPortable()) {
+if (network.getState() == Network.State.Allocated) {
+//prevent associating an ip address to an allocated 
(unimplemented network).
+//it will cause the ip to become source nat, and it 
can't be disassociated later on.
+throw new InvalidParameterValueException("Network is 
in allocated state, implement network first before acquiring an IP address");
+}
+isSourceNat = true;
+}
+}
+}
+return isSourceNat;
+}
+
 protected boolean isSharedNetworkOfferingWithServices(long 
networkOfferingId) {
 NetworkOfferingVO networkOffering = 
_networkOfferingDao.findById(networkOfferingId);
 if ((networkOffering.getGuestType() == Network.GuestType.Shared)
diff --git a/server/src/test/java/com/cloud/network/IpAddressManagerTest.java 
b/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
index 0bf92ee2f69..fe11292e826 100644
--- a/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
+++ b/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
@@ -17,38 +17,74 @@
 
 package com.cloud.network;
 
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
+import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
+import com.cloud.network.rules.StaticNat;
+import com.cloud.network.rules.StaticNatImpl;
+import com.cloud.offerings.NetworkOfferingVO;
+import com.cloud.offerings.dao.NetworkOfferingDao;
+import com.cloud.user.AccountVO;
+import com.cloud.utils.net.Ip;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
-
-import com.cloud.network.dao.IPAddressDao;
-import com.cloud.network.dao.IPAddressVO;
-import com.cloud.network.rules.StaticNat;
-import com.cloud.network.rules.StaticNatImpl;
-import com.cloud.utils.net.Ip;
-
-import static org.mockito.Mockito.when;
+import org.mockito.Spy;
 
 import java.util.Collections;
 import java.util.List;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static 

[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-02-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16350007#comment-16350007
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis opened a new pull request #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382
 
 
   added a check for network state when determining whether a new IP should be 
source NAT. this prevents associated IP's to be marked as source NAT when the 
network is in allocated state, causing disassociateIpAddress to fail later
   
   Code will now throw a InvalidParameterValueException in the above scenario.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-02-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16350006#comment-16350006
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis closed pull request #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java 
b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
index c00359c92f0..d0b3098c3d3 100644
--- a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
@@ -1370,16 +1370,7 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
-NetworkOffering offering = 
_networkOfferingDao.findById(network.getNetworkOfferingId());
-boolean sharedSourceNat = offering.getSharedSourceNat();
-boolean isSourceNat = false;
-if (!sharedSourceNat) {
-if (getExistingSourceNatInNetwork(owner.getId(), networkId) == 
null) {
-if (network.getGuestType() == GuestType.Isolated && 
network.getVpcId() == null && !ipToAssoc.isPortable()) {
-isSourceNat = true;
-}
-}
-}
+boolean isSourceNat = isSourceNatAvailableForNetwork(owner, ipToAssoc, 
network);
 
 s_logger.debug("Associating ip " + ipToAssoc + " to network " + 
network);
 
@@ -1417,6 +1408,25 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
+protected boolean isSourceNatAvailableForNetwork(Account owner, 
IPAddressVO ipToAssoc, Network network) {
+NetworkOffering offering = 
_networkOfferingDao.findById(network.getNetworkOfferingId());
+boolean sharedSourceNat = offering.getSharedSourceNat();
+boolean isSourceNat = false;
+if (!sharedSourceNat) {
+if (getExistingSourceNatInNetwork(owner.getId(), network.getId()) 
== null) {
+if (network.getGuestType() == GuestType.Isolated && 
network.getVpcId() == null && !ipToAssoc.isPortable()) {
+if (network.getState() == Network.State.Allocated) {
+//prevent associating an ip address to an allocated 
(unimplemented network).
+//it will cause the ip to become source nat, and it 
can't be disassociated later on.
+throw new InvalidParameterValueException("Network is 
in allocated state, implement network first before acquiring an IP address");
+}
+isSourceNat = true;
+}
+}
+}
+return isSourceNat;
+}
+
 protected boolean isSharedNetworkOfferingWithServices(long 
networkOfferingId) {
 NetworkOfferingVO networkOffering = 
_networkOfferingDao.findById(networkOfferingId);
 if ((networkOffering.getGuestType() == Network.GuestType.Shared)
diff --git a/server/src/test/java/com/cloud/network/IpAddressManagerTest.java 
b/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
index 0bf92ee2f69..fe11292e826 100644
--- a/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
+++ b/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
@@ -17,38 +17,74 @@
 
 package com.cloud.network;
 
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
+import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
+import com.cloud.network.rules.StaticNat;
+import com.cloud.network.rules.StaticNatImpl;
+import com.cloud.offerings.NetworkOfferingVO;
+import com.cloud.offerings.dao.NetworkOfferingDao;
+import com.cloud.user.AccountVO;
+import com.cloud.utils.net.Ip;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
-
-import com.cloud.network.dao.IPAddressDao;
-import com.cloud.network.dao.IPAddressVO;
-import com.cloud.network.rules.StaticNat;
-import com.cloud.network.rules.StaticNatImpl;
-import com.cloud.utils.net.Ip;
-
-import static org.mockito.Mockito.when;
+import org.mockito.Spy;
 
 import java.util.Collections;
 import java.util.List;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static 

[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-02-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16348388#comment-16348388
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis opened a new pull request #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382
 
 
   added a check for network state when determining whether a new IP should be 
source NAT. this prevents associated IP's to be marked as source NAT when the 
network is in allocated state, causing disassociateIpAddress to fail later
   
   Code will now throw a InvalidParameterValueException in the above scenario.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-02-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16348387#comment-16348387
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis closed pull request #2382: CLOUDSTACK-4045 IP address acquired with 
associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java 
b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
index c00359c92f0..d0b3098c3d3 100644
--- a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
@@ -1370,16 +1370,7 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
-NetworkOffering offering = 
_networkOfferingDao.findById(network.getNetworkOfferingId());
-boolean sharedSourceNat = offering.getSharedSourceNat();
-boolean isSourceNat = false;
-if (!sharedSourceNat) {
-if (getExistingSourceNatInNetwork(owner.getId(), networkId) == 
null) {
-if (network.getGuestType() == GuestType.Isolated && 
network.getVpcId() == null && !ipToAssoc.isPortable()) {
-isSourceNat = true;
-}
-}
-}
+boolean isSourceNat = isSourceNatAvailableForNetwork(owner, ipToAssoc, 
network);
 
 s_logger.debug("Associating ip " + ipToAssoc + " to network " + 
network);
 
@@ -1417,6 +1408,25 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
+protected boolean isSourceNatAvailableForNetwork(Account owner, 
IPAddressVO ipToAssoc, Network network) {
+NetworkOffering offering = 
_networkOfferingDao.findById(network.getNetworkOfferingId());
+boolean sharedSourceNat = offering.getSharedSourceNat();
+boolean isSourceNat = false;
+if (!sharedSourceNat) {
+if (getExistingSourceNatInNetwork(owner.getId(), network.getId()) 
== null) {
+if (network.getGuestType() == GuestType.Isolated && 
network.getVpcId() == null && !ipToAssoc.isPortable()) {
+if (network.getState() == Network.State.Allocated) {
+//prevent associating an ip address to an allocated 
(unimplemented network).
+//it will cause the ip to become source nat, and it 
can't be disassociated later on.
+throw new InvalidParameterValueException("Network is 
in allocated state, implement network first before acquiring an IP address");
+}
+isSourceNat = true;
+}
+}
+}
+return isSourceNat;
+}
+
 protected boolean isSharedNetworkOfferingWithServices(long 
networkOfferingId) {
 NetworkOfferingVO networkOffering = 
_networkOfferingDao.findById(networkOfferingId);
 if ((networkOffering.getGuestType() == Network.GuestType.Shared)
diff --git a/server/src/test/java/com/cloud/network/IpAddressManagerTest.java 
b/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
index 0bf92ee2f69..fe11292e826 100644
--- a/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
+++ b/server/src/test/java/com/cloud/network/IpAddressManagerTest.java
@@ -17,38 +17,74 @@
 
 package com.cloud.network;
 
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
+import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
+import com.cloud.network.rules.StaticNat;
+import com.cloud.network.rules.StaticNatImpl;
+import com.cloud.offerings.NetworkOfferingVO;
+import com.cloud.offerings.dao.NetworkOfferingDao;
+import com.cloud.user.AccountVO;
+import com.cloud.utils.net.Ip;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
-
-import com.cloud.network.dao.IPAddressDao;
-import com.cloud.network.dao.IPAddressVO;
-import com.cloud.network.rules.StaticNat;
-import com.cloud.network.rules.StaticNatImpl;
-import com.cloud.utils.net.Ip;
-
-import static org.mockito.Mockito.when;
+import org.mockito.Spy;
 
 import java.util.Collections;
 import java.util.List;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static 

[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-02-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16348255#comment-16348255
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 IP address acquired 
with associateIpAddress is marked as source NAT
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-362204779
 
 
   Packaging result: ✔centos6 ✖centos7 ✔debian. JID-1686


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-02-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16348221#comment-16348221
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-362198232
 
 
   @DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-02-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16348220#comment-16348220
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


DaanHoogland commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-362198015
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16338992#comment-16338992
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


borisstoyanov commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-360413145
 
 
   @houthuis can you please resolve the merge conflicts and we can run tests on 
it again


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
>Priority: Major
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-13 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325160#comment-16325160
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


DaanHoogland commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-357441864
 
 
   looks like the tests are ok, as well @houthuis . let's rerun after the 
stabalisation fixes and last features for 4.11 are merged. but given no 
conflicts this can go in right after 4.11 is branched off. Pleae edit the title 
btw. Just a issue number is a bit meagre. something like "acquire 
associateIpAddress as SNAT" on the side? Maybe you/we can do better.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Henko Holtzhausen
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310733#comment-16310733
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rhtyd commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-355201625
 
 
   @houthuis looks like some failures both in travis and trillian results, can 
you check?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310578#comment-16310578
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-355176386
 
 
   Trillian test result (tid-1992)
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 35953 seconds
   Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2382-t1992-kvm-centos7.zip
   Intermitten failure detected: /marvin/tests/smoke/test_network.py
   Intermitten failure detected: /marvin/tests/smoke/test_portforwardingrules.py
   Intermitten failure detected: /marvin/tests/smoke/test_volumes.py
   Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py
   Smoke tests completed. 63 look OK, 4 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestPublicIP>:setup | `Error` | 82.69 | test_network.py
   test_01_create_delete_portforwarding_fornonvpc | `Error` | 6.19 | 
test_portforwardingrules.py
   test_07_resize_fail | `Failure` | 15.34 | test_volumes.py
   test_04_rvpc_network_garbage_collector_nics | `Failure` | 290.23 | 
test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 352.21 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 393.02 | test_vpc_redundant.py
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309802#comment-16309802
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-355042151
 
 
   @DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has 
been kicked to run smoke tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309801#comment-16309801
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


DaanHoogland commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-355042084
 
 
   @blueorangutan test


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309572#comment-16309572
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354999844
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1557


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309547#comment-16309547
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354995421
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309546#comment-16309546
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rhtyd commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354995296
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309434#comment-16309434
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


rhtyd commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354979613
 
 
   @houthuis looks like we're at capacity, we currently don't have you in the 
`bo` ACLs to allow kicking tests.
   Use @blueorangutan help to see options and ACl list.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309438#comment-16309438
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354979672
 
 
   @rhtyd I understand these words: "help", "hello", "thanks", "package", "test"
   Test command usage: test [mgmt os] [hypervisor] [additional tests]
   Mgmt OS options: ['centos6', 'centos7', 'ubuntu']
   Hypervisor options: ['kvm-centos6', 'kvm-centos7', 'kvm-ubuntu', 
'xenserver-65sp1', 'xenserver-62sp1', 'vmware-65', 'vmware-60u2', 
'vmware-55u3', 'vmware-51u1', 'vmware-50u1']
   Additional tests: list of space separated tests with paths relative to the 
`test/integration` directory, for example: component/test_acl_listvm.py 
component/test_volumes.py
   Note: when additional tests are passed, you need to specify mgmt server os 
and hypervisor or use the `matrix` command.
   
   Blessed contributors for kicking Trillian test jobs: ['rhtyd', 'nvazquez', 
'PaulAngus', 'borisstoyanov', 'DaanHoogland']


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309271#comment-16309271
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354956223
 
 
   @blueorangutan test


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309270#comment-16309270
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354956141
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1550


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309253#comment-16309253
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354952773
 
 
   @houthuis a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309252#comment-16309252
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354952738
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16308147#comment-16308147
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354779818
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1547


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16308112#comment-16308112
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis commented on a change in pull request #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#discussion_r159235216
 
 

 ##
 File path: server/src/com/cloud/network/IpAddressManagerImpl.java
 ##
 @@ -1394,6 +1380,25 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
+protected boolean isSourceNatAvailableForNetwork(long networkId, Account 
owner, IPAddressVO ipToAssoc, Network network) {
 
 Review comment:
   no, not really. must be a result of intellij's extract method


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16308097#comment-16308097
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


DaanHoogland commented on a change in pull request #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#discussion_r159233316
 
 

 ##
 File path: server/test/com/cloud/network/IpAddressManagerTest.java
 ##
 @@ -17,38 +17,109 @@
 
 package com.cloud.network;
 
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
+import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
+import com.cloud.network.rules.StaticNat;
+import com.cloud.network.rules.StaticNatImpl;
+import com.cloud.offerings.NetworkOfferingVO;
+import com.cloud.offerings.dao.NetworkOfferingDao;
+import com.cloud.user.AccountVO;
+import com.cloud.utils.net.Ip;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
-
-import com.cloud.network.dao.IPAddressDao;
-import com.cloud.network.dao.IPAddressVO;
-import com.cloud.network.rules.StaticNat;
-import com.cloud.network.rules.StaticNatImpl;
-import com.cloud.utils.net.Ip;
-
-import static org.mockito.Mockito.when;
+import org.mockito.Spy;
 
 import java.util.Collections;
 import java.util.List;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.anyLong;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
 public class IpAddressManagerTest {
 
 @Mock
 IPAddressDao _ipAddrDao;
 
+@Mock
+NetworkDao _networkDao;
+
+@Mock
+NetworkOfferingDao _networkOfferingDao;
+
+@Mock
+NetworkModel _networkModel;
+
+@Spy
 @InjectMocks
 IpAddressManagerImpl _ipManager;
 
+IPAddressVO ipAddressVO;
+
+NetworkVO networkAllocated;
+
+NetworkVO networkImplemented;
+
+NetworkVO networkNat;
+
+AccountVO account;
+
 @Before
-public void setup() {
+public void setup() throws ResourceUnavailableException {
 MockitoAnnotations.initMocks(this);
+
 
 Review comment:
   a lot of this mock data is test specific and should not be in the setup 
method


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16308095#comment-16308095
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


DaanHoogland commented on a change in pull request #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#discussion_r159233140
 
 

 ##
 File path: server/src/com/cloud/network/IpAddressManagerImpl.java
 ##
 @@ -1394,6 +1380,25 @@ public IPAddressVO associateIPToGuestNetwork(long ipId, 
long networkId, boolean
 }
 }
 
+protected boolean isSourceNatAvailableForNetwork(long networkId, Account 
owner, IPAddressVO ipToAssoc, Network network) {
 
 Review comment:
   is networkId needed on this signature? network is being passed as well!


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16308096#comment-16308096
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


DaanHoogland commented on a change in pull request #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#discussion_r159233471
 
 

 ##
 File path: server/test/com/cloud/network/IpAddressManagerTest.java
 ##
 @@ -17,38 +17,109 @@
 
 package com.cloud.network;
 
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
+import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
+import com.cloud.network.rules.StaticNat;
+import com.cloud.network.rules.StaticNatImpl;
+import com.cloud.offerings.NetworkOfferingVO;
+import com.cloud.offerings.dao.NetworkOfferingDao;
+import com.cloud.user.AccountVO;
+import com.cloud.utils.net.Ip;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
-
-import com.cloud.network.dao.IPAddressDao;
-import com.cloud.network.dao.IPAddressVO;
-import com.cloud.network.rules.StaticNat;
-import com.cloud.network.rules.StaticNatImpl;
-import com.cloud.utils.net.Ip;
-
-import static org.mockito.Mockito.when;
+import org.mockito.Spy;
 
 import java.util.Collections;
 import java.util.List;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.anyLong;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
 public class IpAddressManagerTest {
 
 @Mock
 IPAddressDao _ipAddrDao;
 
+@Mock
+NetworkDao _networkDao;
+
+@Mock
+NetworkOfferingDao _networkOfferingDao;
+
+@Mock
+NetworkModel _networkModel;
+
+@Spy
 @InjectMocks
 IpAddressManagerImpl _ipManager;
 
+IPAddressVO ipAddressVO;
+
+NetworkVO networkAllocated;
+
+NetworkVO networkImplemented;
+
+NetworkVO networkNat;
+
+AccountVO account;
+
 @Before
-public void setup() {
+public void setup() throws ResourceUnavailableException {
 MockitoAnnotations.initMocks(this);
+
+ipAddressVO = new IPAddressVO(new Ip("192.0.0.1"), 1L, 1L, 1L,false);
+ipAddressVO.setAllocatedToAccountId(1L);
+
+IPAddressVO sourceNat = new IPAddressVO(new Ip("192.0.0.2"), 1L, 1L, 
1L,true);
+
+networkAllocated = Mockito.mock(NetworkVO.class);
+
when(networkAllocated.getTrafficType()).thenReturn(Networks.TrafficType.Guest);
+when(networkAllocated.getNetworkOfferingId()).thenReturn(8L);
+when(networkAllocated.getState()).thenReturn(Network.State.Allocated);
+
when(networkAllocated.getGuestType()).thenReturn(Network.GuestType.Isolated);
+when(networkAllocated.getVpcId()).thenReturn(null);
+
+networkImplemented = Mockito.mock(NetworkVO.class);
+
when(networkImplemented.getTrafficType()).thenReturn(Networks.TrafficType.Guest);
+when(networkImplemented.getNetworkOfferingId()).thenReturn(8L);
+
when(networkImplemented.getState()).thenReturn(Network.State.Implemented);
+
when(networkImplemented.getGuestType()).thenReturn(Network.GuestType.Isolated);
+when(networkImplemented.getVpcId()).thenReturn(null);
+
+networkNat = Mockito.mock(NetworkVO.class);
+
when(networkNat.getTrafficType()).thenReturn(Networks.TrafficType.Guest);
+when(networkNat.getNetworkOfferingId()).thenReturn(8L);
+when(networkNat.getState()).thenReturn(Network.State.Implemented);
+when(networkNat.getGuestType()).thenReturn(Network.GuestType.Isolated);
+when(networkNat.getId()).thenReturn(3L);
+when(networkNat.getVpcId()).thenReturn(null);
+
+account = new AccountVO("admin", 1L, null, (short) 1, 1L, 
"c65a73d5-ebbd-11e7-8f45-107b44277808");
+account.setId(1L);
+
+NetworkOfferingVO networkOfferingVO = 
Mockito.mock(NetworkOfferingVO.class);
+networkOfferingVO.setSharedSourceNat(false);
+
+Mockito.when(_networkDao.findById(1L)).thenReturn(networkAllocated);
 
 Review comment:
   the ids of networkAllocated and networkImplemented are mixed up in 
comparison with the test methods


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> 

[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16308072#comment-16308072
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


blueorangutan commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354770063
 
 
   @PaulAngus a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16308071#comment-16308071
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


PaulAngus commented on issue #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382#issuecomment-354769968
 
 
   @blueorangutan package
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2018-01-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16307992#comment-16307992
 ] 

ASF GitHub Bot commented on CLOUDSTACK-4045:


houthuis opened a new pull request #2382: CLOUDSTACK-4045 
URL: https://github.com/apache/cloudstack/pull/2382
 
 
   added a check for network state when determining whether a new IP should be 
source NAT. this prevents associated IP's to be marked as source NAT when the 
network is in allocated state, causing disassociateIpAddress to fail later
   
   Code will now throw a InvalidParameterValueException in the above scenario.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2016-09-15 Thread John Burwell (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15494563#comment-15494563
 ] 

John Burwell commented on CLOUDSTACK-4045:
--

[~muralireddy] is this still a bug in 4.9?  If so, I would like it to add to 
backlog to address as part of LTS.

> IP address acquired with associateIpAddress is marked as source NAT, causing 
> disassociateIpAddress to fail later
> 
>
> Key: CLOUDSTACK-4045
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
>Reporter: Murali Reddy
>Assignee: Murali Reddy
> Fix For: Future
>
>
> When you can create network, network is in allocated state. when network is 
> implemented CloudStack implicitly should acquire a public IP for source nat. 
> But there is assumption that first IP this is associated with network is 
> always for source NAT IP. So when you do
> 1. create network (network is in allocated state)
> 2. acquire a public IP and associate with the network
> 3. disassociate ip address
> #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
> For users this is counter-intutive because when a IP is acquired, he/she 
> should be able to release it as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-4045) IP address acquired with associateIpAddress is marked as source NAT, causing disassociateIpAddress to fail later

2013-08-02 Thread Murali Reddy (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13727624#comment-13727624
 ] 

Murali Reddy commented on CLOUDSTACK-4045:
--

right fix is to not to allow associateIpAddress API  succeed when network is 
just in allocated state.

 IP address acquired with associateIpAddress is marked as source NAT, causing 
 disassociateIpAddress to fail later
 

 Key: CLOUDSTACK-4045
 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4045
 Project: CloudStack
  Issue Type: Bug
  Security Level: Public(Anyone can view this level - this is the 
 default.) 
Affects Versions: 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0
Reporter: Murali Reddy
Assignee: Murali Reddy
 Fix For: 4.2.0


 When you can create network, network is in allocated state. when network is 
 implemented CloudStack implicitly should acquire a public IP for source nat. 
 But there is assumption that first IP this is associated with network is 
 always for source NAT IP. So when you do
 1. create network (network is in allocated state)
 2. acquire a public IP and associate with the network
 3. disassociate ip address
 #3 will fail because CloudStack marks the IP acquired in #1 to be source NAT. 
 For users this is counter-intutive because when a IP is acquired, he/she 
 should be able to release it as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira