Project

General

Profile

Bug #14038

Separated policy generation does not work correctly with Rudder DSC agent

Added by Nicolas CHARLES 8 months ago. Updated 7 months ago.

Status:
Released
Priority:
N/A
Category:
Plugins integration
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

Description

We have several problems at stake here

  • Techniques hardcode an outputh path for DSC policy files - so files of each directives are overriding each others
    <TML name="fileTemplate.ps1">
     <OUTPATH>fileTemplate/1.0/fileTemplate.ps1</OUTPATH>
    </TML>
    
  • if we add a _RudderUniqueID (only once in the OUTPATH, otherwise it is not replaced!), the files are at the correct location, but the inputs/rudder.json is invalid
      "RUDDER_DIRECTIVES_INPUTS":[
        "Test_reporting_issue/1.0/Test_reporting_issue.ps1",
        "copyGitFile_RudderUniqueID/copyFileFromSharedFolder.ps1",
        "copyGitFile_RudderUniqueID/copyFileFromSharedFolder.ps1" 
      ],
    
  • if we drop the OUTPATH, all is fune, EXCEPT that the files are called .cf, and cannot be loaded by dsc agent
      "RUDDER_DIRECTIVES_INPUTS":[
        "Test_reporting_issue/1.0/Test_reporting_issue.ps1",
        "copyGitFile/2_3_58b4d816_9862_4cae_8120_3952c4ecf8f1/copyFileFromSharedFolder.ps1.cf",
        "copyGitFile/2_3_ef8f2e5c_21a0_42af_8c79_a1512b8d17aa/copyFileFromSharedFolder.ps1.cf" 
      ],
    

Subtasks

Bug #14040: Define default policy extension per agent typeReleasedAlexis MOUSSETActions
Bug #14041: Replace all RudderUniqueID in paths for inputs list and rudder.json, and correctly generate paths based on agent typeReleasedNicolas CHARLESActions

Related issues

Related to Rudder - Architecture #14058: Normalize remplacement of RudderUniqueId in paths/bundle names/templates/inputs listNewActions

Associated revisions

Revision e80dde2c (diff)
Added by Nicolas CHARLES 8 months ago

Fixes #14038: Separated policy generation does not work correctly with Rudder DSC agent

History

#1

Updated by Nicolas CHARLES 8 months ago

  • Description updated (diff)
#2

Updated by Nicolas CHARLES 8 months ago

this is an interesting issue - the .cf is hardcoded; so we could extend AgentType (in ldap-inventory) to add a default extension per agent, but we support several agent per template, so we need to extend AgentType, and change the parsing to add the extension per agenttype - which change the logic in the depth of the parsing, where code is quite old

i still don't understand why the RudderUniqueID is not replaced in the inputlist

#3

Updated by Nicolas CHARLES 8 months ago

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

Updated by Nicolas CHARLES 8 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Alexis MOUSSET
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/1394
#6

Updated by Nicolas CHARLES 8 months ago

  • Related to Architecture #14058: Normalize remplacement of RudderUniqueId in paths/bundle names/templates/inputs list added
#7

Updated by Vincent MEMBRÉ 8 months ago

  • Target version changed from 4.3.8 to 4.3.9
#8

Updated by Nicolas CHARLES 7 months ago

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

Updated by Alexis MOUSSET 7 months ago

  • Status changed from Pending release to Released
This bug has been fixed in Rudder 4.3.9 and 5.0.5 which were released today.
Changelog
Changelog

Also available in: Atom PDF