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

Unable to save config #97

Closed
lucassant95 opened this issue Oct 3, 2023 · 1 comment
Closed

Unable to save config #97

lucassant95 opened this issue Oct 3, 2023 · 1 comment

Comments

@lucassant95
Copy link

Hey folks! I'm running this image of docker and I'm unable to save the configs. I'm getting this error:

ERROR:root:Unable to write config file during SAVE_CONFIG Traceback (most recent call last): File "/opt/klipper/klippy/configfile.py", line 416, in cmd_SAVE_CONFIG os.rename(cfgname, backup_name) OSError: [Errno 16] Device or resource busy: 'printer_data/config/printer.cfg' -> 'printer_data/config/printer-20231003_204248.cfg'

My compose:

`klipper:
container_name: klipper
image: mkuf/klipper:latest
privileged: true
volumes:
- /dev:/dev
- ./klipper/printer.cfg:/opt/printer_data/config/printer.cfg
- ./klipper/run:/opt/printer_data/run
- ./klipper/gcode:/opt/printer_data/gcodes

moonraker:
container_name: moonraker
image: mkuf/moonraker:latest
ports:
- "7125:7125"
volumes:
- ./klipper/moonraker.conf:/opt/printer_data/config/moonraker.conf
- ./klipper/run:/opt/printer_data/run
- ./klipper/gcode:/opt/printer_data/gcodes

mainsail:
container_name: 'mainsail'
restart: always
image: ghcr.io/mainsail-crew/mainsail
ports:
- '5000:80/tcp'
volumes:
- ./klipper/mainsail/config.json:/usr/share/nginx/html/config.json`

@mkuf
Copy link
Owner

mkuf commented Oct 4, 2023

That's because you're bind-mounting the config file itself, and docker is preventing it from being moved.
If you instead mount the directory containing the file, Klipper can do all file operations within the directory.

@mkuf mkuf closed this as completed Oct 4, 2023
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

No branches or pull requests

2 participants