[CONTROLLER-1438] Config subsystem fails silently by default Created: 30/Oct/15  Updated: 16/Nov/15  Resolved: 16/Nov/15

Status: Verified
Project: controller
Component/s: config
Affects Version/s: Lithium
Fix Version/s: None

Type: Bug
Reporter: Devin Avery Assignee: Tom Pantelis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4560

 Description   

In Lithium we have noticed that the config subsystem fails silently if a config file fails to be parsed, or if it fails to find services. Their is an uncaught exception that is ultimately printed to standard out, which should in theory be showing up in karaf.out (which is not where people look by default).

It would be nice if the config sub system can log 1) when it successfully parses a config file and 2) if there are any thrown exceptions reporting an error, log those to the karaf.log at a WARN or ERROR log (or even FATAL since it stops the controller dead in the water).



 Comments   
Comment by Devin Avery [ 30/Oct/15 ]

https://git.opendaylight.org/gerrit/#/c/28985/3

Comment by Devin Avery [ 30/Oct/15 ]

While not the root cause, this is what we finally saw that pointed us in the right direction. But we had to hack in other messages to get to the true root cause.

exception in thread "config-pusher" java.lang.IllegalStateException: Unable to resolve value AttributeConfigElement [defaultValue=null, value=MappedDependency

{namespace='urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding', serviceName='binding-notification-service', refName='binding-notification-broker'}

] to attribute notification-service
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.InstanceConfig.resolveConfiguration(InstanceConfig.java:131)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.InstanceConfig.fromXml(InstanceConfig.java:192)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ModuleConfig.fromXml(ModuleConfig.java:59)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Config$1.resolveElement(Config.java:147)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Config$1.resolveElement(Config.java:144)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Config.resolveModule(Config.java:224)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Config.fromXmlModulesResolved(Config.java:152)
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfigXmlParser$EditConfigExecution.getResolvedXmlElements(EditConfigXmlParser.java:174)
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.setOnTransaction(EditConfig.java:184)
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.test(EditConfig.java:120)
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.executeTests(EditConfig.java:96)
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.getResponseInternal(EditConfig.java:75)
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.handleWithNoSubsequentOperations(EditConfig.java:308)
at org.opendaylight.controller.netconf.util.mapping.AbstractLastNetconfOperation.handle(AbstractLastNetconfOperation.java:33)
at org.opendaylight.controller.netconf.util.mapping.AbstractNetconfOperation.handle(AbstractNetconfOperation.java:100)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.sendRequestGetResponseCheckIsOK(ConfigPusherImpl.java:342)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.pushConfig(ConfigPusherImpl.java:293)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.pushConfigWithConflictingVersionRetries(ConfigPusherImpl.java:135)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.internalPushConfigs(ConfigPusherImpl.java:103)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.process(ConfigPusherImpl.java:76)
at org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator$InnerCustomizer$1.run(ConfigPersisterActivator.java:181)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: No service mapped to urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:binding-notification-service:binding-notification-broker. Wrong namespace, available namespaces: []
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ServiceRegistryWrapper.getByServiceAndRefName(ServiceRegistryWrapper.java:31)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.resolving.ObjectNameAttributeResolvingStrategy.parseAttribute(ObjectNameAttributeResolvingStrategy.java:44)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml.AttributeConfigElement.resolveValue(AttributeConfigElement.java:46)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.InstanceConfig.resolveConfiguration(InstanceConfig.java:127)
... 21 more

Comment by Vratko Polak [ 05/Nov/15 ]

This sounds to be related to CONTROLLER-1372 (and CONTROLLER-1349). So what is the new expected behavior now when Change 28985 was merged?

Comment by Tom Pantelis [ 05/Nov/15 ]

This should satisfy CONTROLLER-1372. Config push errors are now logged to ERROR with the config file name and it also logs INFO when it's starting a config push and when it successfully completes. This helps to see if a config is hanging and how long each push took.

(In reply to Vratko Polák from comment #3)
> This sounds to be related to CONTROLLER-1372 (and CONTROLLER-1349). So what is the new
> expected behavior now when Change 28985 was merged?

Comment by Vratko Polak [ 05/Nov/15 ]

I confirm that this Bug as well as CONTROLLER-1372 were fixed by Change 28985.

Current implementation stops pushing configs when first error happens, so other configs (which may be unrelated and thus they may succeed) are not pushed.

This fix was not cherry-picked to Beryllium yet.

Comment by Tom Pantelis [ 05/Nov/15 ]

It is: https://git.opendaylight.org/gerrit/#/c/29216/ - just not merged yet.

(In reply to Vratko Polák from comment #5)
> I confirm that this Bug as well as CONTROLLER-1372 were fixed by Change 28985.
>
> Current implementation stops pushing configs when first error happens, so
> other configs (which may be unrelated and thus they may succeed) are not
> pushed.
>
> This fix was not cherry-picked to Beryllium yet.

Comment by Vratko Polak [ 05/Nov/15 ]

>> was not cherry-picked
> just not merged yet

Oh, I have missed that Change.
I should be more careful with my verbs.

Comment by Robert Varga [ 13/Nov/15 ]

Change merged, needs cherry-pick to Lithium.

Comment by Tom Pantelis [ 13/Nov/15 ]

It was originally done in Lithium - this can be closed.

(In reply to Robert Varga from comment #8)
> Change merged, needs cherry-pick to Lithium.

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