Bug #26814
openHundreds of “n/a” when iterator used in a simple package installation technique.
Description
Given the following technique, used to install several packages using an iterator :
id: arch___multiple_packages_present__pacman_ name: Arch - Multiple packages present (pacman) version: '1.0' description: Simple presence of multiple packages, from directive parameter (iterator) category: ncf_techniques params: - id: 9bdcd16f-2f50-4c1d-99f5-2be7b47a7dd1 name: packages_list description: List of packages documentation: List of packages to be present, comma separated constraints: allow_empty: false items: - id: 4002fe00-8e0e-4ae9-95ea-95871bb994ee name: '10 - Package list is : ${packages_list}' method: variable_iterator params: prefix: pacman_pkg_present_iterator name: pkg value: ${packages_list} separator: ' *, *' - id: dd0b7eb4-b4ee-4393-b644-957976abc8da name: 20 - Package ${pacman_pkg_present_iterator.pkg} present method: audit_from_command params: command: pacman -Q ${pacman_pkg_present_iterator.pkg} compliant_codes: '0' - id: 8e94dfba-a3aa-484e-a4fc-bc3322f3ec8b name: 30 - Package ${pacman_pkg_present_iterator.pkg} installation condition: audit_from_command_pacman__Q_${pacman_pkg_present_iterator.pkg}_error method: command_execution params: command: pacman -S --noconfirm ${pacman_pkg_present_iterator.pkg}
The technique works exactlty as expected : the packages are installed when not present, nothing is done when present.
But I was surprised to notice that “rudder agent run” ends displaying « 402 components in enforce mode » (screenshot 1) which is WAY more than the dozen or so I would expect.
Running the agent in "-i" mode again shows hundreds of “n/a” for this technique and a similar one, shows hundreds of n/a for the iterated technique, apparently over the same packages.
This doesn't look right.
Files
Updated by Vincent MEMBRÉ 24 days ago
- Target version changed from 8.3.1 to 8.3.2
Updated by François ARMAND 15 days ago
- Assignee set to Alexis Mousset
- Priority changed from To review to 2
It looks like we are iterating n x n times because of the ${packages_list} both in name
and value
. It looks like a rudderc
change.
It needs to be qualified to see:
- 1/ if there is a workaround with loops,
- 2/ how we can prevent it to happen or be used if we don't want it on the least resistant path for users.