Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[system testing] service_notify_signal fails when the service references env vars #1114

Closed
andrewkroh opened this issue Jan 26, 2023 · 2 comments · Fixed by #1115
Closed
Labels
bug Something isn't working

Comments

@andrewkroh
Copy link
Member

If a system test uses service_notify_signal: SIGHUP and the _dev/deploy/docker/docker-compose.yml file references environment variables like ${SERVICE_LOGS_DIR}, then the signalling can fail. This must be new validation in docker, because this used to work.

My machine is using:

Docker Engine: 20.10.22
Docker Compose: v2.15.1
Docker for Mac: 4.16.1 (95567)

2023/01/25 20:12:21 DEBUG running command: /usr/local/bin/docker-compose -f /Users/akroh/code/elastic/integrations/packages/cef/_dev/deploy/docker/docker-compose.yml -p elastic-package-service kill -s SIGHUP cef-log-udp
WARN[0000] The "SERVICE_LOGS_DIR" variable is not set. Defaulting to a blank string. 
1 error(s) decoding:

* error decoding 'Volumes[1]': invalid spec: :/var/log: empty section between colons
2023/01/25 20:12:21 DEBUG reassigning original policy back to agent...

Error: error running package system tests: could not complete test run: failed to notify test service: could not send "SIGHUP" signal: running Docker Compose kill command failed: exit status 15
@andrewkroh andrewkroh added the bug Something isn't working label Jan 26, 2023
andrewkroh added a commit to andrewkroh/elastic-package that referenced this issue Jan 26, 2023
Pass environment variables when invoking docker-compose to send a
signal to a service.

Fixes elastic#1114
@andrewkroh
Copy link
Member Author

I think that when I last updated Docker for Mac that my settings got lost because compose v2 was re-enabled. I had it disabled.

Screen Shot 2023-01-25 at 20 35 53

@andrewkroh
Copy link
Member Author

In any case, the fix in #1115 corrects the issue.

andrewkroh added a commit that referenced this issue Jan 26, 2023
Pass environment variables when invoking docker-compose to send a
signal to a service.

Fixes #1114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant