Bug #2467
closed
Technique Group Management fails to report properly
Added by Nicolas CHARLES over 12 years ago.
Updated over 12 years ago.
Description
Setting up a Policy Instance based on Group Management, with the variables :
libvirt / root
kvm / root
leads to invalid reports
Francois Bayart and I have noticed that first, the reports are a proper repaired, but the the PT doesn't return any reports, leading to a no answer !
- Assignee changed from Jonathan CLARKE to Nicolas CHARLES
A brief study of the PT shows that :
- a kept_if_else is used on a command execution, when the command execution can only return repaired or fail
- the /etc/group is edited only if the group doesn't exist, or if a mysterious class group_$(index)_created is defined
The success depend on the file edition to be successful, which never happens
- Status changed from New to In progress
Last point, we should not use canonify with logical expression
- Status changed from In progress to Pending technical review
- % Done changed from 0 to 100
Applied in changeset commit:42f1b85e25c8e6ad3d590f8580ac4b50de7a7930.
It seems OK to me ! Thank you Nicolas
- Status changed from Pending technical review to Discussion
- % Done changed from 100 to 50
I'm not convinced about this fix.
There are two operations in the main bundle here: one adds the group if it doesn't exist (addgroup command) and one populates the group with it's members (/etc/group file edit_line).
However, the change introduced by this commit (42f1b85e) modifies the ifvarclass condition of the files promise. As a result, it no longer edits the file after creating the group. This condition should be, in plain English, "only edit the groups file if the group $(name) is already in it". So why not use "ifvarclass => !group_$(index)_absent|group_$(index)_added"?
Indeed, i was expecting it to converge, but since it's a not, it doesn't make sense....
- Status changed from Discussion to Pending technical review
- % Done changed from 50 to 100
Applied in changeset commit:b93d5a7cac61b65908d3a33dc08f32277973acf3.
- Status changed from Pending technical review to Released
OK, this fix looks good to me, thanks.
Also available in: Atom
PDF