Project

General

Profile

Actions

Bug #12005

closed

Set flag to reload ncf technique through Rudder during update

Added by Nicolas CHARLES over 6 years ago. Updated about 6 years ago.

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

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");
}

Actions #1

Updated by Nicolas CHARLES over 6 years 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" 

Actions #2

Updated by Vincent MEMBRÉ over 6 years 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

Actions #3

Updated by Vincent MEMBRÉ over 6 years ago

  • Status changed from New to In progress
Actions #4

Updated by Vincent MEMBRÉ over 6 years 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
Actions #5

Updated by Rudder Quality Assistant over 6 years ago

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

Updated by Vincent MEMBRÉ over 6 years ago

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

Updated by Rudder Quality Assistant over 6 years ago

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

Updated by Vincent MEMBRÉ over 6 years ago

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

Updated by Vincent MEMBRÉ about 6 years ago

  • Status changed from Pending release to Released

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

Actions

Also available in: Atom PDF