Skip to content

fix: attempting to interrupt program in api-db/keycloak-db kills bash - #4171

Open
rocketeerbkw wants to merge 1 commit into
mainfrom
fix-dx-db-pod-exit
Open

rocketeerbkw wants to merge 1 commit into
mainfrom
fix-dx-db-pod-exit

Conversation

@rocketeerbkw

Copy link
Copy Markdown
Member

General Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

Database Migrations

n/a

Description

When bash is configured with errexit, it kills the session even when you are trying to quit a program which is very annoying.

  1. Run make api-development
  2. Start a bash session dco -p lagoon exec api-db bash
  3. Run a command, eg less /etc/mysql/my.cnf
  4. Press ctrl + c
  5. The bash session is killed, not just less

This happens because the set -eo pipefail in an entrypoint is sourced in .bashrc which sets errexit for the entire session.

Other entrypoints can set -e but they are executed instead of sourced, so they don't pollute the bash session.

Closing issues

n/a

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant