Project

General

Profile

Bug #15174

Rudder directives posthook can not support multilines command execution

Added by Félix DALLIDET 5 months ago. Updated 2 months ago.

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

Description

Posthook can only execute one bash command, but this command should be able to be multiline.
Due to the spacing in the technique file, and how string_template replaces the parameters, the resulting spacing is broken and add unwanted spaces in the posthook when dealing with multiline ones.

We should fix the spacing in all directives using posthooks


Related issues

Related to Rudder - Bug #8933: Multi-line command in post-modification hooks works incorrectlyReleasedActions

Associated revisions

Revision 995a62dd (diff)
Added by Félix DALLIDET 5 months ago

Fixes #15174: Rudder directives posthook can not support multilines command execution

History

#1

Updated by Félix DALLIDET 5 months ago

  • Status changed from New to In progress
  • Assignee set to Félix DALLIDET
#2

Updated by Félix DALLIDET 5 months ago

  • Related to Bug #8933: Multi-line command in post-modification hooks works incorrectly added
#3

Updated by Félix DALLIDET 5 months ago

Below are the techniques that offers POSTHOOK options:

grep -Rl "HOOK" | grep xml                                                                                                                                   ~> 17:02
fileDistribution/checkGenericFileContent/8.0/metadata.xml
fileDistribution/manageKeyValueFile/1.3/metadata.xml
fileDistribution/fileTemplate/1.0/metadata.xml
fileDistribution/copyGitFile/2.3/metadata.xml
applications/repoGpgKeyManagement/1.1/metadata.xml
applications/packageManagement/1.2/metadata.xml
fileConfiguration/fileManagement/4.1/metadata.xml
systemSettings/remoteAccess/sshKeyDistribution/4.0/metadata.xml
systemSettings/process/services/1.1/metadata.xml
systemSettings/userManagement/sudoParameters/3.2/metadata.xml
systemSettings/systemManagement/cronManagement/3.2/metadata.xml
#4

Updated by Félix DALLIDET 5 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/1458
#5

Updated by Félix DALLIDET 5 months ago

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

Updated by Vincent MEMBRÉ 2 months ago

  • Status changed from Pending release to Released

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

Also available in: Atom PDF