[YANGTOOLS-985] Install odl-restconf after odl-bgpcep-pcep and bgp-bgpcep-bgp make odl unusable Created: 28/Jun/17  Updated: 29/Apr/19  Resolved: 29/Apr/19

Status: Resolved
Project: yangtools
Component/s: parser
Affects Version/s: 2.0.16, 2.1.8, 2.0.6.7
Fix Version/s: 2.1.9, 3.0.1, 2.0.18

Type: Bug Priority: Medium
Reporter: Matthieu Cauffiez Assignee: Claudio David Gasparini
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File karaf.log    
Issue Links:
Blocks
blocks ODLPARENT-110 [Karaf 4] Avoid bundle refreshes Resolved
External issue ID: 8767

 Description   

This bug is only present in master branch of ODL, it is working with boron and carbon.

step to reproduce:
feature:install odl-bgpcep-bgp
feature:install odl-bgpcep-pcep
feature:install odl-restconf-all

Exception in thread "config-blank-txn-0" java.lang.IllegalStateException: Error while copying old configuration from ModuleInternalInfo [name=ModuleIdentifier

{factoryName='distributed-operational-datastore-provider', instanceName='distributed-operational-store-module'}

] to org.opendaylight.controller.config.yang.config.distributed_datastore_provider.DistributedOperationalDataStoreProviderModuleFactory@38d9e12d
then you will not be able to shutdown gracefully ODL.

Same issue with the feature odl-restconf

if you install odl-restconf-all before odl-bgpcep-bgp and odl-bgpcep-pcep everything will be fine.



 Comments   
Comment by Matthieu Cauffiez [ 28/Jun/17 ]

Attachment karaf.log has been added with description: logs

Comment by Tom Pantelis [ 11/Aug/17 ]

This isn't an issue with clustering. It appears to be an issue with bundles refreshing due to the order of the features installed which has been a problem before, eg

2017-06-28 16:40:36,181 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 9 - org.apache.karaf.features.core - 4.0.9 | Refreshing bundles:
2017-06-28 16:40:36,181 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 9 - org.apache.karaf.features.core - 4.0.9 | config-persister-feature-adapter/0.7.0.SNAPSHOT (Wired to org.opendaylight.controller.config-persister-impl/0.7.0.SNAPSHOT which is being refreshed)

The error noted above is caused by:

Caused by: java.lang.ClassCastException: org.opendaylight.controller.config.yang.config.distributed_datastore_provider.OperationalProperties cannot be cast to org.opendaylight.controller.config.yang.config.distributed_datastore_provider.OperationalProperties

Since the class names to and from the cast are the same that means they were loaded by different class loaders which means the bundle was restarted.

Comment by Robert Varga [ 24/Aug/17 ]

2017-08-24 14:56:51,884 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | Refreshing bundles:
2017-08-24 14:56:51,884 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | com.typesafe.akka.actor/2.4.18 (Wired to org.opendaylight.controller.sal-distributed-datastore/1.6.0 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | com.typesafe.akka.cluster/2.4.18 (Wired to com.typesafe.akka.actor/2.4.18 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | com.typesafe.akka.osgi/2.4.18 (Wired to com.typesafe.akka.actor/2.4.18 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | com.typesafe.akka.persistence/2.4.18 (Wired to com.typesafe.akka.actor/2.4.18 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | com.typesafe.akka.remote/2.4.18 (Wired to org.jboss.netty/3.10.6.Final which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | com.typesafe.akka.slf4j/2.4.18 (Wired to com.typesafe.akka.actor/2.4.18 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | com.typesafe.akka.stream/2.4.18 (Wired to com.typesafe.akka.actor/2.4.18 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | config-persister-feature-adapter/0.7.0 (Wired to org.opendaylight.controller.config-persister-impl/0.7.0 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.apache.karaf.config.core/4.0.9 (Should be wired to: org.apache.felix.metatype/1.1.2 (through [org.apache.karaf.config.core/4.0.9] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.osgi.service.metatype)(version>=1.2.0)(!(version>=2.0.0)))"; resolution:=optional))
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.apache.servicemix.bundles.jasypt/1.9.2.1 (Should be wired to: javax.servlet-api/3.1.0 (through [org.apache.servicemix.bundles.jasypt/1.9.2.1] osgi.wiring.package; filter:="(osgi.wiring.package=javax.servlet)"; resolution:=optional))
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.eclipse.persistence.core/2.6.2.v20151217-774c696 (Should be wired to: javax.mail/1.4.4 (through [org.eclipse.persistence.core/2.6.2.v20151217-774c696] osgi.wiring.package; filter:="(osgi.wiring.package=javax.mail)"; resolution:=optional))
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.eclipse.persistence.moxy/2.6.2.v20151217-774c696 (Wired to org.eclipse.persistence.core/2.6.2.v20151217-774c696 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.jboss.netty/3.10.6.Final (Should be wired to: javax.servlet-api/3.1.0 (through [org.jboss.netty/3.10.6.Final] osgi.wiring.package; filter:="(osgi.wiring.package=javax.servlet)"; resolution:=optional))
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.opendaylight.controller.cds-access-api/1.2.0 (Wired to com.typesafe.akka.actor/2.4.18 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.opendaylight.controller.cds-access-client/1.2.0 (Wired to com.typesafe.akka.actor/2.4.18 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.opendaylight.controller.config-persister-directory-xml-adapter/0.7.0 (Wired to org.opendaylight.controller.config-persister-impl/0.7.0 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.opendaylight.controller.config-persister-file-xml-adapter/0.7.0 (Wired to org.opendaylight.controller.config-persister-impl/0.7.0 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.opendaylight.controller.config-persister-impl/0.7.0 (Wired to org.eclipse.persistence.moxy/2.6.2.v20151217-774c696 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.opendaylight.controller.sal-akka-raft/1.6.0 (Wired to com.typesafe.akka.actor/2.4.18 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.opendaylight.controller.sal-cluster-admin-impl/1.6.0 (Wired to com.typesafe.akka.actor/2.4.18 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.opendaylight.controller.sal-clustering-commons/1.6.0 (Wired to com.typesafe.akka.remote/2.4.18 which is being refreshed)
2017-08-24 14:56:51,885 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.opendaylight.controller.sal-distributed-datastore/1.6.0 (Wired to org.opendaylight.controller.sal-clustering-commons/1.6.0 which is being refreshed)
2017-08-24 14:56:51,886 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.opendaylight.controller.sal-remoterpc-connector/1.6.0 (Wired to org.opendaylight.controller.sal-clustering-commons/1.6.0 which is being refreshed)
2017-08-24 14:56:51,886 | INFO | pool-2-thread-1 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | org.ops4j.pax.jdbc.config/1.0.1 (Wired to org.apache.servicemix.bundles.jasypt/1.9.2.1 which is being refreshed)

Which boils down to akka being refreshed because of servlet-3.1.0 being optionally wired into netty-3.10.6

Comment by Robert Varga [ 05/Sep/18 ]

mcauffiez@inocybe.com is this still happening?

Comment by Matthieu Cauffiez [ 06/Sep/18 ]

I try this order:

feature:install odl-bgpcep-bgp
feature:install odl-bgpcep-pcep
feature:install odl-restconf-all

and his working

And if I do this there is an issue

feature:install odl-bgpcep-pcep
feature:install odl-bgpcep-bgp
feature:install odl-restconf-all

it is failling when I do the feature:install odl-bgpcep-bgp

with this error

Exception in thread "Thread-18" java.lang.IllegalStateException: Schema for node with name topology-pcep and namespace urn:opendaylight:params:xml:ns:yang:topology:pcep does not exist at AbsoluteSchemaPath

{path=[(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)network-topology, (urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology, (urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology-types]}

at com.google.common.base.Preconditions.checkState(Preconditions.java:847)
at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.read(XmlParserStream.java:361)
at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.read(XmlParserStream.java:367)
at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.read(XmlParserStream.java:291)
at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.read(XmlParserStream.java:367)
at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.parse(XmlParserStream.java:184)
at org.opendaylight.bgpcep.config.loader.impl.ConfigLoaderImpl.parseDefaultConfigFile(ConfigLoaderImpl.java:128)
at org.opendaylight.bgpcep.config.loader.impl.ConfigLoaderImpl.handleConfigFile(ConfigLoaderImpl.java:87)
at org.opendaylight.bgpcep.config.loader.impl.ConfigLoaderImpl.access$300(ConfigLoaderImpl.java:53)
at org.opendaylight.bgpcep.config.loader.impl.ConfigLoaderImpl$ConfigLoaderImplRunnable.lambda$handleEvent$2(ConfigLoaderImpl.java:227)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1696)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.opendaylight.bgpcep.config.loader.impl.ConfigLoaderImpl$ConfigLoaderImplRunnable.handleEvent(ConfigLoaderImpl.java:227)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.opendaylight.bgpcep.config.loader.impl.ConfigLoaderImpl$ConfigLoaderImplRunnable.handleChanges(ConfigLoaderImpl.java:215)
at org.opendaylight.bgpcep.config.loader.impl.ConfigLoaderImpl$ConfigLoaderImplRunnable.run(ConfigLoaderImpl.java:195)
at java.lang.Thread.run(Thread.java:748)

Comment by Tom Pantelis [ 06/Sep/18 ]

The ordering you listed above for both is the same. 

Comment by Matthieu Cauffiez [ 06/Sep/18 ]

Indeed, the order that is not working is

feature:install odl-bgpcep-pcep
feature:install odl-bgpcep-bgp
feature:install odl-restconf-all

I have updated the previous post

Comment by Robert Varga [ 27/Nov/18 ]

cdgasparini can you check what is going on here? it looks like reloads, but there is also config-loader involved and that did have safety issues...

Comment by Claudio David Gasparini [ 03/Dec/18 ]

I opened BGPCEP-852 for track mcauffiez@inocybe.com issue. But I'll say that he is hitting a different issue that the one for was this bug was opened at that time.

 

Regards,

Comment by Robert Varga [ 29/Apr/19 ]

The ISE is here: https://git.opendaylight.org/gerrit/#/q/Iecee17e19b3ac380bcb2b7fc1c46f27e789c20bd and it will be correctly reported as XMLStreamException – the second part will need to be addressed in BGPCEP-852.

Generated at Wed Feb 07 20:54:51 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.