shweta agarwal created CLOUDSTACK-5316:
------------------------------------------

             Summary: associateIpAddress command doesnt fails on vpc non 
upgraded router
                 Key: CLOUDSTACK-5316
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5316
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Upgrade, Virtual Router
    Affects Versions: 4.3.0
         Environment: upgrade from 3.0.7 to 4.3.0

            Reporter: shweta agarwal
            Assignee: Kishan Kavala
            Priority: Critical
             Fix For: 4.3.0


Repro steps:
1. On 3.0.7 setup create a VPC network
2. upgrade to 4.3
3.Aquire Ip on vpc network when router is not upgraded

Bug:
IP Associate command will succeed

Exception :
IP Associate command should fail sating router needs upgrade:
MS log shows :
2013-11-29 16:36:08,067 DEBUG [c.c.a.ApiServlet] (catalina-exec-9:ctx-b9e56e20) 
===START===  10.146.0.132 -- GET  
command=associateIpAddress&response=json&sessionkey=CNU%2FUxmL5sTxIFWo8PSATnLucYk%3D&vpcid=0527de8e-1071-45d9-b204-7c15cf9b5db7&_=1385723188083
2013-11-29 16:36:08,078 DEBUG [c.c.n.IpAddressManagerImpl] 
(catalina-exec-9:ctx-b9e56e20 ctx-65c2c993) Associate IP address called by the 
user 2 account 2
2013-11-29 16:36:08,079 DEBUG [c.c.n.IpAddressManagerImpl] 
(catalina-exec-9:ctx-b9e56e20 ctx-65c2c993) Associate IP address lock acquired
2013-11-29 16:36:08,083 DEBUG [c.c.n.IpAddressManagerImpl] 
(catalina-exec-9:ctx-b9e56e20 ctx-65c2c993) Got 10.147.51.34 to assign for 
account 2 in zone 1
2013-11-29 16:36:08,197 DEBUG [c.c.n.IpAddressManagerImpl] 
(catalina-exec-9:ctx-b9e56e20 ctx-65c2c993) Releasing lock account Acct[2-admin]
2013-11-29 16:36:08,198 DEBUG [c.c.n.IpAddressManagerImpl] 
(catalina-exec-9:ctx-b9e56e20 ctx-65c2c993) Associate IP address lock released
2013-11-29 16:36:08,400 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(catalina-exec-9:ctx-b9e56e20 ctx-65c2c993) submit async job-142, details: 
AsyncJobVO {id:142, userId: 2, accountId: 2, instanceType: IpAddress, 
instanceId: 25, cmd: 
org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd, cmdInfo: 
{"id":"25","response":"json","sessionkey":"CNU/UxmL5sTxIFWo8PSATnLucYk\u003d","cmdEventType":"NET.IPASSIGN","ctxUserId":"2","httpmethod":"GET","_":"1385723188083","ctxAccountId":"2","vpcid":"0527de8e-1071-45d9-b204-7c15cf9b5db7","ctxStartEventId":"502"},
 cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: 
null, initMsid: 233845177509765, completeMsid: null, lastUpdated: null, 
lastPolled: null, created: null}
2013-11-29 16:36:08,400 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(Job-Executor-40:ctx-f710d9f9) Add job-142 into job monitoring
2013-11-29 16:36:08,400 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(Job-Executor-40:ctx-f710d9f9) Executing AsyncJobVO {id:142, userId: 2, 
accountId: 2, instanceType: IpAddress, instanceId: 25, cmd: 
org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd, cmdInfo: 
{"id":"25","response":"json","sessionkey":"CNU/UxmL5sTxIFWo8PSATnLucYk\u003d","cmdEventType":"NET.IPASSIGN","ctxUserId":"2","httpmethod":"GET","_":"1385723188083","ctxAccountId":"2","vpcid":"0527de8e-1071-45d9-b204-7c15cf9b5db7","ctxStartEventId":"502"},
 cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: 
null, initMsid: 233845177509765, completeMsid: null, lastUpdated: null, 
lastPolled: null, created: null}
2013-11-29 16:36:08,401 DEBUG [c.c.a.ApiServlet] (catalina-exec-9:ctx-b9e56e20 
ctx-65c2c993) ===END===  10.146.0.132 -- GET  
command=associateIpAddress&response=json&sessionkey=CNU%2FUxmL5sTxIFWo8PSATnLucYk%3D&vpcid=0527de8e-1071-45d9-b204-7c15cf9b5db7&_=1385723188083
2013-11-29 16:36:08,488 DEBUG [c.c.n.v.VpcManagerImpl] 
(Job-Executor-40:ctx-f710d9f9 ctx-65c2c993) Associating ip Ip[10.147.51.34-1] 
to vpc [VPC [3-vpc3]
2013-11-29 16:36:08,657 DEBUG [c.c.n.v.VpcManagerImpl] 
(Job-Executor-40:ctx-f710d9f9 ctx-65c2c993) Successfully assigned ip 
Ip[10.147.51.34-1] to vpc [VPC [3-vpc3]
2013-11-29 16:36:08,733 DEBUG [c.c.a.m.AgentManagerImpl] 
(AgentManager-Handler-1:null) SeqA 7-12008: Processing Seq 7-12008:  { Cmd , 
MgmtId: -1, via: 7, Ver: v1, Flags: 11, 
[{"com.cloud.agent.api.ConsoleProxyLoadReportCommand":{"_proxyVmId":35,"_loadInfo":"{\n
  \"connections\": []\n}","wait":0}}] }
2013-11-29 16:36:08,815 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(Job-Executor-40:ctx-f710d9f9 ctx-65c2c993) Complete async job-142, jobStatus: 
SUCCEEDED, resultCode: 0, result: 
org.apache.cloudstack.api.response.IPAddressResponse/ipaddress/{"id":"7a39d02e-e4a3-49e9-82ed-0430c577224c","ipaddress":"10.147.51.34","allocated":"2013-11-29T16:36:08+0530","zoneid":"71c3d210-e0f7-4ea0-80b3-1a3769cdaeb2","zonename":"xen","issourcenat":false,"account":"admin","domainid":"1","domain":"ROOT","forvirtualnetwork":true,"vlanid":"92e13e64-3f00-4edd-9f35-a203721aee4b","vlanname":"51","isstaticnat":false,"issystem":false,"networkid":"c1e501e4-41a3-47a0-8cf3-472895bc68ae","state":"Allocated","physicalnetworkid":"8b22e636-7774-44cb-b670-63f75c2fd157","vpcid":"0527de8e-1071-45d9-b204-7c15cf9b5db7","tags":[],"isportable":false}


DB shows vpc id router not upgraded


"id" "element_id" "public_mac_address" "public_ip_address" "public_netmask" 
"guest_netmask" "guest_ip_address" "is_redundant_router" "priority" 
"is_priority_bumpup" "redundant_state" "stop_pending" "role" "template_version" 
"scripts_version" "vpc_id"
"11" "2" "06:98:6e:00:00:2c" "10.147.51.13" "255.255.255.0" "" "" "0" "0" "0" 
"UNKNOWN" "0" "VIRTUAL_ROUTER" "Cloudstack Release 3.0 Mon Feb 6 15:10:04 PST 
2012" "973c0565a2fe991f0903902588d4d52e" "1"
"12" "2" "06:8f:e4:00:00:39" "10.147.51.26" "255.255.255.0" "" "" "0" "0" "0" 
"UNKNOWN" "0" "VIRTUAL_ROUTER" "Cloudstack Release 3.0 Mon Feb 6 15:10:04 PST 
2012" "973c0565a2fe991f0903902588d4d52e" "2"
"13" "2" "06:b0:ee:00:00:78" "10.147.51.89" "255.255.255.0" "" "" "0" "0" "0" 
"UNKNOWN" "0" "VIRTUAL_ROUTER" "Cloudstack Release 3.0 Mon Feb 6 15:10:04 PST 
2012" "973c0565a2fe991f0903902588d4d52e" "3"
"14" "2" "06:85:fc:00:00:2b" "10.147.51.12" "255.255.255.0" "" "" "0" "0" "0" 
"UNKNOWN" "0" "VIRTUAL_ROUTER" "Cloudstack Release 3.0 Mon Feb 6 15:10:04 PST 
2012" "973c0565a2fe991f0903902588d4d52e" "4" 




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to