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

Add healthcheck to docker in case $USB_PATH goes away #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamesgol
Copy link

It appears that the ozwdaemon doesn't handle the USB device going away. I haven't tested this outside of docker, maybe it handles better with the container layer removed.

I'd be happy if the ozwdaemon exited with an error like it does if the MQTT server goes away but this healthcheck makes it easier to have something restart the container if it goes unhealthy.

Before removing device:

root@9876af95778d:~# ls -l $USB_PATH 
crw-rw---- 1 root 16 166, 0 Jan 29 17:30 /dev/zwave
root@9876af95778d:/opt/ozw# head $USB_PATH
root@9876af95778d:/opt/ozw# 

after removing USB device

root@9876af95778d:~# ls -l $USB_PATH 
crw-rw---- 1 root 16 166, 0 Jan 29 17:30 /dev/zwave
root@9876af95778d:~# head $USB_PATH
head: cannot open '/dev/zwave' for reading: No such device

after re-inserting USB device

root@9876af95778d:~# ls -l $USB_PATH 
crw-rw---- 1 root 16 166, 0 Jan 29 17:30 /dev/zwave
root@9876af95778d:~# head $USB_PATH
head: cannot open '/dev/zwave' for reading: No such device

Related to #198

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