Re: Review Request 17142: CLOUDSTACK-5916: associateIpAddress leaves an IP in allocating state

2014-01-30 Thread ASF Subversion and Git Services

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17142/#review33213
---


Commit 85d0f8f93aaf118e0597fcbba0f4cf06efa9df1f in branch refs/heads/master 
from Saksham Srivastava
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=85d0f8f ]

CLOUDSTACK-5916: associateIpAddress leaves an IP in allocating state


- ASF Subversion and Git Services


On Jan. 21, 2014, 11:34 a.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/17142/
 ---
 
 (Updated Jan. 21, 2014, 11:34 a.m.)
 
 
 Review request for cloudstack and Murali Reddy.
 
 
 Bugs: 5916
 https://issues.apache.org/jira/browse/5916
 
 
 Repository: cloudstack-git
 
 
 Description
 ---
 
 associateIpAddress leaves an IP in allocating state (user_ip_address table), 
 although the API command is executed on incorrectly.
 
 Steps to repro :
 1) create a vpc tier.
 2) Execute associateIpAddress API on the vpc tier but do not specify the vpc 
 id.
 #cloudmonkey
 associate ipaddress networkid=09ffc45f-beba-4690-8be7-425891915d44
 Async job ea020246-d0e8-4e58-ac84-fccb55c3b646 failed
 Error 530, Can't assign ip to the network directly when network belongs to 
 VPC.Specify vpcId to associate ip address to VPC
 accountid = a6ba35b3-7e76-11e3-8490-7614eba325e6
 cmd = org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd
 created = 2014-01-21T10:46:46+0530
 jobid = ea020246-d0e8-4e58-ac84-fccb55c3b646
 jobprocstatus = 0
 jobresult:
 errorcode = 530
 errortext = Can't assign ip to the network directly when network belongs to 
 VPC.Specify vpcId to associate ip address to VPC
 jobresultcode = 530
 jobresulttype = object
 jobstatus = 2
 userid = a6ba5844-7e76-11e3-8490-7614eba325e6
 
 Expected behavior:
 There should be no allocation of IP .
 
 Actual behaviour:
 The public IP remains in 'Allocating' state
 
 The fix releases the IP incase of exception.
 
 
 Diffs
 -
 
   server/src/com/cloud/network/NetworkServiceImpl.java 056190f 
 
 Diff: https://reviews.apache.org/r/17142/diff/
 
 
 Testing
 ---
 
 Tested the following scenarios:
 ip:8096/client/api?command=associateIpAddressnetworkid=09ffc45f-beba-4690-8be7-425891915d44
 There is no allocation of public IP (no IP is put in Allocating state in the 
 db).
  
 ip:8096/client/api?command=associateIpAddressnetworkid=09ffc45f-beba-4690-8be7-425891915d44vpcid=1
 Successfully associates the IP.
 
 Build passes successfully.
 Patch applies cleanly.
 
 
 Thanks,
 
 Saksham Srivastava
 




Re: Review Request 17142: CLOUDSTACK-5916: associateIpAddress leaves an IP in allocating state

2014-01-30 Thread Murali Reddy

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17142/#review33214
---

Ship it!


85d0f8f93aaf118e0597fcbba0f4cf06efa9df1f

- Murali Reddy


On Jan. 21, 2014, 11:34 a.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/17142/
 ---
 
 (Updated Jan. 21, 2014, 11:34 a.m.)
 
 
 Review request for cloudstack and Murali Reddy.
 
 
 Bugs: 5916
 https://issues.apache.org/jira/browse/5916
 
 
 Repository: cloudstack-git
 
 
 Description
 ---
 
 associateIpAddress leaves an IP in allocating state (user_ip_address table), 
 although the API command is executed on incorrectly.
 
 Steps to repro :
 1) create a vpc tier.
 2) Execute associateIpAddress API on the vpc tier but do not specify the vpc 
 id.
 #cloudmonkey
 associate ipaddress networkid=09ffc45f-beba-4690-8be7-425891915d44
 Async job ea020246-d0e8-4e58-ac84-fccb55c3b646 failed
 Error 530, Can't assign ip to the network directly when network belongs to 
 VPC.Specify vpcId to associate ip address to VPC
 accountid = a6ba35b3-7e76-11e3-8490-7614eba325e6
 cmd = org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd
 created = 2014-01-21T10:46:46+0530
 jobid = ea020246-d0e8-4e58-ac84-fccb55c3b646
 jobprocstatus = 0
 jobresult:
 errorcode = 530
 errortext = Can't assign ip to the network directly when network belongs to 
 VPC.Specify vpcId to associate ip address to VPC
 jobresultcode = 530
 jobresulttype = object
 jobstatus = 2
 userid = a6ba5844-7e76-11e3-8490-7614eba325e6
 
 Expected behavior:
 There should be no allocation of IP .
 
 Actual behaviour:
 The public IP remains in 'Allocating' state
 
 The fix releases the IP incase of exception.
 
 
 Diffs
 -
 
   server/src/com/cloud/network/NetworkServiceImpl.java 056190f 
 
 Diff: https://reviews.apache.org/r/17142/diff/
 
 
 Testing
 ---
 
 Tested the following scenarios:
 ip:8096/client/api?command=associateIpAddressnetworkid=09ffc45f-beba-4690-8be7-425891915d44
 There is no allocation of public IP (no IP is put in Allocating state in the 
 db).
  
 ip:8096/client/api?command=associateIpAddressnetworkid=09ffc45f-beba-4690-8be7-425891915d44vpcid=1
 Successfully associates the IP.
 
 Build passes successfully.
 Patch applies cleanly.
 
 
 Thanks,
 
 Saksham Srivastava
 




Review Request 17142: CLOUDSTACK-5916: associateIpAddress leaves an IP in allocating state

2014-01-21 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17142/
---

Review request for cloudstack and Murali Reddy.


Bugs: 5916
https://issues.apache.org/jira/browse/5916


Repository: cloudstack-git


Description
---

associateIpAddress leaves an IP in allocating state (user_ip_address table), 
although the API command is executed on incorrectly.

Steps to repro :
1) create a vpc tier.
2) Execute associateIpAddress API on the vpc tier but do not specify the vpc 
id.
#cloudmonkey
associate ipaddress networkid=09ffc45f-beba-4690-8be7-425891915d44
Async job ea020246-d0e8-4e58-ac84-fccb55c3b646 failed
Error 530, Can't assign ip to the network directly when network belongs to 
VPC.Specify vpcId to associate ip address to VPC
accountid = a6ba35b3-7e76-11e3-8490-7614eba325e6
cmd = org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd
created = 2014-01-21T10:46:46+0530
jobid = ea020246-d0e8-4e58-ac84-fccb55c3b646
jobprocstatus = 0
jobresult:
errorcode = 530
errortext = Can't assign ip to the network directly when network belongs to 
VPC.Specify vpcId to associate ip address to VPC
jobresultcode = 530
jobresulttype = object
jobstatus = 2
userid = a6ba5844-7e76-11e3-8490-7614eba325e6

Expected behavior:
There should be no allocation of IP .

Actual behaviour:
The public IP remains in 'Allocating' state

The fix releases the IP incase of exception.


Diffs
-

  server/src/com/cloud/network/NetworkServiceImpl.java 056190f 

Diff: https://reviews.apache.org/r/17142/diff/


Testing
---

Tested the following scenarios:
ip:8096/client/api?command=associateIpAddressnetworkid=09ffc45f-beba-4690-8be7-425891915d44
There is no allocation of public IP (no IP is put in Allocating state in the 
db).
 
ip:8096/client/api?command=associateIpAddressnetworkid=09ffc45f-beba-4690-8be7-425891915d44vpcid=1
Successfully associates the IP.

Build passes successfully.
Patch applies cleanly.


Thanks,

Saksham Srivastava