Bug #16849
closedWhen using twice directive packageManagement 1.2, once to ensure presence of a package, and second one to upgrade the package, reporting and posthook is wrong on the second one
Description
I we use packageManagement 1.2 to ensure sudo is there, and to upgrade it, first call defines
package_present_sudo_kept
package_present_sudo_reached
and second one don't redefines the repair class when upgrading
However, using the class_prefix of package_state_options solves the issue, as we get package_state_options_sudo_1_8_23_4_el7_7_2_default_default_present__repaired
So we ought to define inner class prefix "inner_class_prefix" string => canonify("package_state_options_${package[${index_pkg}]}_${version[${index_pkg}]}_${architecture[${index_pkg}]}_${manager[${index_pkg}]}_${state[${index_pkg}]}_${manager_final_options[${index_pkg}]}"); (truncating it at 1000 char to do like in the generic method), and use it for reporting and posthook
Also, we reporting that the posthook is NA if we don't hae the reached for the posthook, but in case of issues with command (or reporting), we should check if posthook was defined, and yet not run, and report an error
Updated by Nicolas CHARLES almost 5 years ago
- Related to Bug #16850: package_state_options doesn't properly defines outcome classes when called twice with same package name added
Updated by Nicolas CHARLES almost 5 years ago
- Status changed from New to In progress
- Assignee set to Nicolas CHARLES
Updated by Nicolas CHARLES almost 5 years ago
- Assignee changed from Nicolas CHARLES to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/1586
Updated by Nicolas CHARLES over 4 years ago
- Status changed from In progress to Pending release
Applied in changeset rudder-techniques|600a79220bebecf43a90cf9fcc167e5c4967afb9.
Updated by Nicolas CHARLES over 4 years ago
- Fix check changed from To do to Checked
Updated by Alexis Mousset over 4 years ago
- Name check changed from To do to Reviewed
Updated by Vincent MEMBRÉ over 4 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 5.0.17 and 6.0.5 which were released today.