Project

General

Profile

Actions

Bug #24013

open

Cannot import via API an archive made from an export of an archive via API

Added by Nicolas CHARLES 4 months ago. Updated 11 days ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

I exported a rules and it dependencies using

curl -k -H "X-API-Token: $(cat /var/rudder/run/api-token)" 'https://127.0.0.1/rudder/api/latest/archives/export?rules=e9566965-abc9-4e6f-b474-1391196fde45&include=directives,techniques' -o archive.zip

I tried to import on another system using

curl -k -H "X-API-Token: $(cat /var/rudder/run/api-token)" -X POST 'https://127.0.0.1/rudder/api/latest/archives/import' --form  "archive=@/vagrant/archive.zip" 

and it fails with

{"action":"import","result":"error","errorDetails":"Inconsistency: Technique 'Telnet_Desactivation' is used in imported directive Telnet Desactivation but is not in Rudder"}

webapp log says
2024-01-11 20:40:29+0000 INFO  application.archive - Received a new policy archive 'archive.zip', processing
2024-01-11 20:40:31+0000 ERROR application.archive - Error when processing uploaded archive: Inconsistency: Technique 'Telnet_Desactivation' is used in imported directive Telnet Desactivation but is not in Rudder
2024-01-11 20:40:31+0000 ERROR api-processing - Inconsistency: Technique 'Telnet_Desactivation' is used in imported directive Telnet Desactivation but is not in Rudder

Note: doing the import again fixes the issue
Note bis: i was, before doing the proper import, trying to import an export made from Utilities/Archives to see the behaviour (it happily reported sucess, even if it did nothing meaningful)

Note three: the rule categories are not exported !

Attached: the offending zip file


Related issues 1 (1 open0 closed)

Related to Rudder - Bug #24294: API Import does not reload imported techniques before importing elements that rely on themNewActions
Actions #1

Updated by Vincent MEMBRÉ 3 months ago

  • Target version changed from 8.0.5 to 8.0.6
Actions #2

Updated by Vincent MEMBRÉ 2 months ago

  • Target version changed from 8.0.6 to 8.0.7
Actions #3

Updated by Michel BOUISSOU 2 months ago

  • Related to Bug #24294: API Import does not reload imported techniques before importing elements that rely on them added
Actions #4

Updated by Vincent MEMBRÉ about 1 month ago

  • Target version changed from 8.0.7 to 8.0.8
Actions #5

Updated by Vincent MEMBRÉ 11 days ago

  • Target version changed from 8.0.8 to 8.0.9
Actions

Also available in: Atom PDF