Project

General

Profile

Actions

Bug #4410

closed

There is no report with the use of command_execution_module

Added by Nicolas PERRON over 8 years ago. Updated 4 months ago.

Status:
Rejected
Priority:
1
Assignee:
-
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Regression:

Description

I've used command_execution_module.cf which is a simple wrap of command_execution.cf with options to execute a command as a module.

No reports come from command_execution_module.cf whereas reports came from command_execution.cf.

Here is the rudder_expected_reports.csv file from a MetaTechnique upgrading Zypper:

# 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
upgrade_zypper;;command_execution_${g.rudder_tools}/check_zypper_version;;5e2f779e-a2a2-4434-b9a4-bdc9ec9e040f@@ec184a4b-e16f-4b77-988d-19054f94f544@@4;;Command execution module;;${g.rudder_tools}/check_zypper_version
upgrade_zypper;;command_execution_${g.rudder_tools}/check_zypper_version;;5e2f779e-a2a2-4434-b9a4-bdc9ec9e040f@@ec184a4b-e16f-4b77-988d-19054f94f544@@4;;Command execution module;;${g.rudder_tools}/check_zypper_version
upgrade_zypper;;command_execution_${zypper_knowledge.command_add_repository};;5e2f779e-a2a2-4434-b9a4-bdc9ec9e040f@@ec184a4b-e16f-4b77-988d-19054f94f544@@4;;Command execution;;${zypper_knowledge.command_add_repository}
upgrade_zypper;;command_execution_${zypper_knowledge.command_subscribe_repository};;5e2f779e-a2a2-4434-b9a4-bdc9ec9e040f@@ec184a4b-e16f-4b77-988d-19054f94f544@@4;;Command execution;;${zypper_knowledge.command_subscribe_repository}
upgrade_zypper;;command_execution_${zypper_knowledge.command_refresh};;5e2f779e-a2a2-4434-b9a4-bdc9ec9e040f@@ec184a4b-e16f-4b77-988d-19054f94f544@@4;;Command execution;;${zypper_knowledge.command_refresh}
upgrade_zypper;;command_execution_${zypper_knowledge.command_upgrade_zypper};;5e2f779e-a2a2-4434-b9a4-bdc9ec9e040f@@ec184a4b-e16f-4b77-988d-19054f94f544@@4;;Command execution;;${zypper_knowledge.command_upgrade_zypper}
upgrade_zypper;;package_remove_rug;;5e2f779e-a2a2-4434-b9a4-bdc9ec9e040f@@ec184a4b-e16f-4b77-988d-19054f94f544@@4;;Package remove;;rug

Then Rudder expect to have a report of "Command execution module" Component but never have anyone which lead to a "No Answer" state:

rudder=> SELECT * FROM expectedreports WHERE ruleid='5e2f779e-a2a2-4434-b9a4-bdc9ec9e040f' ORDER BY pkid DESC;
 pkid | nodejoinkey |                ruleid                | serial |             directiveid              |        component         | cardinality |                                                                                   componentsvalues                                                                                   |                                                                              unexpandedcomponentsvalues                                                                              |         begindate          |          enddate           
------+-------------+--------------------------------------+--------+--------------------------------------+--------------------------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------+----------------------------
 2116 |         338 | 5e2f779e-a2a2-4434-b9a4-bdc9ec9e040f |      4 | ec184a4b-e16f-4b77-988d-19054f94f544 | Command execution module |           1 | ["${g.rudder_tools}/check_zypper_version"]                                                                                                                                           | ["${g.rudder_tools}/check_zypper_version"]                                                                                                                                           | 2014-01-28 05:28:55.59-08  | 
 2115 |         338 | 5e2f779e-a2a2-4434-b9a4-bdc9ec9e040f |      4 | ec184a4b-e16f-4b77-988d-19054f94f544 | Command execution        |           4 | ["${zypper_knowledge.command_add_repository}","${zypper_knowledge.command_subscribe_repository}","${zypper_knowledge.command_refresh}","${zypper_knowledge.command_upgrade_zypper}"] | ["${zypper_knowledge.command_add_repository}","${zypper_knowledge.command_subscribe_repository}","${zypper_knowledge.command_refresh}","${zypper_knowledge.command_upgrade_zypper}"] | 2014-01-28 05:28:55.59-08  |
[...]


Files

command_execution_module.cf (1.28 KB) command_execution_module.cf Nicolas PERRON, 2014-01-28 18:24
command_execution.cf (1.82 KB) command_execution.cf Nicolas PERRON, 2014-01-28 18:24
Actions #1

Updated by Nicolas CHARLES over 8 years ago

I don't have specific answer for this one, but I checked if classes were defined by module, and they are
I get the outcome repaired and ok when module file exists, failed and not_ok if the module doesn't exist

I really think we should not be returning repaired when module is executed though

Actions #2

Updated by Benoît PECCATTE almost 7 years ago

  • Status changed from New to Rejected

There is no command_execution_module in ncf

Actions #3

Updated by Alexis Mousset 4 months ago

  • Target version changed from 0.x to ncf-0.x
  • Priority set to 0
Actions #4

Updated by Alexis Mousset 4 months ago

  • Project changed from 41 to Rudder
  • Category set to Generic methods
Actions

Also available in: Atom PDF