shweta agarwal created CLOUDSTACK-5319:
------------------------------------------
Summary: CreateVpnGateway command doesnt fails on non upgraded
vpc router
Key: CLOUDSTACK-5319
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5319
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
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.CreateVpnGateway on vpc network when router is not upgraded
Bug:
CreateVpnGatewayCmd command will succeed
Exception :
CreateVpnGatewayCmd command should fail sating router needs upgrade:
MS log shows :
2013-11-29 16:38:05,566 DEBUG [c.c.a.ApiServlet]
(catalina-exec-22:ctx-b3441012) ===START=== 10.146.0.132 -- GET
command=createVpnGateway&response=json&sessionkey=CNU%2FUxmL5sTxIFWo8PSATnLucYk%3D&vpcid=0527de8e-1071-45d9-b204-7c15cf9b5db7&_=1385723305682
2013-11-29 16:38:05,708 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(catalina-exec-22:ctx-b3441012 ctx-ece9f700) submit async job-144, details:
AsyncJobVO {id:144, userId: 2, accountId: 2, instanceType: None, instanceId:
null, cmd: org.apache.cloudstack.api.command.user.vpn.CreateVpnGatewayCmd,
cmdInfo:
{"response":"json","sessionkey":"CNU/UxmL5sTxIFWo8PSATnLucYk\u003d","cmdEventType":"VPN.S2S.VPN.GATEWAY.CREATE","ctxUserId":"2","httpmethod":"GET","_":"1385723305682","ctxAccountId":"2","vpcid":"0527de8e-1071-45d9-b204-7c15cf9b5db7","ctxStartEventId":"511"},
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:38:05,709 INFO [o.a.c.f.j.i.AsyncJobMonitor]
(Job-Executor-42:ctx-cc75d905) Add job-144 into job monitoring
2013-11-29 16:38:05,709 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(Job-Executor-42:ctx-cc75d905) Executing AsyncJobVO {id:144, userId: 2,
accountId: 2, instanceType: None, instanceId: null, cmd:
org.apache.cloudstack.api.command.user.vpn.CreateVpnGatewayCmd, cmdInfo:
{"response":"json","sessionkey":"CNU/UxmL5sTxIFWo8PSATnLucYk\u003d","cmdEventType":"VPN.S2S.VPN.GATEWAY.CREATE","ctxUserId":"2","httpmethod":"GET","_":"1385723305682","ctxAccountId":"2","vpcid":"0527de8e-1071-45d9-b204-7c15cf9b5db7","ctxStartEventId":"511"},
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:38:05,709 DEBUG [c.c.a.ApiServlet] (catalina-exec-22:ctx-b3441012
ctx-ece9f700) ===END=== 10.146.0.132 -- GET
command=createVpnGateway&response=json&sessionkey=CNU%2FUxmL5sTxIFWo8PSATnLucYk%3D&vpcid=0527de8e-1071-45d9-b204-7c15cf9b5db7&_=1385723305682
2013-11-29 16:38:05,836 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(Job-Executor-42:ctx-cc75d905 ctx-ece9f700) Complete async job-144, jobStatus:
SUCCEEDED, resultCode: 0, result:
org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse/vpngateway/{"id":"e8d3785a-087f-4024-a837-a39a52f15176","publicip":"10.147.51.89","vpcid":"0527de8e-1071-45d9-b204-7c15cf9b5db7","account":"admin","domainid":"1","domain":"ROOT"}
2013-11-29 16:38:05,890 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(Job-Executor-42:ctx-cc75d905) Done executing
org.apache.cloudstack.api.command.user.vpn.CreateVpnGatewayCmd for job-144
2013-11-29 16:38:05,915 INFO [o.a.c.f.j.i.AsyncJobMonitor]
(Job-Executor-42:ctx-cc75d905) Remove job-144 from job monitoring
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)