Bug #26912
openCreating technique with resources in folders can break technique library
Description
When attempting to create a technique, by adding resources within some folders to it (/resources/testnested/file.txt
) before creating the technique by clicking on the Save button, there is an error on creation :
INFO api-processing.response-error - An error occurred during technique update after files were created for ncf Technique test creating fiber error; cause was: SystemError: An error occurred; cause was: zio.FiberFailure: key not found: /ncf_techniques/test_creating_fiber_error/1.0/resources -> com.normation.cfclerk.services.impl.GitTechniqueReader.recBuildRoot$1(GitTechniqueReader.scala:701) -> com.normation.cfclerk.services.impl.GitTechniqueReader.$anonfun$processCategories$30(GitTechniqueReader.scala:753) -> com.normation.cfclerk.services.impl.GitTechniqueReader.processCategories(GitTechniqueReader.scala:731) -> com.normation.cfclerk.services.impl.GitTechniqueReader.processRevTreeId(GitTechniqueReader.scala:552) -> com.normation.cfclerk.services.impl.GitTechniqueReader.getModifiedTechniques(GitTechniqueReader.scala:342) -> com.normation.cfclerk.services.impl.GitTechniqueReader.getModifiedTechniques(GitTechniqueReader.scala:339)It breaks the technique library entirely, and leaves it in an inconsistent state :
- the draft is kept in the technique editor, and it no has no resource
- the technique is created in the configuration repository :
/var/rudder/configuration-repository/techniques/ncf_techniques/test_creating_fiber_error/1.0/resources/testnested/
- there is a periodic technique library refresh (
rudder.batch.techniqueLibrary.updateInterval=5min
by default), which ends up with a similar error as above and huge stack trace, because the internal state of technique is broken - it is impossible to create another technique in the editor, the same error as above will happen when attempting to create another technique
#26863 can be a symptom, when attempting to create the technique again after the first creation request has failed, since resources will already be moved to the target technique folder
Updated by Clark ANDRIANASOLO 14 days ago
- Related to Bug #26863: Error when saving cloned technique after removing resource added
Updated by Clark ANDRIANASOLO 14 days ago
To recover from the corrupted state, there seem to be no easy workaround :
I attempted to delete the created technique folder : rm -r /var/rudder/configuration-repository/techniques/ncf_techniques/test_creating_fiber_error
, and to restart the webapp to clear the cache and force technique reload, but the same error happens during the technique library reload
Updated by Clark ANDRIANASOLO 14 days ago
- Priority changed from N/A to 1 (highest)