[ https://issues.apache.org/jira/browse/CLOUDSTACK-2944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
venkata swamybabu budumuru updated CLOUDSTACK-2944: --------------------------------------------------- Priority: Critical (was: Minor) > [Multiple IPs PerNic] [UI] Failed to addIpToNic using a custom guest ip > address > ------------------------------------------------------------------------------- > > Key: CLOUDSTACK-2944 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2944 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server > Affects Versions: 4.2.0 > Environment: commit # 673b293d75419a4b76379092db2b204cdc6160a4 > Reporter: venkata swamybabu budumuru > Assignee: Brian Federle > Priority: Critical > Fix For: 4.2.0 > > > Steps to reproduce: > 1. Have latest CS setup with at least one advanced zone. > 2. deploy at least one VM > 3. Go to Instances -> VM -> NICs -> View Secondary IPs -> Acquire New > Secondary IP wizard > 4. pass a valid guest IP in the guest CIDR range > Observations : > (i) It failed acquire the IP passed in step (4). instead it got a random ip > from the guest CIDR assigned > (ii) API that was fired sent an invalid parameter for ipaddress. > Here is the API snippet : > _ 1371021942248 > command addIpToNic > ipaddr 10.0.1.2 > nicId 8663e098-7473-4005-afcc-0856c0d9a607 > response json > sessionkey X4s9nS+qXdk0LHOZc/DAkM3iuOY= > (iii) It should send ipaddress as parameter instead of ipaddr. > Here is the snippet from mgmt server log > 2013-06-12 08:54:31,618 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) > ===START=== 10.252.192.8 -- GET > command=addIpToNic&response=json&sessionkey=X4s9nS%2BqXdk0LHOZc%2FDAkM3iuOY%3D&nicId=8663e098-7473-4005-afcc-0856c0d9a607&ipaddr=10.0.1.2&_=1371021942248 > 2013-06-12 08:54:31,657 DEBUG [cloud.async.AsyncJobManagerImpl] > (catalina-exec-19:null) submit async job-108, details: AsyncJobVO {id:108, > userId: 2, accountId: 2, sessionKey: null, instanceType: IpAddress, > instanceId: null, cmd: > org.apache.cloudstack.api.command.user.vm.AddIpToVmNicCmd, cmdOriginator: > null, cmdInfo: > {"response":"json","sessionkey":"X4s9nS+qXdk0LHOZc/DAkM3iuOY\u003d","ipaddr":"10.0.1.2","ctxUserId":"2","httpmethod":"GET","_":"1371021942248","ctxAccountId":"2","ctxStartEventId":"401","nicId":"8663e098-7473-4005-afcc-0856c0d9a607"}, > cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, > processStatus: 0, resultCode: 0, result: null, initMsid: 7280707764394, > completeMsid: null, lastUpdated: null, lastPolled: null, created: null} > 2013-06-12 08:54:31,660 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) > ===END=== 10.252.192.8 -- GET > command=addIpToNic&response=json&sessionkey=X4s9nS%2BqXdk0LHOZc%2FDAkM3iuOY%3D&nicId=8663e098-7473-4005-afcc-0856c0d9a607&ipaddr=10.0.1.2&_=1371021942248 > 2013-06-12 08:54:31,663 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-86:job-108) Executing > org.apache.cloudstack.api.command.user.vm.AddIpToVmNicCmd for job-108 > 2013-06-12 08:54:31,675 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-86:job-108) Sync job-108 execution on object network.213 > 2013-06-12 08:54:31,701 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-86:job-108) job > org.apache.cloudstack.api.command.user.vm.AddIpToVmNicCmd for job-108 was > queued, processing the queue. > 2013-06-12 08:54:31,710 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-86:job-108) Executing sync queue item: SyncQueueItemVO {id:13, > queueId: 2, contentType: AsyncJob, contentId: 108, lastProcessMsid: > 7280707764394, lastprocessNumber: 13, lastProcessTime: Wed Jun 12 08:54:31 > EDT 2013, created: Wed Jun 12 08:54:31 EDT 2013} > 2013-06-12 08:54:31,712 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-86:job-108) Schedule queued job-108 > 2013-06-12 08:54:31,721 DEBUG [cloud.async.SyncQueueManagerImpl] > (Job-Executor-86:job-108) There is a pending process in sync queue(id: 2) > 2013-06-12 08:54:31,723 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-87:job-108) Executing > org.apache.cloudstack.api.command.user.vm.AddIpToVmNicCmd for job-108 > 2013-06-12 08:54:31,754 DEBUG [cloud.network.NetworkServiceImpl] > (Job-Executor-87:job-108) Calling the ip allocation ... > 2013-06-12 08:54:31,762 DEBUG [cloud.network.NetworkServiceImpl] > (Job-Executor-87:job-108) Setting nic_secondary_ip table ... > 2013-06-12 08:54:31,776 INFO [user.vm.AddIpToVmNicCmd] > (Job-Executor-87:job-108) Associated ip address to NIC : 10.0.1.211 > 2013-06-12 08:54:31,780 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-87:job-108) Complete async job-108, jobStatus: 1, resultCode: > 0, result: org.apache.cloudstack.api.response.NicSecondaryIpResponse@77715b45 > 2013-06-12 08:54:31,798 DEBUG [cloud.async.SyncQueueManagerImpl] > (Job-Executor-87:job-108) Sync queue (2) is currently empty > 2013-06-12 08:54:31,799 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-87:job-108) Done executing > org.apache.cloudstack.api.command.user.vm.AddIpToVmNicCmd for job-108 > 2013-06-12 08:54:32,414 DEBUG [agent.manager.DirectAgentAttache] > (DirectAgent-463:null) Ping from 1 -- 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