Project

General

Profile

Actions

Bug #2557

closed

(ex PT/ Technique) User Management: Checking a User can only return success or warning but no error

Added by Nicolas PERRON over 12 years ago. Updated over 12 years ago.

Status:
Released
Priority:
1 (highest)
Assignee:
Nicolas PERRON
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

Two cases:
Firstly, a user checked to be present on a system:
If it exists, it will return "success"
If it exists not, it will return "warning"

Secondly, a user checked to be not present on a system:
If it exists, it will return "warning"
If it exists not, it will return "success"

With "warning", on Rules screen, the Rule will be on error but if we check technical logs, we will not be able to find any error.

Actions #1

Updated by Jonathan CLARKE over 12 years ago

  • Target version changed from 2.3.8 to 2.3.9
Actions #2

Updated by Nicolas PERRON over 12 years ago

  • Status changed from New to In progress
Actions #3

Updated by Nicolas PERRON over 12 years ago

It seems that a bug in CFEngine (https://cfengine.com/bugtracker/view.php?id=1230) keep us from only checking (without edition) the fullname of an user.

Actions #4

Updated by Nicolas PERRON over 12 years ago

  • % Done changed from 0 to 90

Nicolas PERRON wrote:

It seems that a bug in CFEngine (https://cfengine.com/bugtracker/view.php?id=1230) keep us from only checking (without edition) the fullname of an user.

The fullname should be checked now but since the bug below, it is modified too.

log_warning has been replaced by result_error, then the reports is now OK.

Actions #5

Updated by Nicolas PERRON over 12 years ago

  • Assignee deleted (Nicolas PERRON)

Nicolas PERRON wrote:

Nicolas PERRON wrote:

It seems that a bug in CFEngine (https://cfengine.com/bugtracker/view.php?id=1230) keep us from only checking (without edition) the fullname of an user.

The fullname should be checked now but since the bug below, it is modified too.

log_warning has been replaced by result_error, then the reports is now OK.

Since the bug on CFEngine is still here, this issue can't be completly done. It will not be close for the beta5 or beta6.

Actions #6

Updated by Jonathan CLARKE over 12 years ago

Nicolas PERRON wrote:

Nicolas PERRON wrote:

Nicolas PERRON wrote:

It seems that a bug in CFEngine (https://cfengine.com/bugtracker/view.php?id=1230) keep us from only checking (without edition) the fullname of an user.

The fullname should be checked now but since the bug below, it is modified too.

log_warning has been replaced by result_error, then the reports is now OK.

Since the bug on CFEngine is still here, this issue can't be completly done. It will not be close for the beta5 or beta6.

I just checked this, and it turns out this is not a bug on the "warn_only" feature, but an error in the CFEngine code : the "action =>" attribute should be followed by a body name without quotes. So in your example, change this:

-         action => "warn_only" 
+         action => warn_only
Actions #7

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from In progress to 2
Actions #8

Updated by Nicolas PERRON over 12 years ago

  • Assignee set to Nicolas PERRON

Jonathan CLARKE wrote:

Nicolas PERRON wrote:

Nicolas PERRON wrote:

Nicolas PERRON wrote:

It seems that a bug in CFEngine (https://cfengine.com/bugtracker/view.php?id=1230) keep us from only checking (without edition) the fullname of an user.

The fullname should be checked now but since the bug below, it is modified too.

log_warning has been replaced by result_error, then the reports is now OK.

Since the bug on CFEngine is still here, this issue can't be completly done. It will not be close for the beta5 or beta6.

I just checked this, and it turns out this is not a bug on the "warn_only" feature, but an error in the CFEngine code : the "action =>" attribute should be followed by a body name without quotes. So in your example, change this:

[...]

Ok, then I can finish this issue at the light of your comment :)

Actions #9

Updated by Nicolas PERRON over 12 years ago

  • Status changed from 2 to Pending technical review
  • % Done changed from 90 to 100

Applied in changeset commit:f84a7fc2dbb29d7417ecb70ba7eb3b3af9fe929a.

Actions #10

Updated by Nicolas CHARLES over 12 years ago

  • Status changed from Pending technical review to Released

This looks valid. However, as in ticket #2558 I wonder if it might not have been a bit more cfenginesque to use the bundle edit_line set_colon_field of the stdlib, and define classes in the files: promises part rather than in the bundle edit_line

Actions

Also available in: Atom PDF