Audrey Baldin created CLOUDSTACK-9089:
-----------------------------------------

             Summary: Static route added to VPC Private Gateway doesn't become 
active
                 Key: CLOUDSTACK-9089
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9089
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Virtual Router
    Affects Versions: 4.5.2
         Environment: Management Server on CentOS 7; CS 4.5.2; Hypervisor XEN 
6.5; 
            Reporter: Audrey Baldin


Steps to reproduce the problem:

1. Go to Network - VPC;
2. Add VPC (eg. VPC01);
3. Network - VPC > VPC01 click on PRIVATE GATEWAY;
4. Add Private Gateway (the button label is wrong) (eg. 10.10.0.2);
5. Network - VPC > VPC01 > Router - Private Gateway > 10.10.0.2;
6. On Static Routes add a CIDR destination (eg. 192.168.0.0/24);

The route appears on UI, and following the job in management.log everything 
looks OK, but it does not become active in the VR.

The log output is bellow:

2015-11-26 11:50:53,682 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(API-Job-Executor-33:ctx-45dcb858 job-179) Add job-179 into job monitoring
2015-11-26 11:50:53,686 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(catalina-exec-20:ctx-4a514c5c ctx-52413963) submit async job-179, details: 
AsyncJobVO {id:179, userId: 2, accountId: 2, instanceType: StaticRoute, 
instanceId: 1, cmd: 
org.apache.cloudstack.api.command.user.vpc.CreateStaticRouteCmd, cmdInfo: 
{"id":"1","response":"json","ctxDetails":"{\"com.cloud.network.vpc.VpcGateway\":\"02fc5208-ad81-49c6-aaf5-e794617ddacc\",\"com.cloud.network.vpc.StaticRoute\":\"bc2603c6-ba84-4d95-92bd-7b5b3d83e1c2\"}","cmdEventType":"STATIC.ROUTE.CREATE","ctxUserId":"2","gatewayid":"02fc5208-ad81-49c6-aaf5-e794617ddacc","httpmethod":"GET","_":"1448545609757","uuid":"bc2603c6-ba84-4d95-92bd-7b5b3d83e1c2","ctxAccountId":"2","ctxStartEventId":"295","cidr":"192.168.0.0/24"},
 cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: 
null, initMsid: 207372998456, completeMsid: null, lastUpdated: null, 
lastPolled: null, created: null}
2015-11-26 11:50:53,687 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-33:ctx-45dcb858 job-179) Executing AsyncJobVO {id:179, 
userId: 2, accountId: 2, instanceType: StaticRoute, instanceId: 1, cmd: 
org.apache.cloudstack.api.command.user.vpc.CreateStaticRouteCmd, cmdInfo: 
{"id":"1","response":"json","ctxDetails":"{\"com.cloud.network.vpc.VpcGateway\":\"02fc5208-ad81-49c6-aaf5-e794617ddacc\",\"com.cloud.network.vpc.StaticRoute\":\"bc2603c6-ba84-4d95-92bd-7b5b3d83e1c2\"}","cmdEventType":"STATIC.ROUTE.CREATE","ctxUserId":"2","gatewayid":"02fc5208-ad81-49c6-aaf5-e794617ddacc","httpmethod":"GET","_":"1448545609757","uuid":"bc2603c6-ba84-4d95-92bd-7b5b3d83e1c2","ctxAccountId":"2","ctxStartEventId":"295","cidr":"192.168.0.0/24"},
 cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: 
null, initMsid: 207372998456, completeMsid: null, lastUpdated: null, 
lastPolled: null, created: null}
2015-11-26 11:50:53,729 DEBUG [c.c.n.v.VpcManagerImpl] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Applying static routes 
for vpc [VPC [1-VPC01]
2015-11-26 11:50:53,745 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Seq 
1-3875910429305753820: Sending  { Cmd , MgmtId: 207372998456, via: 
1(XENCLOUD01), Ver: v1, Flags: 100001, 
[{"com.cloud.agent.api.routing.SetStaticRouteCommand":{"staticRoutes":[{"id":1,"uuid":"bc2603c6-ba84-4d95-92bd-7b5b3d83e1c2","targetCidr":"192.168.0.0/24","accountId":2,"domainId":1,"gatewayId":1,"state":"Add","vpcId":1,"vlanTag":"700","gateway":"10.10.0.1","netmask":"255.255.255.252","ipAddress":"10.10.0.2"}],"accessDetails":{"zone.network.type":"Advanced","router.ip":"169.254.1.159","router.name":"r-22-VM"},"wait":0}}]
 }
2015-11-26 11:50:53,745 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Seq 
1-3875910429305753820: Executing:  { Cmd , MgmtId: 207372998456, via: 
1(XENCLOUD01), Ver: v1, Flags: 100001, 
[{"com.cloud.agent.api.routing.SetStaticRouteCommand":{"staticRoutes":[{"id":1,"uuid":"bc2603c6-ba84-4d95-92bd-7b5b3d83e1c2","targetCidr":"192.168.0.0/24","accountId":2,"domainId":1,"gatewayId":1,"state":"Add","vpcId":1,"vlanTag":"700","gateway":"10.10.0.1","netmask":"255.255.255.252","ipAddress":"10.10.0.2"}],"accessDetails":{"zone.network.type":"Advanced","router.ip":"169.254.1.159","router.name":"r-22-VM"},"wait":0}}]
 }
2015-11-26 11:50:54,046 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Seq 
1-3875910429305753820: Received:  { Ans: , MgmtId: 207372998456, via: 1, Ver: 
v1, Flags: 0, { Answer } }
2015-11-26 11:50:54,046 DEBUG [c.c.n.e.VpcVirtualRouterElement] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Applied static routes 
on vpc [VPC [1-VPC01]
2015-11-26 11:50:54,047 DEBUG [c.c.n.v.VpcManagerImpl] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Applied static routes 
for vpc [VPC [1-VPC01]
2015-11-26 11:50:54,055 DEBUG [c.c.n.v.VpcManagerImpl] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Marked route 
StaticRoute[bc2603c6-ba84-4d95-92bd-7b5b3d83e1c2|192.168.0.0/24|1] with state 
Active
2015-11-26 11:50:54,082 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Complete async job-179, 
jobStatus: SUCCEEDED, resultCode: 0, result: 
org.apache.cloudstack.api.response.StaticRouteResponse/staticroute/{"id":"bc2603c6-ba84-4d95-92bd-7b5b3d83e1c2","state":"Active","vpcid":"c026ae93-05cb-4993-ad67-2d47be6f8946","cidr":"192.168.0.0/24","account":"admin","domainid":"f7b6548e-8c5e-11e5-a3b6-00259026d1a2","domain":"ROOT","tags":[]}
2015-11-26 11:50:54,084 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Publish async job-179 
complete on message bus
2015-11-26 11:50:54,084 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Wake up jobs related to 
job-179
2015-11-26 11:50:54,084 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Update db status for 
job-179
2015-11-26 11:50:54,087 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-33:ctx-45dcb858 job-179 ctx-0e642fac) Wake up jobs joined 
with job-179 and disjoin all subjobs created from job- 179
2015-11-26 11:50:54,099 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-33:ctx-45dcb858 job-179) Done executing 
org.apache.cloudstack.api.command.user.vpc.CreateStaticRouteCmd for job-179
2015-11-26 11:50:54,099 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(API-Job-Executor-33:ctx-45dcb858 job-179) Remove job-179 from job monitoring

Accessing the VR and using "ip route" or "netstat -r" we can't see the route 
and there is no communication between the network and the VMs inside the VPC.





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

Reply via email to