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 6 months ago. Updated 14 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 6 months ago

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

Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 8.1.3 to 8.1.4
Actions #3

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 8.1.4 to 8.1.5
Actions #4

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 8.1.5 to 8.1.6
Actions #5

Updated by Vincent MEMBRÉ 4 months ago

  • Target version changed from 8.1.6 to 8.1.7
Actions #6

Updated by Vincent MEMBRÉ 2 months ago

  • Target version changed from 8.1.7 to 8.1.8
Actions #7

Updated by Vincent MEMBRÉ 14 days ago

  • Target version changed from 8.1.8 to 8.1.9
Actions

Also available in: Atom PDF