Project

General

Profile

Actions

Bug #21430

closed

technique from technique editor not commited in git

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

Status:
Released
Priority:
N/A
Category:
Web - Technique editor
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:

Description

I created the following technique, and it didn't import in git
No error in log related to this technique.
Policy generation failed

[2022-07-18 13:12:57+0000] INFO  com.normation.rudder.services.policies.DeployOnTechniqueCallback - Automatic batch update at 20220718T131257.283Z
[2022-07-18 13:59:32+0000] INFO  techniques.reader - Reloading technique library, found modified technique(s): ['test': updated (1.0: added)]
[2022-07-18 13:59:32+0000] INFO  com.normation.rudder.services.policies.TechniqueAcceptationUpdater - Automatically adding technique 'test' in category 'User Techniques (ncf_techniques)' of active techniques library
[2022-07-18 13:59:33+0000] INFO  com.normation.rudder.services.policies.DeployOnTechniqueCallback - Update Technique library after creating files for ncf Technique test
[2022-07-18 13:59:33+0000] INFO  policy.generation - Start policy generation, checking updated rules
[2022-07-18 13:59:33+0000] INFO  policy.generation - [metrics] Xmx:1 GB nodes:3 (cached:3) rules:6 (enabled:6) techniques:9 (enabled:9) directives:14 (enabled:14) groups:3 (dynamic:3) parameters:2
[2022-07-18 13:59:33+0000] INFO  policy.generation - No node configuration was updated, no policies to write
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Timing summary:
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Run pre-gen scripts hooks     :          1 ms
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Run pre-gen modules hooks     :          0 ms
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Fetch all information         :         31 ms
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Build current rule values     :          1 ms
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Build target configuration    :         16 ms
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Write node configurations     :        227 ms
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Save expected reports         :          0 ms
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Run post generation hooks     :        115 ms
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Number of nodes updated       :          0   
[2022-07-18 13:59:33+0000] INFO  policy.generation.timing - Policy generation succeeded in:           
[2022-07-18 13:59:33+0000] INFO  policy.generation.manager - Successful policy update '17' [started 2022-07-18 13:59:33 - ended 2022-07-18 13:59:33]
[2022-07-18 13:59:43+0000] INFO  policy.generation - Start policy generation, checking updated rules
[2022-07-18 13:59:43+0000] INFO  policy.generation - [metrics] Xmx:1 GB nodes:3 (cached:3) rules:6 (enabled:6) techniques:10 (enabled:10) directives:15 (enabled:15) groups:3 (dynamic:3) parameters:2
[2022-07-18 13:59:43+0000] INFO  policy.generation - Configuration of 3 nodes were updated, their policies are going to be written
[2022-07-18 13:59:43+0000] ERROR com.normation.cfclerk.services.impl.GitTechniqueReader - Template with id techniques/ncf_techniques/test/1.0/rudder_reporting.cf was not found
[2022-07-18 13:59:43+0000] ERROR com.normation.cfclerk.services.impl.GitTechniqueReader - Template with id techniques/ncf_techniques/test/1.0/technique.cf was not found
[2022-07-18 13:59:44+0000] INFO  policy.generation.timing - Policy generation failed after:           
[2022-07-18 13:59:44+0000] ERROR policy.generation.manager - Error when updating policy, reason was: Cannot write nodes configuration; cause was: Unexpected: Accumulated: Unexpected: Error when trying to open resource 'techniques/ncf_techniques/test/1.0/rudder_reporting.cf'. Check that the file exists is correctly commited in Git, or that the metadata for the technique are corrects. ; Unexpected: Error when trying to open resource 'techniques/ncf_techniques/test/1.0/technique.cf'. Check that the file exists is correctly commited in Git, or that the metadata for the technique are corrects.
[2022-07-18 13:59:44+0000] ERROR policy.generation.manager - Policy update error for process '18' at 2022-07-18 13:59:44: Cannot write nodes configuration; cause was: Unexpected: Accumulated: Unexpected: Error when trying to open resource 'techniques/ncf_techniques/test/1.0/rudder_reporting.cf'. Check that the file exists is correctly commited in Git, or that the metadata for the technique are corrects. ; Unexpected: Error when trying to open resource 'techniques/ncf_techniques/test/1.0/technique.cf'. Check that the file exists is correctly commited in Git, or that the metadata for the technique are corrects.

technique is attached


Files

test.json (1.71 KB) test.json Nicolas CHARLES, 2022-07-18 16:02
Actions #1

Updated by Nicolas CHARLES over 2 years ago

files are there but not in git

root@server:/var/rudder/configuration-repository/techniques/ncf_techniques/test/1.0# git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)
    rudder_reporting.cf
    technique.cf
    technique.ps1

nothing added to commit but untracked files present (use "git add" to track)

Actions #2

Updated by Nicolas CHARLES over 2 years ago

adding the files into git solves the issue

Actions #3

Updated by Nicolas CHARLES over 2 years ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
Actions #4

Updated by Nicolas CHARLES over 2 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/4374
Actions #5

Updated by Nicolas CHARLES over 2 years ago

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

Updated by Vincent MEMBRÉ about 2 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 7.2.0~rc1 which was released today.

Actions

Also available in: Atom PDF