[CONTROLLER-738] Exception seen at startup Created: 27/Aug/14  Updated: 19/Oct/17  Resolved: 13/Nov/15

Status: Resolved
Project: controller
Component/s: config
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Jan Medved Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: Macintosh


External issue ID: 1633

 Description   

When the controller is started for the second time, the following configuration exception is seen:

2014-08-27 13:00:24.342 PDT [config-pusher] ERROR o.o.c.n.c.t.TransactionProvider - Exception while commit of org.opendaylight.controller:TransactionName=ConfigTransaction-74-75,type=ConfigTransaction, aborting transaction
org.opendaylight.controller.config.api.ConflictingVersionException: Optimistic lock failed. Expected parent version 76, was 74
at org.opendaylight.controller.config.manager.impl.ConfigRegistryImpl.commitConfig(ConfigRegistryImpl.java:217) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_65]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_65]
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75) ~[na:1.7.0_65]
at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_65]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_65]
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279) ~[na:1.7.0_65]
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:193) ~[na:1.7.0_65]
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:175) ~[na:1.7.0_65]
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:117) ~[na:1.7.0_65]
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:54) ~[na:1.7.0_65]
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) ~[na:1.7.0_65]
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) ~[na:1.7.0_65]
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) ~[na:1.7.0_65]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) ~[na:1.7.0_65]
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) ~[na:1.7.0_65]
at com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:150) ~[na:1.7.0_65]
at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167) ~[na:1.7.0_65]
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:252) ~[na:1.7.0_65]
at com.sun.proxy.$Proxy41.commitConfig(Unknown Source) ~[na:na]
at org.opendaylight.controller.config.util.ConfigRegistryJMXClient.commitConfig(ConfigRegistryJMXClient.java:102) ~[bundlefile:na]
at org.opendaylight.controller.netconf.confignetconfconnector.transactions.TransactionProvider.commitTransaction(TransactionProvider.java:110) ~[bundlefile:na]
at org.opendaylight.controller.netconf.confignetconfconnector.operations.Commit.handleWithNoSubsequentOperations(Commit.java:55) [bundlefile:na]
at org.opendaylight.controller.netconf.util.mapping.AbstractLastNetconfOperation.handle(AbstractLastNetconfOperation.java:33) [bundlefile:na]
at org.opendaylight.controller.netconf.util.mapping.AbstractNetconfOperation.handle(AbstractNetconfOperation.java:105) [bundlefile:na]
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.sendRequestGetResponseCheckIsOK(ConfigPusherImpl.java:287) [bundlefile:na]
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.pushConfig(ConfigPusherImpl.java:246) [bundlefile:na]
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.pushConfigWithConflictingVersionRetries(ConfigPusherImpl.java:135) [bundlefile:na]
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.internalPushConfigs(ConfigPusherImpl.java:111) [bundlefile:na]
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.process(ConfigPusherImpl.java:78) [bundlefile:na]
at org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator$InnerCustomizer$1.run(ConfigPersisterActivator.java:177) [bundlefile:na]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]

Note that this exception does not happen during the first controller startup (i.e. when it initializes its configuration from the factory defaults).

This exception is seen in the Cisco CTO distribution.



 Comments   
Comment by Jan Medved [ 27/Aug/14 ]

The exception only occurs when there is no configuration present for the netconf connector. By default (in all distributions except Cisco CTO), the netconf connector is configured with the controller's own netconf agent, so the exception is not observable..

Comment by Robert Varga [ 13/Nov/15 ]

This seems to be working now. Optimistic locking may fail during startup if RESTCONF operations are routed to config – that is normal way of operation.

Generated at Wed Feb 07 19:53:45 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.