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 about 1 month ago
- Related to Bug #26863: Error when saving cloned technique after removing resource added
Updated by Clark ANDRIANASOLO about 1 month 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 about 1 month ago
- Priority changed from N/A to 1 (highest)
Updated by Vincent MEMBRÉ 17 days ago
- Target version changed from 8.2.7 to 8.2.8
Updated by Clark ANDRIANASOLO 16 days ago
- Status changed from New to In progress
Updated by Clark ANDRIANASOLO 16 days ago
- Status changed from In progress to Pending technical review
- Assignee changed from Clark ANDRIANASOLO to François ARMAND
- Pull Request set to https://github.com/Normation/rudder/pull/6430
Updated by Clark ANDRIANASOLO 15 days ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|eb1f4b43116bc73de2029532e5768f87d0d2a880.