Bug #8405
closed
checkGenericFile missing report when given non absolute path
Added by Alexis Mousset over 8 years ago.
Updated over 8 years ago.
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)
- Target version changed from 2.11.22 to 2.11.23
- 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
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'
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'
- Status changed from New to In progress
- 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
- Status changed from Pending technical review to Pending release
- 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