[ https://issues.apache.org/jira/browse/CLOUDSTACK-5402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Abhinandan Prateek updated CLOUDSTACK-5402: ------------------------------------------- Assignee: Jayapal Reddy > Shared network - LB Rule gets created with same IP in which PF and Firewall > is configured, later fails to delete properly configured LB rules > --------------------------------------------------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-5402 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5402 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server, Network Controller > Affects Versions: 4.3.0 > Environment: Advanced zone, shared n/w, hyper-v > Reporter: Sowmya Krishnan > Assignee: Jayapal Reddy > Priority: Critical > Fix For: 4.3.0 > > Attachments: mslog_CS5402.log > > > LB rule gets created in the same IP as PF and Firewall rule in shared network. > Later, the same exception is thrown for any operations done on other properly > configured LBs. Also, it fails to delete a properly configured LB rule > The same issue is not found in case of isolated network. > Steps: > ==== > Create a shared network, conserve mode = OFF > Acquire a Public IP > Configure Firewall and PF rules > Ensure PF and firewall rules working > Configure LB rule with same IP > Acquire another IP > Create LB rule > Try to delete this LB rule > Result > ===== > Following exception is thrown while creating LB rule: > Exception is thrown: com.cloud.utils.exception.CloudRuntimeException: Ip > 10.102.196.239 is used by multiple services! > But the LB rule gets configured anyway and VM gets added to the LB rule as > well. > Later whenever LB related operations are invoked, it throws the same exception > Also, unable to delete other LB rules after this. > Expected result: > =========== > LB rule shouldn't get added when PF and Firewall rules are already configured > with that IP. > Logs: > 2013-12-06 12:53:18,142 ERROR [c.c.a.ApiAsyncJobDispatcher] > (Job-Executor-13:ctx-8c80cb07) Unexpected exception while executing > org.apache.cloudstack.api.com > mand.user.loadbalancer.DeleteLoadBalancerRuleCmd > com.cloud.utils.exception.CloudRuntimeException: Ip 10.102.196.239 is used by > multiple services! > at > com.cloud.network.NetworkModelImpl.getProviderToIpList(NetworkModelImpl.java:473) > at > com.cloud.network.IpAddressManagerImpl.applyIpAssociations(IpAddressManagerImpl.java:952) > at > com.cloud.network.lb.LoadBalancingRulesManagerImpl.applyLbRules(LoadBalancingRulesManagerImpl.java:2285) > at > com.cloud.network.lb.LoadBalancingRulesManagerImpl.applyLoadBalancerRules(LoadBalancingRulesManagerImpl.java:1774) > at > com.cloud.network.lb.LoadBalancingRulesManagerImpl.applyLoadBalancerConfig(LoadBalancingRulesManagerImpl.java:1694) > at > com.cloud.network.lb.LoadBalancingRulesManagerImpl.deleteLoadBalancerRule(LoadBalancingRulesManagerImpl.java:1432) > at > com.cloud.network.lb.LoadBalancingRulesManagerImpl.deleteLoadBalancerRule(LoadBalancingRulesManagerImpl.java:1367) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) > at > com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:50) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) > at > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) > at $Proxy173.deleteLoadBalancerRule(Unknown Source) > at > org.apache.cloudstack.api.command.user.loadbalancer.DeleteLoadBalancerRuleCmd.execute(DeleteLoadBalancerRuleCmd.java:91) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:161) > at > com.cloud.api.ApiAsyncJobDispatcher.runJobInContext(ApiAsyncJobDispatcher.java:109) > at > com.cloud.api.ApiAsyncJobDispatcher$1.run(ApiAsyncJobDispatcher.java:66) > at > org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56) > at > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103) > at > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53) > at > com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:63) > at > org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:520) > at > org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49) > at > org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56) > at > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103) > at > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53) > at > org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:679) > 2013-12-06 12:53:18,151 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] > (Job-Executor-13:ctx-8c80cb07) Complete async job-25, jobStatus: FAILED, > resultCode: 530, result: > org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530,"errortext":"Ip > 10.102.196.239 is used by multiple services!"} > 2013-12-06 12:53:18,177 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] > (Job-Executor-13:ctx-8c80cb07) Done executing > org.apache.cloudstack.api.command.user.loadbalancer.DeleteLoadBalancerRuleCmd > for job-25 > DB details: > mysql> select * from load_balancing_rules; > +----+--------+-------------+--------------------+------------------+------------+-------------------+------------------------------+--------+-------------+ > | id | name | description | default_port_start | default_port_end | > algorithm | source_ip_address | source_ip_address_network_id | scheme | > lb_protocol | > +----+--------+-------------+--------------------+------------------+------------+-------------------+------------------------------+--------+-------------+ > | 8 | lbtest | NULL | 80 | 80 | > roundrobin | NULL | NULL | Public | NULL > | > | 9 | newlb | NULL | 80 | 80 | > roundrobin | NULL | NULL | Public | NULL > | > +----+--------+-------------+--------------------+------------------+------------+-------------------+------------------------------+--------+-------------+ > 2 rows in set (0.00 sec) > mysql> select * from firewall_rules where ip_address_id = 5; > +----+--------------------------------------+---------------+------------+----------+--------+----------+----------------+------------+-----------+------------+--------------------------------------+---------------------+-----------+-----------+---------+------+--------+--------------+ > | id | uuid | ip_address_id | start_port | > end_port | state | protocol | purpose | account_id | domain_id | > network_id | xid | created | > icmp_code | icmp_type | related | type | vpc_id | traffic_type | > +----+--------------------------------------+---------------+------------+----------+--------+----------+----------------+------------+-----------+------------+--------------------------------------+---------------------+-----------+-----------+---------+------+--------+--------------+ > | 1 | b9082345-8a3d-4f6d-9b64-3d2d98e65d2d | 5 | 888 | > 888 | Active | tcp | Firewall | 4 | 2 | > 205 | 5cf27b56-4d37-4ec1-bdf8-ede0407f0115 | 2013-12-06 06:51:40 | NULL > | NULL | NULL | User | NULL | Ingress | > | 2 | 5b657e22-649a-4cd4-b23c-2416243f48ba | 5 | 888 | > 888 | Active | tcp | PortForwarding | 4 | 2 | > 205 | aad0e89d-f0df-4ee2-949d-39f129a1383a | 2013-12-06 06:52:13 | NULL > | NULL | NULL | User | NULL | NULL | > | 8 | 7eb1f1bf-7357-4af7-85b2-d4895f8c66de | 5 | 80 | > 80 | Add | tcp | LoadBalancing | 4 | 2 | > 205 | 232f13ad-1888-4268-ad9e-0bc919ce6680 | 2013-12-06 08:44:38 | NULL > | NULL | NULL | User | NULL | NULL | > +----+--------------------------------------+---------------+------------+----------+--------+----------+----------------+------------+-----------+------------+--------------------------------------+---------------------+-----------+-----------+---------+------+--------+--------------+ > 3 rows in set (0.00 sec) > mysql> select * from port_forwarding_rules; > +----+-------------+-----------------+-----------------+---------------+ > | id | instance_id | dest_ip_address | dest_port_start | dest_port_end | > +----+-------------+-----------------+-----------------+---------------+ > | 2 | 5 | 10.102.198.2 | 80 | 80 | > | 7 | 10 | 10.1.1.17 | 80 | 80 | > +----+-------------+-----------------+-----------------+---------------+ > 2 rows in set (0.00 sec) > mysql> select * from user_ip_address where id = 5; > +----+--------------------------------------+------------+-----------+-------------------+----------------+------------+---------------------+------------+----------------+-------+-----------+-------------+-------------------+------------+---------------------+-----------+--------+-----------+-------------+ > | id | uuid | account_id | domain_id | > public_ip_address | data_center_id | source_nat | allocated | > vlan_db_id | one_to_one_nat | vm_id | state | mac_address | > source_network_id | network_id | physical_network_id | is_system | vpc_id | > dnat_vmip | is_portable | > +----+--------------------------------------+------------+-----------+-------------------+----------------+------------+---------------------+------------+----------------+-------+-----------+-------------+-------------------+------------+---------------------+-----------+--------+-----------+-------------+ > | 5 | 3c4fdb2d-53a7-43a7-853d-6b1ddee2c941 | 4 | 2 | > 10.102.196.239 | 1 | 0 | 2013-12-06 06:51:09 | > 1 | 0 | NULL | Allocated | 16 | 200 | > 205 | 200 | 0 | NULL | NULL | > 0 | > +----+--------------------------------------+------------+-----------+-------------------+----------------+------------+---------------------+------------+----------------+-------+-----------+-------------+-------------------+------------+---------------------+-----------+--------+-----------+-------------+ > 1 row in set (0.00 sec) -- This message was sent by Atlassian JIRA (v6.1.4#6159)