edgexfoundry / edgex-compose

EdgeX Foundry Docker Compose release compose files and tools for building EdgeX compose files
Apache License 2.0
82 stars 119 forks source link

Secure mode delayed start does not respect custom service entrypoint script #377

Closed ajcasagrande closed 1 year ago

ajcasagrande commented 1 year ago

🐞 Bug Report

Affected Services [REQUIRED]

The issue is located in: device-usb-camera ### Is this a regression? Yes, the previous version in which this bug was not present was: .... ### Description and Minimal Reproduction [**REQUIRED**] The Dockerfile for `device-usb-camera` points to a unique entrypoint script that runs both the rtsp-simple-server and the device service. https://github.com/edgexfoundry/device-usb-camera/blob/main/docker-entrypoint.sh https://github.com/edgexfoundry/device-usb-camera/blob/7a1cf3250193716800d70f0cf90cebef309e38f0/Dockerfile#L68-L69 ```dockerfile ENTRYPOINT ["/docker-entrypoint.sh"] CMD [ "--configProvider=consul.http://edgex-core-consul:8500", "--registry" ] ``` Reproduce: - Latest `edgex-compose` - `make pull ds-usb-camera` - `make run ds-usb-camera` - `docker exec -it $(docker ps -qaf name=usb-camera) sh` - `ps aux` - `exit` Compare that with working: - `make clean` - `make run no-secty ds-usb-camera` - `docker exec -it $(docker ps -qaf name=usb-camera) sh` - `ps aux` - `exit` ## πŸ”₯ Exception or Error **Secure Mode - Not working** ``` / # ps aux PID USER TIME COMMAND 1 root 0:00 {ready_to_run_wa} /usr/bin/dumb-init /bin/sh /edgex-init/ready_to_run_wait_install.sh /device-usb-camera -cp=consul.http://edgex-core-consul:8500 --registry 7 root 0:00 /device-usb-camera -cp=consul.http://edgex-core-consul:8500 --registry 53 root 0:00 sh 59 root 0:00 ps aux ``` **Non-Secure Mode - Working** ``` / # ps aux PID USER TIME COMMAND 1 root 0:00 {docker-entrypoi} /usr/bin/dumb-init /bin/sh /docker-entrypoint.sh --configProvider=consul.http://edgex-core-consul:8500 --registry 7 root 0:00 /bin/sh /docker-entrypoint.sh --configProvider=consul.http://edgex-core-consul:8500 --registry 8 root 0:00 /rtsp-simple-server 9 root 0:00 /device-usb-camera --configProvider=consul.http://edgex-core-consul:8500 --registry 34 root 0:00 sh 52 root 0:00 /usr/bin/ffprobe -i /dev/video0 -print_format json -show_format -show_streams -show_error 53 root 0:00 ps aux ``` ## 🌍 Your Environment **Deployment Environment:** **EdgeX Version [**REQUIRED**]:** **Anything else relevant?**
ajcasagrande commented 1 year ago

@bnevis-i @jim-wang-intel

ajcasagrande commented 1 year ago

This might actually be a bug/limitation in edgex-compose

bnevis-i commented 1 year ago

Most assuredly. Tranferred to edgex-compose. Yes, the default scripts try to launch the executable not docker-entrypoint.sh when it addes the wait_For script.

jim-wang-intel commented 1 year ago

Most assuredly. Tranferred to edgex-compose. Yes, the default scripts try to launch the executable not docker-entrypoint.sh when it addes the wait_For script.

executable in this case should adapt to docker-entrypoint.sh then