Project

General

Profile

Bug #12005

Set flag to reload ncf technique through Rudder during update

Added by Nicolas CHARLES 11 months ago. Updated 10 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Technique editor
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

Description

I created a test technique in 4.2, and migrated to 4.3

Unfortunately, reporting was broken

E| repaired      ${t_name}                 ${c_name}                 ${c_key}           Execute the command /bin/true was repaired

context is correctly set for rule/directive id

      "Global configuration for all nodes/test technique" usebundle => current_reporting_identifier("d3ace204-ede2-4b2d-8636-040f035cf3d1","32377fd7-02fd-43d0-aab7-28460a91347b");
     "Global configuration for all nodes/test technique" usebundle => set_dry_run_mode("false");
     "Global configuration for all nodes/test technique" usebundle => test_technique;

it does report with rule/directive id

R: @@${t_name}@@result_repaired@@32377fd7-02fd-43d0-aab7-28460a91347b@@d3ace204-ede2-4b2d-8636-040f035cf3d1@@0@@${c_name}@@${c_key}@@2018-01-18 09:55:02+00:00##root@#Execute the command /bin/true was repaired

but, technique doesn't contain everything necessary

bundle agent test_technique
{
  methods:
    "method_call" usebundle => command_execution("/bin/true"),
      ifvarclass => concat("any");
}

Associated revisions

Revision 8c60dc6e (diff)
Added by Vincent MEMBRÉ 11 months ago

Fixes #12005: Set flag to reload ncf technique through Rudder during update

History

#1 Updated by Nicolas CHARLES 11 months ago

  • Subject changed from Technique created with Technique Editor in 4.2 are not correctly migrated for 4.3, and don't provide reporting to Technique created with Technique Editor in 4.2 are not correctly migrated for 4.3, and don't provide reporting (and technique created in 4.3 don't provide reporting either)

Logs when modifying technique are

[2018-01-18 11:00:32] ERROR com.normation.rudder.rest.RestUtils - "Could not update ncf technique <- Array is empty when extracting array <- parameter cannot be empty" 

#2 Updated by Vincent MEMBRÉ 11 months ago

  • Subject changed from Technique created with Technique Editor in 4.2 are not correctly migrated for 4.3, and don't provide reporting (and technique created in 4.3 don't provide reporting either) to Set flag to reload ncf technique through Rudder during update
  • Target version changed from 4.3.0~beta1 to 4.2.4

The problem is that techniques built in 4.2 are not upgraded to 4.3 format and they needs to saved within the editor

It appears that it could also be a problem in 4.2, since now rudder_reporting is generated by Rudder and not by ncf API

Techniques could be migrated to the correct format by setting flag /opt/rudder/etc/force_ncf_technique_update before restarting jetty

#3 Updated by Vincent MEMBRÉ 11 months ago

  • Status changed from New to In progress

#4 Updated by Vincent MEMBRÉ 11 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/1462

#5 Updated by Normation Quality Assistant 11 months ago

  • Assignee changed from Benoît PECCATTE to Vincent MEMBRÉ

#6 Updated by Vincent MEMBRÉ 11 months ago

  • Assignee changed from Vincent MEMBRÉ to Benoît PECCATTE

#7 Updated by Normation Quality Assistant 11 months ago

  • Assignee changed from Benoît PECCATTE to Vincent MEMBRÉ

#8 Updated by Vincent MEMBRÉ 11 months ago

  • Status changed from Pending technical review to Pending release

#9 Updated by Vincent MEMBRÉ 10 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.2.4 which was released today.

Also available in: Atom PDF