haveachin/infrared

Failed to start service while the config path contains a directory that is behind symlinks link

Closed this issue · 0 comments

Describe the bug
Failed to start service while the config path contains a directory that is behind symlinks link.

ls -al the INFRARED_CONFIG_PATH

total 12
drwxrwxrwx    3 root     root          4096 Jun 10 15:46 .
drwxr-xr-x    1 root     root          4096 Jun 10 15:46 ..
drwxr-xr-x    2 root     root          4096 Jun 10 15:46 ..2022_06_10_15_46_07.4174519781
lrwxrwxrwx    1 root     root            32 Jun 10 15:46 ..data -> ..2022_06_10_15_46_07.4174519781
lrwxrwxrwx    1 root     root            17 Jun 10 15:46 config.json -> ..data/config.json

got the error message

2022/06/10 15:41:42 Failed loading proxy configs from /configs; error: read /configs/..data: is a directory

To Reproduce
Put a symbolic link that linked to a directory in the INFRARED_CONFIG_PATH

Expected behavior
Service can ignore the directories and start successfully.

Additional context (Optional)
In my case, I tried to run infrared on a Kubernetes, and mount a configMap into the infrared container.

But it was not successful. 🥲
I tried to add some checks on other PR to avoid the service unexpected end.