Project

General

Profile

Bug #8405

checkGenericFile missing report when given non absolute path

Added by Alexis MOUSSET about 4 years ago. Updated almost 4 years ago.

Status:
Released
Priority:
N/A
Category:
Techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:

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

Bug #8659: checkGenericFile missing report when given non absolute path (branch 3.1)Released2016-07-08Alexis MOUSSETActions
#1

Updated by Vincent MEMBRÉ about 4 years ago

  • Target version changed from 2.11.22 to 2.11.23
#2

Updated by Nicolas CHARLES almost 4 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

#3

Updated by Nicolas CHARLES almost 4 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'

#4

Updated by Nicolas CHARLES almost 4 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'

#5

Updated by Nicolas CHARLES almost 4 years ago

  • Status changed from New to In progress
#6

Updated by Nicolas CHARLES almost 4 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
#7

Updated by Nicolas CHARLES almost 4 years ago

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

Updated by Alexis MOUSSET almost 4 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.

Also available in: Atom PDF