Project

General

Profile

Actions

Bug #23655

closed

Import archive does not support technique upgrade

Added by Félix DALLIDET about 1 year ago. Updated 9 months ago.

Status:
Released
Priority:
N/A
Category:
API
Target version:
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:
  1. removing all directives based on techniques from the archive
  2. removing all techniques from the initial import in the technique tree
  3. removing from the confiiguration repository all the files from the initial import
  4. 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...


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #23818: Import archive for an existing technique delete the previous techniqueReleasedClark ANDRIANASOLOActions
Actions #1

Updated by Félix DALLIDET about 1 year ago

Forcing the override with

-form "merge=override-all" 

does not change anything.

Actions #2

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 8.0.1 to 8.0.2
Actions #3

Updated by François ARMAND about 1 year ago

  • Status changed from New to In progress
Actions #4

Updated by Anonymous about 1 year ago

  • Status changed from In progress to Pending release
Actions #5

Updated by François ARMAND about 1 year ago

  • Fix check changed from To do to Checked
Actions #6

Updated by François ARMAND about 1 year ago

  • Related to Bug #23818: Import archive for an existing technique delete the previous technique added
Actions #7

Updated by Vincent MEMBRÉ 9 months ago

  • Status changed from Pending release to Released
  • Priority changed from 89 to 83
Actions

Also available in: Atom PDF