You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Prasanna Santhanam (JIRA)" <ji...@apache.org> on 2013/07/03 13:19:19 UTC

[jira] [Created] (CLOUDSTACK-3348) network creation fails if serviceCapabilityList not set to dedicated for LB when LB is done by VR

Prasanna Santhanam created CLOUDSTACK-3348:
----------------------------------------------

             Summary: network creation fails if serviceCapabilityList not set to dedicated for LB when LB is done by VR
                 Key: CLOUDSTACK-3348
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3348
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: API, Network Controller
    Affects Versions: 4.2.0
            Reporter: Prasanna Santhanam
            Priority: Blocker
             Fix For: 4.2.0


Steps to reproduce
1. create a network offering from the API and enable it:
"network_offering": {
                                    "name": 'Network offering-VR services',
                                    "displaytext": 'Network offering-VR services',
                                    "guestiptype": 'Isolated',
                                    "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
                                    "traffictype": 'GUEST',
                                    "availability": 'Optional',
                                    "serviceProviderList": {
                                            "Dhcp": 'VirtualRouter',
                                            "Dns": 'VirtualRouter',
                                            "SourceNat": 'VirtualRouter',
                                            "PortForwarding": 'VirtualRouter',
                                            "Vpn": 'VirtualRouter',
                                            "Firewall": 'VirtualRouter',
                                            "Lb": 'VirtualRouter',
                                            "UserData": 'VirtualRouter',
                                            "StaticNat": 'VirtualRouter',
                                        },
                                    },
2. create a network from the offering
3. network creation fails with following exception
WARN  [network.lb.LoadBalancingRulesManagerImpl] (793160707@qtp-148431068-14:) Failed to create load balancer due to 
java.security.InvalidParameterException: The IP 192.168.2.6 is already used as PortForwarding rather than Lb
	at com.cloud.network.NetworkModelImpl.canIpUsedForNonConserveService(NetworkModelImpl.java:391)
	at com.cloud.network.NetworkModelImpl.checkIpForService(NetworkModelImpl.java:1473)
	at com.cloud.network.lb.LoadBalancingRulesManagerImpl.createPublicLoadBalancerRule(LoadBalancingRulesManagerImpl.java:1321)
	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
	at org.apache.cloudstack.api.command.user.loadbalancer.CreateLoadBalancerRuleCmd.create(CreateLoadBalancerRuleCmd.java:281)
	at com.cloud.api.ApiDispatcher.dispatchCreateCmd(ApiDispatcher.java:101)
	at com.cloud.api.ApiServer.queueCommand(ApiServer.java:475)
	at com.cloud.api.ApiServer.handleRequest(ApiServer.java:371)
	at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:304)
	at com.cloud.api.ApiServlet.doGet(ApiServlet.java:66)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
ERROR [cloud.api.ApiServer] (793160707@qtp-148431068-14:) unhandled exception executing api command: createLoadBalancerRule
com.cloud.utils.exception.CloudRuntimeException: Failed to create load balancer rule: SSH
	at com.cloud.network.lb.LoadBalancingRulesManagerImpl.createPublicLoadBalancerRule(LoadBalancingRulesManagerImpl.java:1350)
	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
	at org.apache.cloudstack.api.command.user.loadbalancer.CreateLoadBalancerRuleCmd.create(CreateLoadBalancerRuleCmd.java:281)
	at com.cloud.api.ApiDispatcher.dispatchCreateCmd(ApiDispatcher.java:101)
	at com.cloud.api.ApiServer.queueCommand(ApiServer.java:475)
	at com.cloud.api.ApiServer.handleRequest(ApiServer.java:371)
	at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:304)
	at com.cloud.api.ApiServlet.doGet(ApiServlet.java:66)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)


The  same scenario works from the UI since the serviceCapabilityList sets the VR to do dedicated LB. but the API doesn't require this. Here's the parsed response from the UI.

command:createNetworkOffering
response:json
sessionkey:f5u9C/lyjgqLM5sshzcYGsGCQ+o=
name:test-packaging
displayText:t
guestIpType:Isolated
lbType:publicLb
servicecapabilitylist[0].service:SourceNat
servicecapabilitylist[0].capabilitytype:SupportedSourceNatTypes
servicecapabilitylist[0].capabilityvalue:peraccount
servicecapabilitylist[1].service:lb
servicecapabilitylist[1].capabilitytype:SupportedLbIsolation
servicecapabilitylist[1].capabilityvalue:dedicated
availability:Optional
state:Creating
status:Creating
allocationstate:Creating
supportedServices:Vpn,Dhcp,Dns,Firewall,Lb,SourceNat,StaticNat,PortForwarding
specifyIpRanges:false
specifyVlan:false
isPersistent:false
conservemode:false
serviceProviderList[0].service:Vpn
serviceProviderList[0].provider:VirtualRouter
serviceProviderList[1].service:Dhcp
serviceProviderList[1].provider:VirtualRouter
serviceProviderList[2].service:Dns
serviceProviderList[2].provider:VirtualRouter
serviceProviderList[3].service:Firewall
serviceProviderList[3].provider:VirtualRouter
serviceProviderList[4].service:Lb
serviceProviderList[4].provider:VirtualRouter
serviceProviderList[5].service:SourceNat
serviceProviderList[5].provider:VirtualRouter
serviceProviderList[6].service:StaticNat
serviceProviderList[6].provider:VirtualRouter
serviceProviderList[7].service:PortForwarding
serviceProviderList[7].provider:VirtualRouter
traffictype:GUEST

--
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