Project

General

Profile

Actions

Architecture #8464

closed

Make environment variables parse easier

Added by Janos Mattyasovszky almost 8 years ago. Updated over 7 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 PECCATTE2016-01-14Actions
Related to Rudder - Bug #7094: Agent processes parts of the environment (multiline bash variables)ReleasedNicolas CHARLESActions
Actions #1

Updated by Janos Mattyasovszky almost 8 years ago

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

Updated by Janos Mattyasovszky almost 8 years ago

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

Updated by Janos Mattyasovszky almost 8 years ago

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

Updated by Jonathan CLARKE almost 8 years ago

  • Assignee changed from Jonathan CLARKE to Benoît PECCATTE
Actions #5

Updated by Benoît PECCATTE almost 8 years ago

  • 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.

Actions #6

Updated by Benoît PECCATTE almost 8 years ago

  • Status changed from Discussion to In progress
Actions #7

Updated by Benoît PECCATTE almost 8 years ago

  • 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
Actions #8

Updated by François ARMAND over 7 years ago

  • 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

Actions #9

Updated by Benoît PECCATTE over 7 years ago

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

Updated by Benoît PECCATTE over 7 years ago

  • Target version changed from 4.0.0~rc2 to 318
Actions #11

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 318 to 4.0.0~rc2
Actions #12

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 4.0.0~rc2 to 4.0.0~rc1
Actions #13

Updated by Alexis Mousset over 7 years ago

  • 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: Atom PDF