Bug #26255
closed
Reporting on user management technique is broken when multiple users are defined in a directive
Added by Nicolas CHARLES about 2 months ago.
Updated 28 days ago.
Description
if we try to manage 2 users in a same directive, the reporting is broken, because of this code
"any" usebundle => _method_reporting_context("Users", "${usergroup_user_login[${usergroup_user_index}]}");
"${usergroup_user_login[${usergroup_user_index}]}"
usebundle => user_absent("${usergroup_user_login[${usergroup_user_index}]}"),
if => "usermanagement_user_remove_${usergroup_user_index}";
method_reporting_context iterate over all user, and get the last value
then the generic method reports with the last entry defined
happens with technique v9.1 and V10
Related issues
1 (1 open — 0 closed)
- Assignee set to Alexis Mousset
- Priority changed from To review to 1 (highest)
The only approach would be to wrap the call, like what we do with the technique editor
psudo code would be
methods:
"remove_that_user" usebundle => bundle agent user_absent_&UUID&("${usergroup_user_index}")
(snip)
bundle agent user_absent_&UUID&(usergroup_user_index)
"any" usebundle => _method_reporting_context("Users", "${usermanagement_&uuid&.usergroup_user_login[${usergroup_user_index}]}");
"${usergroup_user_login[${usergroup_user_index}]}"
usebundle => user_absent("${usermanagement_&uuid&.usergroup_user_login[${usergroup_user_index}]}"),
if => "usermanagement_user_remove_${usergroup_user_index}";
- Status changed from New to In progress
- Status changed from In progress to Pending technical review
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/1861
- Status changed from Pending technical review to Pending release
- Status changed from Pending release to Released
This bug has been fixed in Rudder 8.1.12 and 8.2.5 which were released today.
- Related to Bug #26510: Broken reporting when using userManagement technique with multiple usesr and secondary group added
Also available in: Atom
PDF