Bug #7170
closedIssue while creating/modifying file using ${node.env[ENV]}/file.txt
Description
Issue Description : Unable to create a file using mention on node.env parameter; the syntax ${node.env[ENV]}/file.txt fails to create the respective file on the destination node; the ENV is well defined and the compliance is 100% success. However the file is not visible on destination node.
The same works when the "rudder agent inventory" command is executed on the destination node.
Rudder Server Version : rudder-server-root-3.1.1.release-1.EL.6.noarch
Rudder Client : rudder-agent-3.1.1.release-1.EL.5
Directive : Enforce a file content (technique version 7.0 )
Updated by Vincent MEMBRÉ about 9 years ago
- Project changed from Rudder tools to Rudder
- Category set to Web - Config management
- Status changed from New to Discussion
- Assignee set to Kiran V
- Target version set to 3.0.9
Thank you Kiran for reporting this!
What would be the value of the environnement variable ? Is it starting with "/" ?
(on another note, don't worry if you put your issue into a wrong project we can it move issues between projects!!)
Updated by Kiran V about 9 years ago
Here in my setup the ENV points to a directory path; say /usr/share
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 3.0.9 to 3.0.10
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 3.0.10 to 3.0.11
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 3.0.11 to 3.0.12
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 3.0.12 to 3.0.13
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 3.0.13 to 3.0.14
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.0.14 to 3.0.15
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.0.15 to 3.0.16
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.0.16 to 3.0.17
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.0.17 to 302
Updated by Alexis Mousset over 8 years ago
- Target version changed from 302 to 3.1.12
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.1.12 to 3.1.13
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.13 to 3.1.14
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.14 to 3.1.15
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.15 to 3.1.16
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.16 to 3.1.17
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.17 to 3.1.18
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.18 to 3.1.19
Updated by Jonathan CLARKE over 7 years ago
- Severity set to Major - prevents use of part of Rudder | no simple workaround
- User visibility set to Getting started - demo | first install | level 1 Techniques
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.19 to 3.1.20
Updated by Jonathan CLARKE over 7 years ago
- Status changed from Discussion to New
- Assignee deleted (
Kiran V)
Updated by Alexis Mousset over 7 years ago
- Status changed from New to Rejected
This is a problem of execution context. When starting rudder with the "rudder agent run/inventory" command, the agent uses the current's shell environment variables, but they may not be not defined in the cf-execd context which start the agent every n minutes). You should make sure the used variables are available to root, and restart "rudder-agent" service when their value is changed (it also happens every night automatically).
During my tests, the oucome was an error when the variables was undefined, I could not reproduce the "compliant" message (are you sure the value was not defined, but with another value ?):
error: Cannot create a relative filename '${node.env[TOTO]}/file.txt' - has no invariant meaning. (creat: No such file or directory) E| error checkGenericFileContent File ${node.env[TOTO]}| The file ${node.env[TOTO]}/file.txt could not be updated
Closing as I could not reproduce the issue, please reopen if the problem still occurs.