Project

General

Profile

Actions

Bug #24885

open

It's impossible to import a technique within a subdirectory in Rudder 8.1

Added by Nicolas CHARLES about 1 month ago. Updated 5 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 created a technique in the folder systemSettings/hardening_pack_rudder/1.0
It starts with

id: hardening_pack_rudder
name: Hardening pack for Rudder
version: 1.0

when I tried to import it in Rudder with curl, I got the following error
# curl -k -X POST -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" https://localhost/rudder/api/latest/archives/import --form "archive=@hardening-archive.zip" 
{"action":"import","result":"error","errorDetails":"error when committing Technique 'hardening_pack_rudder/1.0'; cause was: Inconsistency: Technique descriptor at path '/var/rudder/configuration-repository/techniques/systemSettings/hardening_pack_rudder/1.0' contains a technique 'id' or 'version' attribute that does not match the conventional path of the technique which must be: '.../category/parts/.../{techniqueId}/{techniqueVersion}/technique.yml'. Please change either technique directory or the descriptor information so that they match one other each others."}

error is because in the scala code, we do the following comparision

techniqueBaseDirectory.path.endsWith(techniqueDescriptor.path)

so we compare

/var/rudder/configuration-repository/techniques/systemSettings/hardening_pack_rudder/1.0
with
techniques/${category}/${id.value}/${version.value}
, so there is no chance that we can import a technique in a subdirectory

happens in 8.1, may happen in 8.0


Related issues 1 (0 open1 closed)

Related to Rudder - Architecture #23474: Ensure yaml technique id and technique directory path agreeReleasedFrançois ARMANDActions
Actions #1

Updated by Nicolas CHARLES about 1 month ago

  • Related to Architecture #23474: Ensure yaml technique id and technique directory path agree added
Actions #2

Updated by Vincent MEMBRÉ 24 days ago

  • Target version changed from 8.1.3 to 8.1.4
Actions #3

Updated by Vincent MEMBRÉ 5 days ago

  • Target version changed from 8.1.4 to 8.1.5
Actions

Also available in: Atom PDF