Project

General

Profile

Actions

Bug #8405

closed

checkGenericFile missing report when given non absolute path

Added by Alexis Mousset almost 8 years ago. Updated over 7 years ago.

Status:
Released
Priority:
N/A
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

The reporting is missing on the "File" component when entering a non-absolute filename.

The agent prints:

2016-05-27T11:43:37+0200    error: /default/check_generic_file_content/files/'test'[0]: Cannot create a relative filename 'test' - has no invariant meaning. (creat: No such file or directory)

Subtasks 1 (0 open1 closed)

Bug #8659: checkGenericFile missing report when given non absolute path (branch 3.1)ReleasedAlexis Mousset2016-07-08Actions
Actions #1

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 2.11.22 to 2.11.23
Actions #2

Updated by Nicolas CHARLES almost 8 years ago

  • Assignee set to Nicolas CHARLES

Maybe we could check at the end that no classes are defined, and if so report that it didn't do nothing

Actions #3

Updated by Nicolas CHARLES almost 8 years ago

Ha - using check generic file content v6, i get a success report (even if the file is not created)

2016-07-08T10:18:22+0200    error: /default/check_generic_file_content/files/'foo'[2]: Relative file name 'foo' was marked for editing but has no invariant meaning
2016-07-08T10:18:22+0200    error: /default/check_generic_file_content/files/'foo'[2]: File 'foo' was marked for editing but could not be opened
success  checkGenericFileContent   File                      foo                The file foo was already in accordance with the policy

but i have two status for classes, which should generate error result

2016-07-08T10:22:23+0200  verbose: /default/check_generic_file_content/files/'foo'[2]: Defining promise result class 'file_edition_global_files_status_8_kept'
2016-07-08T10:22:23+0200  verbose: /default/check_generic_file_content/files/'foo'[2]: Defining promise result class 'file_edition_global_files_status_8_failed'

Actions #4

Updated by Nicolas CHARLES almost 8 years ago

Some more detail on how to reproduce:
Permission adjustement is missing if we set the permission ajustment for a file with bad path
File component is missing if we set "Enforce the content of the file"

In this case, only the failed class is defined, and never used (?)

2016-07-08T10:37:22+0200  verbose: /default/check_generic_file_content/files/'foo-bar'[2]: Defining promise result class 'file_edition_global_files_status_8_failed'

Actions #5

Updated by Nicolas CHARLES almost 8 years ago

  • Status changed from New to In progress
Actions #6

Updated by Nicolas CHARLES almost 8 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/986
Actions #7

Updated by Nicolas CHARLES almost 8 years ago

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

Updated by Alexis Mousset over 7 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.23, 3.1.12 and 3.2.5 which were released today.

Actions

Also available in: Atom PDF