Actions
Bug #24013
openCannot import via API an archive made from an export of an archive via API
Pull Request:
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
Updated by Vincent MEMBRÉ 7 months ago
- Target version changed from 8.0.5 to 8.0.6
Updated by Vincent MEMBRÉ 6 months ago
- Target version changed from 8.0.6 to 8.0.7
Updated by Michel BOUISSOU 6 months ago
- Related to Bug #24294: API Import does not reload imported techniques before importing elements that rely on them added
Updated by Vincent MEMBRÉ 5 months ago
- Target version changed from 8.0.7 to 8.0.8
Updated by Vincent MEMBRÉ 5 months ago
- Target version changed from 8.0.8 to 8.0.9
Updated by Vincent MEMBRÉ 3 months ago
- Target version changed from 8.0.9 to 8.0.10
Updated by Vincent MEMBRÉ 2 months ago
- Target version changed from 8.0.10 to 1089
Updated by Alexis Mousset about 2 months ago
- Target version changed from 1089 to 8.1.6
Updated by Vincent MEMBRÉ about 1 month ago
- Target version changed from 8.1.6 to 8.1.7
Actions