Actions
Bug #26912
openCreating technique with resources in folders can break technique library
Pull Request:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
It bothers me each time
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Medium
Priority:
89
Name check:
To do
Fix check:
To do
Regression:
No
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
Actions