Actions
Bug #23655
closedImport archive does not support technique upgrade
Pull Request:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
I hate Rudder for that
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Priority:
83
Name check:
To do
Fix check:
Checked
Regression:
No
Description
I built an archive containing techniques to use and test the new import API.
The first import works perfectly. After some testing I had to modify one of the technique, re-importing an archive with the updated technique without version change fails with the following error:
2023-10-26 08:51:40+0000 ERROR api-processing - SystemError: An error occurred; cause was: java.nio.file.NoSuchFileException: /var/rudder/configuration-repository/techniques/systemSettings/misc/cis_ubuntu20_audit_srv_2/1.0 -> com.normation.rudder.rest.lift.SaveArchiveServicebyRepo.$anonfun$saveTechnique$28(ArchiveApi.scala:1153) -> com.normation.zio$ZioRuntime$.$anonfun$unsafeRun$1(ZioCommons.scala:445) -> com.normation.zio$ZioRuntime$.unsafeRun(ZioCommons.scala:445) -> com.normation.zio$ZioRuntime$.runNow(ZioCommons.scala:428) -> com.normation.zio$UnsafeRun.runNow(ZioCommons.scala:454) -> com.normation.rudder.rest.RudderJsonResponse$implicits$ToLiftResponseOne.toLiftResponseOne(RudderJsonResponse.scala:199) -> com.normation.rudder.rest.RudderJsonResponse$implicits$ToLiftResponseOne.toLiftResponseOne(RudderJsonResponse.scala:211) -> com.normation.rudder.rest.lift.ArchiveApi$Import$.process0(ArchiveApi.scala:354) -> com.normation.rudder.rest.lift.FeatureSwitch0.process0(ArchiveApi.scala:134) -> com.normation.rudder.rest.lift.LiftApiModule0.process(LiftApiDispatcher.scala:112) -> com.normation.rudder.rest.lift.LiftApiModule0.process$(LiftApiDispatcher.scala:104) -> com.normation.rudder.rest.lift.FeatureSwitch0.process(ArchiveApi.scala:117) -> com.normation.rudder.rest.lift.FeatureSwitch0.process(ArchiveApi.scala:117) -> com.normation.rudder.rest.lift.LiftApiModule.handler(LiftApiDispatcher.scala:67) -> com.normation.rudder.rest.lift.LiftApiModule.handler$(LiftApiDispatcher.scala:59) -> com.normation.rudder.rest.lift.FeatureSwitch0.handler(ArchiveApi.scala:117) -> com.normation.rudder.rest.lift.FeatureSwitch0.handler(ArchiveApi.scala:117) -> com.normation.rudder.rest.BuildHandler.$anonfun$buildApi$21(ApiDatastructures.scala:696) -> com.normation.rudder.rest.BuildHandler.$anonfun$buildApi$18(ApiDatastructures.scala:680) -> com.normation.rudder.rest.BuildHandler.$anonfun$buildApi$15(ApiDatastructures.scala:674) -> com.normation.rudder.rest.BuildHandler.$anonfun$buildApi$15$adapted(ApiDatastructures.scala:672) -> com.normation.rudder.rest.BuildHandler.$anonfun$buildApi$13(ApiDatastructures.scala:672) -> com.normation.rudder.rest.BuildHandler.$anonfun$buildApi$7(ApiDatastructures.scala:665)The import did wipe all previous technique files in the /var/rudder/configuration-repository but did not commit the change nor did it unpack the new files from the archive in-place.
The error is very confusing as the archive is well construct and I was finally able to import it after:
- removing all directives based on techniques from the archive
- removing all techniques from the initial import in the technique tree
- removing from the confiiguration repository all the files from the initial import
- re-run the import on the updated archive
I am not sure on how the import is expected to behave, but this is very confusing for the end user and make the import/export usage very limited...
Updated by Félix DALLIDET about 1 year ago
Forcing the override with
-form "merge=override-all"
does not change anything.
Updated by Vincent MEMBRÉ about 1 year ago
- Target version changed from 8.0.1 to 8.0.2
Updated by François ARMAND about 1 year ago
- Status changed from New to In progress
Updated by Anonymous about 1 year ago
- Status changed from In progress to Pending release
Applied in changeset rudder|2a8ac94f525c71146e3a418363b3b82043e2d2e1.
Updated by François ARMAND about 1 year ago
- Fix check changed from To do to Checked
Updated by François ARMAND 12 months ago
- Related to Bug #23818: Import archive for an existing technique delete the previous technique added
Updated by Vincent MEMBRÉ 8 months ago
- Status changed from Pending release to Released
- Priority changed from 89 to 83
Actions