Project

General

Profile

Actions

Bug #7170

closed

Issue while creating/modifying file using ${node.env[ENV]}/file.txt

Added by Kiran V about 9 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
1 (highest)
Assignee:
-
Category:
Web - Config management
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
45
Name check:
Fix check:
Regression:

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 )

Actions #1

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!!)

Actions #2

Updated by Kiran V about 9 years ago

Here in my setup the ENV points to a directory path; say /usr/share

Actions #3

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 3.0.9 to 3.0.10
Actions #4

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 3.0.10 to 3.0.11
Actions #5

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 3.0.11 to 3.0.12
Actions #6

Updated by Vincent MEMBRÉ almost 9 years ago

  • Target version changed from 3.0.12 to 3.0.13
Actions #7

Updated by Vincent MEMBRÉ almost 9 years ago

  • Target version changed from 3.0.13 to 3.0.14
Actions #8

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.0.14 to 3.0.15
Actions #9

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.0.15 to 3.0.16
Actions #10

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.0.16 to 3.0.17
Actions #11

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.0.17 to 302
Actions #12

Updated by Alexis Mousset over 8 years ago

  • Target version changed from 302 to 3.1.12
Actions #13

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.1.12 to 3.1.13
Actions #14

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.13 to 3.1.14
Actions #15

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.14 to 3.1.15
Actions #16

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.15 to 3.1.16
Actions #17

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.16 to 3.1.17
Actions #18

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 3.1.17 to 3.1.18
Actions #19

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 3.1.18 to 3.1.19
Actions #20

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
Actions #21

Updated by Benoît PECCATTE over 7 years ago

  • Priority set to 45
Actions #22

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.19 to 3.1.20
Actions #23

Updated by Jonathan CLARKE over 7 years ago

  • Status changed from Discussion to New
  • Assignee deleted (Kiran V)
Actions #24

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.

Actions

Also available in: Atom PDF