Project

General

Profile

Actions

Bug #26255

open

Reporting on user management technique is broken when multiple users are defined in a directive

Added by Nicolas CHARLES 27 days ago. Updated 19 days ago.

Status:
Pending release
Priority:
1 (highest)
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

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


Subtasks 1 (1 open0 closed)

Bug #26302: Parent ticket did introduce some missing reports when the user is createdPending releaseVincent MEMBRÉActions
Actions #1

Updated by Nicolas CHARLES 24 days ago

  • 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}";

Actions #3

Updated by Alexis Mousset 24 days ago

  • Status changed from New to In progress
Actions #4

Updated by Alexis Mousset 24 days ago

  • Status changed from In progress to Pending technical review
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/1861
Actions #6

Updated by Alexis Mousset 23 days ago

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

Updated by Félix DALLIDET 19 days ago

  • Subtask #26302 added
Actions

Also available in: Atom PDF