-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't working
Description
If canary tries to expose a container port for testing and that port is already in use the container fails to start and canary fails to validate.
Works
# check-port.yaml
apiVersion: container-canary.nvidia.com/v1
kind: Validator
name: check-port
description: Check port
env: []
ports:
- port: 80
protocol: TCP
volumes: []
checks:
- name: http
description: Check port 80
probe:
httpGet:
path: /
port: 80
failureThreshold: 30$ canary validate --file check-port.yaml nginx
Validating nginx against check-port
Check port 80 [passed]
validation passedReproducer
$ docker run -p 80:80 nginx # Start a process that binds to port 80 in another terminal$ canary validate --file /tmp/test.yaml nginx
Validating nginx against check-port
\ Starting container
Error: container failed to start after 10 secondsThe container also doesn't get cleaned up.
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e8d32b8f45aa nginx "/docker-entrypoint.…" 2 minutes ago Created canary-runner-d43137e8kowh-ai
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working