Bug #2588
closedTag name of serialised object are not consistant in different Rudder parts
Description
On a freshly installed Rudder 2.4 nightly snapshot, when I try to import archives from the Administration > Archives screen, I get an error in the UI:
After trying a "Global Archives" restore, I see this in the webapp's log on disk:
23:48:04.578 [qtp1401888126-66] INFO com.normation.rudder.repository.xml.ItemArchiveManagerImpl - Importing full archive with id 'd1e71dc5902a5d725c4bbf59061760a2a9cec7d8' 23:48:04.578 [qtp1401888126-66] INFO com.normation.rudder.repository.xml.ItemArchiveManagerImpl - Importing rules archive with id 'd1e71dc5902a5d725c4bbf59061760a2a9cec7d8' 23:48:04.750 [qtp1401888126-66] INFO com.normation.rudder.repository.xml.ItemArchiveManagerImpl - Importing technique library archive with id 'd1e71dc5902a5d725c4bbf59061760a2a9cec7d8' 23:48:04.759 [qtp1401888126-66] ERROR com.normation.rudder.web.snippet.administration.Archives - Error when importing groups, Directive library and Rules. <- Error when unserializing category for file 'directives/category.xml' <- Entry type is not a policyLibraryCategory: <activeTechniqueCategory fileFormat="2"> <id>Active Techniques</id> <displayName>Root of active techniques's library</displayName> <description> This is the root category for active techniques. It contains subcategories, actives techniques and directives </description> <isSystem>true</isSystem> </activeTechniqueCategory> 23:48:04.760 [qtp1401888126-66] ERROR com.normation.rudder.web.snippet.administration.Archives -
When trying to restore just groups, I see this:
23:49:00.147 [qtp1401888126-67] INFO com.normation.rudder.repository.xml.ItemArchiveManagerImpl - Importing groups archive with id '29bd20f64e19a69c8a877544572dac577f84d8f3' 23:49:00.149 [qtp1401888126-67] ERROR com.normation.rudder.web.snippet.administration.Archives - Error when importing groups. <- No file were found at path 'groups/category.xml' 23:49:00.149 [qtp1401888126-67] ERROR com.normation.rudder.web.snippet.administration.Archives -
And when trying to restore just Directives, I see this:
23:48:56.974 [qtp1401888126-63] INFO com.normation.rudder.repository.xml.ItemArchiveManagerImpl - Importing technique library archive with id '29bd20f64e19a69c8a877544572dac577f84d8f3' 23:48:56.977 [qtp1401888126-63] ERROR com.normation.rudder.web.snippet.administration.Archives - Error when importing Directive library. <- The directory 'directives/' does not contain 'directives/category.xml' or 'directives/activeTechniqueSettings.xml' and should not have been considered 23:48:56.977 [qtp1401888126-63] ERROR com.normation.rudder.web.snippet.administration.Archives -
This may be several different bugs, I don't know - if so feel free to create extra tickets.
Files
Updated by François ARMAND over 12 years ago
- Status changed from 2 to In progress
Updated by François ARMAND over 12 years ago
So, it seems that the archiving does not serialize the root Category, and so the error.
Looking to it.
Updated by François ARMAND over 12 years ago
Well, the previous comment seems to be something else, see: #2592
Updated by François ARMAND over 12 years ago
- Subject changed from Importing Groups, Directives or global archives does not work to Tag name of serialised object are not consistant in different Rudder parts
OK, so, as we used plain text XML tag names at different plance of the application, non all evolves accordingly to all refactoring.
For example, in the serialization class, we can see:
def serialise(uptc:ActiveTechniqueCategory): Elem = { XmlUtils.trim { <activeTechniqueCategory fileFormat={xmlVersion}> ....
And on the unserialization part:
uptc <- { if(entry.label == "policyLibraryCategory") Full(entry) else Failure("Entry type is not a policyLibraryCategory: " + entry) }
That's BAD !!!
Updated by François ARMAND over 12 years ago
- Status changed from In progress to Pending technical review
- % Done changed from 0 to 100
Applied in changeset c3cda1835d1ce502a0a8765778a4560e24257c7d.
Updated by Nicolas CHARLES over 12 years ago
- Status changed from Pending technical review to Released
This looks valid, thank you Francois !