User story #4873
closedUser story #4379: Extend command_execution bundle to choose useshell and module
Add bundle command_execution_module() to execute CFEngine modules
Description
The bundle command_execution() needs to be extended in order to execute CFEngine modules.
Files
Updated by Nicolas PERRON over 10 years ago
- % Done changed from 0 to 50
- Pull Request set to https://github.com/Normation/ncf/pull/58
PR URL added: https://github.com/Normation/ncf/pull/58
I've tested it but it does not return any reports. I can't understand why since classes are created.
Updated by Nicolas PERRON over 10 years ago
Nicolas PERRON wrote:
PR URL added: https://github.com/Normation/ncf/pull/58
I've tested it but it does not return any reports. I can't understand why since classes are created.
This is due to the normal ordering which was not respected in the initial command_execution() bundle. But I'm facing another problem which seems to be related to Rudder interpretation of expected reports. See in the screenshot.
The expected reports files are:
Updated by Nicolas PERRON over 10 years ago
The expected reports files contains:
On the server side
techniques/ncf_techniques/test_commands/0.1/expected_reports.csv
# This file contains one line per report expected by Rudder from this technique # Format: technique_name;;class_prefix_${key};;@@RUDDER_ID@@;;component name;;component key test_commands;;command_execution_module_/bin/echo \"Good job\";;@@RUDDER_ID@@;;Command execution;;/bin/echo \"Good job\" test_commands;;command_execution_module_/tmp/module_test;;@@RUDDER_ID@@;;Command execution module;;/tmp/module_test
techniques/ncf_techniques/test_commands/0.1/metadata.xml
<TECHNIQUE name="Test commands"> <DESCRIPTION>Test new command_execution bundles</DESCRIPTION> <BUNDLES> <NAME>test_commands</NAME> </BUNDLES> <SECTIONS> <SECTION component="true" multivalued="true" name="Command execution"> <REPORTKEYS> <VALUE>/bin/echo \"Good job\"</VALUE> </REPORTKEYS> </SECTION> <SECTION component="true" multivalued="true" name="Command execution module"> <REPORTKEYS> <VALUE>/tmp/module_test</VALUE> </REPORTKEYS> </SECTION> </SECTIONS> </TECHNIQUE>
On the node side
/var/rudder/cfengine-community/inputs/rudder_expected_reports.csv.res
# This file contains one line per report expected by Rudder from this technique # Format: technique_name;;class_prefix_${key};;@@RUDDER_ID@@;;component name;;component key test_commands;;command_execution_module__bin_echo__Good_job_;;fc28d3ea-0331-4610-84e4-c9858a561489@@656cf7af-2991-4fb8-abbe-8959baf471c2@@47;;Command execution;;/bin/echo "Good job" test_commands;;command_execution_module__tmp_module_test;;fc28d3ea-0331-4610-84e4-c9858a561489@@656cf7af-2991-4fb8-abbe-8959baf471c2@@47;;Command execution module;;/tmp/module_test
Updated by Nicolas PERRON over 10 years ago
Nicolas PERRON wrote:
The expected reports files contains:
On the server side
techniques/ncf_techniques/test_commands/0.1/expected_reports.csv
[...]
techniques/ncf_techniques/test_commands/0.1/metadata.xml
[...]On the node side
/var/rudder/cfengine-community/inputs/rudder_expected_reports.csv.res
[...]
This is another issue. I've open a new ticket for it: #4880
Updated by Nicolas PERRON over 10 years ago
Nevertheless, another problem is here: Each successful commands return a "repaired status"
Updated by Jonathan CLARKE almost 10 years ago
- Tracker changed from Bug to Enhancement
Updated by Benoît PECCATTE over 9 years ago
- Tracker changed from Enhancement to User story
Updated by Alexis Mousset almost 8 years ago
- Target version changed from 0.x to master
Updated by Benoît PECCATTE over 7 years ago
Sample code https://github.com/Normation/ncf/pull/58
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from master to 4.2.2
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 4.2.2 to 4.2.3
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 4.2.3 to 4.2.4
Updated by Benoît PECCATTE almost 7 years ago
- Target version changed from 4.2.4 to Ideas (not version specific)
Updated by Alexis Mousset about 1 year ago
- Status changed from New to Rejected
- Regression set to No
we won't do this.