Skip to content

envconsul [options] <command>, command runs in a subshell #317

@simonellefsen

Description

@simonellefsen

Envconsul version

0.13.0 and 0.13.1

Command

./envconsul_0.12.1 -log-level=trace -kill-signal=SIGINT -exec-kill-signal=SIGINT -exec-kill-timeout=10s -upcase -secret _vault/aws/sts/internal-envconsul-example/ python3 -u ./program.py

./envconsul_0.13.0 -log-level=trace -kill-signal=SIGINT -exec-kill-signal=SIGINT -exec-kill-timeout=10s -upcase -secret _vault/aws/sts/internal-envconsul-example/ python3 -u ./program.py

./envconsul_0.13.1 -log-level=trace -kill-signal=SIGINT -exec-kill-signal=SIGINT -exec-kill-timeout=10s -upcase -secret _vault/aws/sts/internal-envconsul-example/ python3 -u ./program.py

Debug output

2934949 pts/12   Ss     0:00 -bash
2946182 pts/12   Sl+    0:00  \_ ./envconsul_0.12.1 -log-level=trace -kill-signal=SIGINT -exec-kill-signal=SIGINT -exec-kill-timeout=10s -upcase -secret _vault/aws/sts/internal-envconsul-example/ python3 -u ./program.py
2946191 pts/12   S      0:00      \_ python3 -u ./program.py

2948619 pts/17   Ss     0:00 -bash
2949574 pts/17   Sl+    0:00  \_ ./envconsul_0.13.0 -log-level=trace -kill-signal=SIGINT -exec-kill-signal=SIGINT -exec-kill-timeout=10s -upcase -secret _vault/aws/sts/internal-envconsul-example/ python3 -u ./program.py
2949588 pts/17   S      0:00      \_ sh -c python3 -u ./program.py
2949589 pts/17   S      0:00          \_ python3 -u ./program.py

2946451 pts/16   Ss     0:00 -bash
2948386 pts/16   Sl+    0:00  \_ ./envconsul_0.13.1 -log-level=trace -kill-signal=SIGINT -exec-kill-signal=SIGINT -exec-kill-timeout=10s -upcase -secret _vault/aws/sts/internal-envconsul-example/ python3 -u ./program.py
2948402 pts/16   S      0:00      \_ sh -c python3 -u ./program.py
2948403 pts/16   S      0:00          \_ python3 -u ./program.py

Expected behavior

Expected 0.13.0 and 0.13.1 to behave like version 0.12.1

Actual behavior

Versions 0.13.0 and 0.13.1 launch the python application in a subshell which can cause problem for signal handling and stopping the application to refresh credentials. If for some reason the application ignores the stop signal then envconsul will see the subshell stop but the application will still be running and envconsul will start a new instance of your application and you end up with an old application with old credentials and a new application with new fresh credentials.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions