[CONTROLLER-1541] UnmarshalException: unexpected element (uri:"urn:opendaylight:netvirt:aclservice-config", local:"aclservice-config"). Expected elements are <{}snapshot> Created: 25/Aug/16 Updated: 25/Jul/23 Resolved: 27/Mar/17 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | config |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Michael Vorburger | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 6535 |
| Description |
|
2016-08-25 19:01:07,757 | WARN | r - ConfigPusher | AbstractFeatureWrapper | 141 - config-persister-feature-adapter - 0.6.0.SNAPSHOT | Unable to parse configuration snapshot. Config from 'etc/opendaylight/datastore/initial/config/netvirt-aclservice-config.xml' will be IGNORED. Note that subsequent config files may fail due to this problem. Xml markup in this file needs to be fixed, for detailed information see enclosed exception.
|
| Comments |
| Comment by Michael Vorburger [ 25/Aug/16 ] |
|
Copy/paste of my analysis of this problem from private email exchange: From what I gathered it seems Karaf has some concept of XML configuration files per feature, yes? Those files can be any kind of XML, not just ODL CSS config XML, yes? If that's so, then it is simply wrong of AbstractFeatureWrapper to view the world as simple as it's current implementation does - note its CONFIG_FILE_SUFFIX = "xml" and Files.getFileExtension(c.getFinalname()).equals(CONFIG_FILE_SUFFIX) and then it tries to unmarshal that XML using JAXB, on the off chance that this XML is a CSS XML for it to handle with its schema.. and it then makes a dumb assumption that catch (JAXBException e) catches problems in CSS config, which it logs as warn with message pretending the file in a question is a bad CSS config file (which e.g. aclservice-config_aclservice-config.xml isn't at all, right? It seems to be ... whatever else; not important here, right?), and with catch (XMLStreamException e) wants to catch (inline comment in code) "Files that cannot be loaded are ignored as non config subsystem files e.g. jetty.xml" - that's... naive, and not working for you here. IMHO AbstractFeatureWrapper should be made smarter about finding out if a Karaf Feature XML configuration file is for ODL Config CSS. Not 100% sure how I would do that, Controller Configuration folks may have a better idea. One way would be to perhaps peek at the XML file to see it's root element, using DOM instead of JAXB? It's been a while since I did stuff like that. Some sort of XML file name convention, or directory placement, would perhaps be an alternative? |
| Comment by Michael Vorburger [ 25/Aug/16 ] |
|
https://git.opendaylight.org/gerrit/#/c/44185/ was to take care of this problem, but had to be reverted it seems. |
| Comment by Michael Vorburger [ 26/Aug/16 ] |
|
https://git.opendaylight.org/gerrit/#/c/44669/ is the new Gerrit from Tom about this. |