No such file or directory config-backup/...
Closed this issue · 1 comments
zyzzyxdonta commented
Hi,
I noticed, when trying to change a source configuration in the wizard, the backend replies with internal server error 500. Here is the log of the backend:
[2021-04-08 15:21:44 +0000] [30] [ERROR] Error handling request
Traceback (most recent call last):
File "/home/metricq/venv/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/home/metricq/venv/lib/python3.9/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/home/metricq/venv/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/home/metricq/venv/lib/python3.9/site-packages/aiohttp_session/__init__.py", line 154, in factory
response = await handler(request)
File "/home/metricq/wizard/app/api/views/source.py", line 403, in save_source_raw_config
await configurator.set_config(source_id, request_data)
File "/home/metricq/wizard/app/metricq/configurator.py", line 140, in set_config
with open(
FileNotFoundError: [Errno 2] No such file or directory: 'config-backup/source-py-dummy-fwcnuc050-1617895304.068895'
zyzzyxdonta commented
Hi, thanks for the update. It's not working quite as it should. The directory that is specified as the volume has to be created before the volume command. Otherwise root (or whoever runs docker, I guess) will create it and the permissions won't match.
RUN mkdir /home/metricq/wizard/config-backup/
VOLUME /home/metricq/wizard/config-backup/
The same is true for the volume specified in the metricq-manager
Dockerfile, btw.