Actions
Bug #24885
openIt's impossible to import a technique within a subdirectory in Rudder 8.1
Pull Request:
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.0with
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
Updated by Nicolas CHARLES 7 months ago
- Related to Architecture #23474: Ensure yaml technique id and technique directory path agree added
Updated by Vincent MEMBRÉ 6 months ago
- Target version changed from 8.1.3 to 8.1.4
Updated by Vincent MEMBRÉ 6 months ago
- Target version changed from 8.1.4 to 8.1.5
Updated by Vincent MEMBRÉ 5 months ago
- Target version changed from 8.1.5 to 8.1.6
Updated by Vincent MEMBRÉ 4 months ago
- Target version changed from 8.1.6 to 8.1.7
Updated by Vincent MEMBRÉ 3 months ago
- Target version changed from 8.1.7 to 8.1.8
Updated by Vincent MEMBRÉ about 1 month ago
- Target version changed from 8.1.8 to 8.1.9
Updated by Vincent MEMBRÉ 13 days ago
- Target version changed from 8.1.9 to 8.1.10
Updated by Vincent MEMBRÉ 8 days ago
- Target version changed from 8.1.10 to 8.1.11
Actions