Skip to content

Commit

Permalink
Adds SIGPIPE to signals handled by Secretless Juxtaposer
Browse files Browse the repository at this point in the history
This change adds the SIGPIPE signal to the list of signals that
are handled by the Secretless Juxtaposer test. The intent of the
Juxtaposer signal handler is to catch otherwise fatal signals
so that the Juxtaposer container can stay resident and running
even when fatal errors occur so that logs can be examined.

The SIGPIPE signal is being added to the list of signals being
handled because the following fatal error was observed in a
Juxatposer run after the Secretless sidecar container crashed
(because of authen issues with the Conjur follower), causing the
Juxtaposer container to crash:

```
$ kubectl logs -n dane-secretless-xa juxtaposer-pg-687d4675dc-mld84 juxtaposer-pg
2020/02/04 23:18:35 Juxtaposer starting up...
2020/02/04 23:18:35 Using configuration: /etc/juxtaposer-pg/juxtaposer-pg_pg.yml
2020/02/04 23:18:35 Config loaded!
2020/02/04 23:18:35 Registering shutdown signal listener...
2020/02/04 23:18:35 Using test duration of 96h0m0s (overriding any 'rounds' from configfile)
2020/02/04 23:18:35 Driver: postgres
2020/02/04 23:18:35 Recreate connections: true
2020/02/04 23:18:35 Backends: 3
2020/02/04 23:18:35 Threads: 1
2020/02/04 23:18:35 Rounds: infinity
2020/02/04 23:18:35 Duration: 96h
2020/02/04 23:18:35 Setting up backend: pg_secretless_socket
2020/02/04 23:20:52 ERROR sql: Could not execute query!
2020/02/04 23:20:52 read unix @->/sock/.s.PGSQL.5432: read: connection reset by peer
```

Fixes issue #1131
  • Loading branch information
diverdane committed Feb 10, 2020
1 parent d33932a commit cfbd162
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/juxtaposer/util/signal_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ func RegisterShutdownSignalCallback(shutdownChannel chan<- bool) {
syscall.SIGABRT,
syscall.SIGHUP,
syscall.SIGINT,
syscall.SIGUSR1,
syscall.SIGPIPE,
syscall.SIGQUIT,
syscall.SIGTERM,
syscall.SIGUSR1,
)

go func() {
Expand Down

0 comments on commit cfbd162

Please sign in to comment.