Bug #26098
open
error when importing full archives
Added by Nicolas CHARLES 14 days ago.
Updated 13 days ago.
Category:
Web - Config management
Severity:
Major - prevents use of part of Rudder | no simple workaround
Description
When trying to import we get the following error
remote: {"action":"restoreFullLatestCommit","result":"error","errorDetails":"Error when trying to restore the latest archive for full. Error was: Error when unserializing template for file 'directives/userlib_systemSettings/userlib_networking/nfsServer/activeTechniqueSettings.xml'; cause was: Unexpected: Missing attribute 'isSystem' in entry type policyLibraryTemplate : <activeTechnique fileFormat=\"6\">\n <id>236fc0a4-a744-4e74-b158-6c946608e4e9</id>\n <techniqueName>nfsServer</techniqueName>\n <isEnabled>true</isEnabled>\n <isSystem>false</isSystem>\n <versions>\n <version name=\"1.0\">2021-05-31T09:06:41.498Z</version>\n <version name=\"2.0\">2021-05-31T09:06:41.498Z</version>\n <version name=\"3.0\">2021-05-31T09:06:41.498Z</version>\n </versions>\n</activeTechnique>"}
The error message is a lie, as it looks for `policyTypes`
Easily reproducible by trying to restore directive library
2024-12-18 22:39:56+0000 ERROR com.normation.rudder.web.snippet.administration.Archives - Error when importing directive library. <- Error when unserializing template for file 'directives/fileDistribution/manageKeyValueFile/activeTechniqueSettings.xml' <- Unexpected: Missing attribute 'isSystem' in entry type policyLibraryTemplate : <activeTechnique fileFormat="6">
<id>manageKeyValueFile</id>
<techniqueName>manageKeyValueFile</techniqueName>
<isEnabled>true</isEnabled>
<isSystem>false</isSystem>
<versions>
<version name="1.3">2024-09-18T09:56:46.091Z</version>
</versions>
</activeTechnique>
2024-12-18 22:39:56+0000 ERROR com.normation.rudder.web.snippet.administration.Archives -
2024-12-18 22:40:13+0000 INFO git-policy-archive - Importing technique library archive with id '58261c1d91013fb9eab489cc5acf89d91614aeab'
2024-12-18 22:40:13+0000 ERROR com.normation.rudder.web.snippet.administration.Archives - Error when importing directive library. <- Error when unserializing template for file 'directives/fileDistribution/manageKeyValueFile/activeTechniqueSettings.xml' <- Unexpected: Missing attribute 'isSystem' in entry type policyLibraryTemplate : <activeTechnique fileFormat="6">
<id>manageKeyValueFile</id>
<techniqueName>manageKeyValueFile</techniqueName>
<isEnabled>true</isEnabled>
<isSystem>false</isSystem>
<versions>
<version name="1.3">2024-09-18T09:56:46.091Z</version>
</versions>
</activeTechnique>
2024-12-18 22:40:13+0000 ERROR com.normation.rudder.web.snippet.administration.Archives -
https://github.com/Normation/rudder/blob/master/webapp/sources/rudder/rudder-core/src/main/scala/com/normation/rudder/services/marshalling/XmlUnserialisationImpl.scala#L439C47-L439C58
Seems like old built-in technique are missing policyTypes
. The one that came from DSC plugin contains policyTypes
root@82_server:/var/rudder/configuration-repository/directives# grep -iRL policyTypes | grep active
fileDistribution/downloadFile/activeTechniqueSettings.xml
fileDistribution/manageKeyValueFile/activeTechniqueSettings.xml
fileDistribution/checkGenericFileContent/activeTechniqueSettings.xml
jobScheduling/jobScheduler/activeTechniqueSettings.xml
fileConfiguration/fileSecurity/filesPermissions/activeTechniqueSettings.xml
fileConfiguration/fileManagement/activeTechniqueSettings.xml
systemSettings/userManagement/sudoParameters/activeTechniqueSettings.xml
systemSettings/userManagement/groupManagement/activeTechniqueSettings.xml
systemSettings/process/services/activeTechniqueSettings.xml
systemSettings/process/servicesManagement/activeTechniqueSettings.xml
systemSettings/networking/hostsConfiguration/activeTechniqueSettings.xml
systemSettings/networking/firewall/activeTechniqueSettings.xml
systemSettings/networking/dnsConfiguration/activeTechniqueSettings.xml
systemSettings/systemManagement/cronManagement/activeTechniqueSettings.xml
systemSettings/systemManagement/userCronManagement/activeTechniqueSettings.xml
systemSettings/security/fileAlterationMonitoring/activeTechniqueSettings.xml
systemSettings/misc/rudderSNMP/activeTechniqueSettings.xml
systemSettings/misc/partitionSizeMonitoring/activeTechniqueSettings.xml
systemSettings/misc/genericCommandVariableDefinition/activeTechniqueSettings.xml
systemSettings/remoteAccess/sshConfiguration/activeTechniqueSettings.xml
systemSettings/remoteAccess/sshKeyDistribution/activeTechniqueSettings.xml
applications/zypperPackageManagerSetup/activeTechniqueSettings.xml
applications/zypperPackageManagerRepositories/activeTechniqueSettings.xml
applications/zmdPackageManagerSettings/activeTechniqueSettings.xml
applications/repoGpgKeyManagement/activeTechniqueSettings.xml
applications/packageManagement/activeTechniqueSettings.xml
applications/aptPackageManagerSettings/activeTechniqueSettings.xml
- Status changed from New to In progress
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Clark ANDRIANASOLO
- Pull Request set to https://github.com/Normation/rudder/pull/6103
- Status changed from Pending technical review to Pending release
Also available in: Atom
PDF