Project

General

Profile

Actions

Architecture #8464

closed

Make environment variables parse easier

Architecture #8464: Make environment variables parse easier

Added by Janos Mattyasovszky over 9 years ago. Updated about 9 years ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
Effort required:
Name check:
Fix check:
Regression:

Description

Hi,

Regarding #7772 which was introduced by #7094, would it make sense to replace that env -0 or sed-magic to get the env. keys with something simpler, like this?

awk 'BEGIN { for (k in ENVIRON) { print k }; }'

The question is only, if awk is available on all systems that rudder-agent is supposed to work on (since you have rudder agent run's output piped through a pretty complex awk script, I presume "yes"?)


Related issues 2 (0 open2 closed)

Related to Rudder - Bug #7772: Agent processes parts of the environment (multiline bash variables) on systems without "env --null" supportReleasedBenoît PECCATTEActions
Related to Rudder - Bug #7094: Agent processes parts of the environment (multiline bash variables)ReleasedNicolas CHARLESActions

Updated by Janos Mattyasovszky over 9 years ago Actions #1

  • Related to Bug #7772: Agent processes parts of the environment (multiline bash variables) on systems without "env --null" support added

Updated by Janos Mattyasovszky over 9 years ago Actions #2

  • Related to Bug #7094: Agent processes parts of the environment (multiline bash variables) added

Updated by Janos Mattyasovszky over 9 years ago Actions #3

Apparently awk adds the AWKPATH variable to its environment, possible spoiling it, but all others seem to be included, and nothing else is missing:

# diff <(env -0 | awk -F'=' 'BEGIN { RS = "\0" } ; {print $1}' | sort) <(awk 'BEGIN { for (k in ENVIRON) { print k }; }' | sort)
1a2
> AWKPATH

Updated by Jonathan CLARKE over 9 years ago Actions #4

  • Assignee changed from Jonathan CLARKE to Benoît PECCATTE

Updated by Benoît PECCATTE over 9 years ago Actions #5

  • Tracker changed from Bug to Architecture
  • Category set to System techniques
  • Target version set to 4.0.0~rc2

It could simplify code.
Targeting to 3.3 since it's not a bug, just code simplification.

Updated by Benoît PECCATTE over 9 years ago Actions #6

  • Status changed from Discussion to In progress

Updated by Benoît PECCATTE over 9 years ago Actions #7

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Jonathan CLARKE
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/973

Updated by François ARMAND over 9 years ago Actions #8

  • Assignee changed from Jonathan CLARKE to Alexis Mousset

Alexis, please take a look on that as Jon is not very available in the comming weeks

Updated by Benoît PECCATTE over 9 years ago Actions #9

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Updated by Benoît PECCATTE over 9 years ago Actions #10

  • Target version changed from 4.0.0~rc2 to 318

Updated by Vincent MEMBRÉ over 9 years ago Actions #11

  • Target version changed from 318 to 4.0.0~rc2

Updated by Vincent MEMBRÉ over 9 years ago Actions #12

  • Target version changed from 4.0.0~rc2 to 4.0.0~rc1

Updated by Alexis Mousset about 9 years ago Actions #13

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.0.0 which was released the 10th November 2016.

Actions

Also available in: PDF Atom