Project

General

Profile

Actions

Bug #20437

closed

Error when writing techniques via the technique editor

Added by Félix DALLIDET about 3 years ago. Updated almost 3 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Technique editor
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:

Description

When writing techniques in the technique editor, it works but throws a lot of errors in the rudderc logs:


error =>
  Inconsistency: An error occurred when compiling technique.rd file into CFEngine
 code: 1
 stderr: An error occurred, could not create content: Could not parse parameters: error at Commands: input does not match any existing file
Command line was : "/opt/rudder/bin/rudderc" "compile" "-j" "-f" "cf" "-i" "/var/rudder/configuration-repository//var/rudder/configuration-repository/techniques/ncf_techniques/Testing_rl/1.0/technique.json/technique.json" "--config-file=/opt/rudder/etc/rudderc.conf" 

 stdout: {
  "command": "compile",
  "source": null,
  "time": "1639581124231",
  "status": "failure",
  "logs": {
    "logs": []
  },
  "data": [],
  "errors": [
    "Could not parse parameters: error at Commands: input does not match any existing file\nCommand line was : \"/opt/rudder/bin/rudderc\" \"compile\" \"-j\" \"-f\" \"cf\" \"-i\" \"/var/rudder/configuration-repository//var/rudder/configuration-repository/techniques/ncf_techniques/Testing_rl/1.0/technique.json/technique.json\" \"--config-file=/opt/rudder/etc/rudderc.conf\" " 
  ]
}

technique data =>
  {
  "id":"Testing_rl",
  "version":"1.0",
  "category":"ncf_techniques",

It seems like the techniques folder is duplicated "/opt/rudder/bin/rudderc" "compile" "-j" "-f" "cf" "-i" "/var/rudder/configuration-repository//var/rudder/configuration-repository/techniques/ncf_techniques/Testing_rl/1.0/technique.json/technique.json" "--config-file=/opt/rudder/etc/rudderc.conf"

Actions #1

Updated by Félix DALLIDET about 3 years ago

  • Target version set to 7.0.0~rc3
Actions #2

Updated by Félix DALLIDET about 3 years ago

The correct command seems to be:
/opt/rudder/bin/rudderc compile -j -f cf -i /var/rudder/configuration-repository/techniques/ncf_techniques/Testing_rl/1.0/technique.rd --config-file=/opt/rudder/etc/rudderc.conf

And now I have a real error:

root@server:/var/log/rudder# /opt/rudder/bin/rudderc compile -j -f cf -i /var/rudder/configuration-repository/techniques/ncf_techniques/Testing_rl/1.0/technique.rd --config-file=/opt/rudder/etc/rudderc.conf
An error occurred, could not create content from 'technique.rd':
Expected a component metadata
{
  "command": "compile",
  "source": "technique.rd",
  "time": "1639582623607",
  "status": "failure",
  "logs": {
    "logs": []
  },
  "data": [],
  "errors": [
    "Expected a component metadata" 
  ]
}
An error occurred, could not create content: Command was "/opt/rudder/bin/rudderc" "compile" "-j" "-f" "cf" "-i" "/var/rudder/configuration-repository/techniques/ncf_techniques/Testing_rl/1.0/technique.rd" "--config-file=/opt/rudder/etc/rudderc.conf" 
{
  "command": "compile",
  "source": null,
  "time": "1639582623610",
  "status": "failure",
  "logs": {
    "logs": []
  },
  "data": [],
  "errors": [
    "Command was \"/opt/rudder/bin/rudderc\" \"compile\" \"-j\" \"-f\" \"cf\" \"-i\" \"/var/rudder/configuration-repository/techniques/ncf_techniques/Testing_rl/1.0/technique.rd\" \"--config-file=/opt/rudder/etc/rudderc.conf\" " 
  ]
}

Actions #3

Updated by François ARMAND about 3 years ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #4

Updated by François ARMAND about 3 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/4059
Actions #5

Updated by François ARMAND about 3 years ago

  • Status changed from Pending technical review to Pending release
Actions #6

Updated by Benoît PECCATTE almost 3 years ago

  • Category set to Web - Technique editor
Actions #7

Updated by Vincent MEMBRÉ almost 3 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 7.0.0~rc3 which was released today.

Actions

Also available in: Atom PDF