-
Notifications
You must be signed in to change notification settings - Fork 456
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
Error: lms is mounted on / but it is not a shared mount
#522
Comments
Thanks @iamCristYe. It solved this problem but now I have a new problem. I'll open a separate issue for it |
@regisb I believe this is indeed an issue and worth fixing. |
If it's what I came across, I think this is the underlying problem docker/compose#8558. So removing the trailing '/' in docker-compose files should fix it. Edit: as @iamCristYe linked! (just went to the StackOverflow posts) |
lms is mounted on / but it is not a shared mount
Is someone able to reproduce this bug, using docker-compose v2 on Windows (WSL2)? I successfully managed to run @mrvaghani What is your docker-compose version? Let's try to reproduce this. In the meantime, I'm re-opening the issue. |
Docker Compose version v2.0.0 |
weird..... I thought I can reproduce this issue but
|
fine with docker-compose v2 also
|
tried
|
I'm using wsl2:
Maybe instead of installing docker desktop, I installed docker directly inside my wsl Ubuntu, though I don't think that would make a difference. So I really have no clue why I can't reproduce this. |
@mrvaghani Can you attempt to upgrade to the latest version of docker-compose v2? I believe it should be v2.1.1. Do you reproduce the issue with this later version? |
I was able to reproduce it with docker-compose 2.0.0.
(Don't mind the name, I'm running Ubuntu 20.04) I was also able to make it work by removing the trailing slashes. Happy to open a PR for it. |
This is way over my head, I understand nothing about WSL. Please save us and open the PR @BbrSofiane! |
Maybe Stackoverflow helping here? https://stackoverflow.com/questions/68273745/how-to-make-a-mount-shared-in-docker I think to remember had same kind of problem on a Linux machine with an old (1.8.2) docker version, didn't like a slash somewhere in the path. |
Some additional information that might be relevant: Environment: How to reproduce: Download the binary sudo curl -L "https://github.com/overhangio/tutor/releases/download/v12.1.6/tutor-$(uname -s)_$(uname -m)" -o /usr/local/bin/tutor
sudo chmod 0755 /usr/local/bin/tutor Make root directory for tutor and set it as root mkdir ~/tutor
export TUTOR_ROOT=~/tutor Start the program and answer the questions. This results in an error ❯ tutor local quickstart
==================================================
Interactive platform configuration
==================================================
Are you configuring a production platform? Type 'n' if you are just testing Tutor on your local computer [Y/n] n
As you are not running this platform in production, we automatically set the following configuration values:
LMS_HOST = local.overhang.io
CMS_HOST = studio.local.overhang.io
ENABLE_HTTPS = False
Your platform name/title [My Open edX]
Your public contact email address [contact@local.overhang.io]
The default language code for the platform [en]
Configuration saved to /home/test/tutor/config.yml
Environment generated in /home/test/tutor/env
==============================================
Stopping any existing platform
==============================================
docker-compose -f /home/test/tutor/env/local/docker-compose.yml -f /home/test/tutor/env/local/docker-compose.prod.yml --project-name tutor_local stop
======================================================
Starting the platform in detached mode
======================================================
docker-compose -f /home/test/tutor/env/local/docker-compose.yml -f /home/test/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build -d
[+] Running 8/8
⠿ Network tutor_local_default Created 0.0s
⠿ Container tutor_local-smtp-1 Created 0.2s
⠿ Container tutor_local-mysql-1 Created 0.2s
⠿ Container tutor_local-elasticsearch-1 Created 0.2s
⠿ Container tutor_local-caddy-1 Created 0.2s
⠿ Container tutor_local-mongodb-1 Created 0.1s
⠿ Container tutor_local-redis-1 Created 0.1s
⠿ Container tutor_local-forum-1 Created 0.1s
⠋ Container tutor_local-lms-1 Creating 0.0s
Error response from daemon: path /home/test/tutor/env/apps/openedx/settings/lms is mounted on / but it is not a shared mount.
Error: Command failed with status 1: docker-compose -f /home/test/tutor/env/local/docker-compose.yml -f /home/test/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build -d
As we can see, it's having issues when it reaches the creation of container lms:
image: docker.io/overhangio/openedx:12.1.6
environment:
SERVICE_VARIANT: lms
UWSGI_WORKERS: 2
SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production}
restart: unless-stopped
volumes:
- ../apps/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/:ro # Remove these trailing / at the end
- ../apps/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/:ro # Remove these trailing / at the end
- ../apps/openedx/config/:/openedx/config/:ro # Remove these trailing / at the end
- ../../data/lms:/openedx/data
- ../../data/openedx-media:/openedx/media
depends_on:
- mysql
- elasticsearch
- forum
- mongodb
- redis
- smtp Do the same thing as above for these services inside the compose file:
This should fix the issue. But when I To avoid it bring overwritten, I ran ❯ tutor local start
docker-compose -f /home/test/tutor/env/local/docker-compose.yml -f /home/test/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build
[+] Running 4/3
⠿ Container tutor_local-lms-1 Created 1.0s
⠿ Container tutor_local-lms-worker-1 Created 0.1s
⠿ Container tutor_local-cms-1 Created 0.1s
⠋ Container tutor_local-nginx-1 Creating 0.1s
⠿ Container tutor_local-cms-worker-1 Created 0.1s
Error response from daemon: path /home/test/tutor/env/apps/nginx is mounted on / but it is not a shared mount.
Error: Command failed with status 1: docker-compose -f /home/test/tutor/env/local/docker-compose.yml -f /home/test/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build This was caused by After removing the trailing |
Maybe someone can test this by changing Line88 and other similar lines in docker-compose.yml and docker-compose.prod.yml template files to validate these assumptions? |
@mrvaghani I've already tried a couple of days ago to remove all trailing slashes and it ended up working. I'll ping you once I create the PR so you can test it and let me know if it works for you. |
I think the reason I cannot reproduce this issue is I'm not using Docker Desktop, instead, I installed docker in wsl directly. @BbrSofiane have you already started the PR? If not I can help also, as it's just removing a slash. |
I've just created #524. @mrvaghani can you try it and let me know if it works for you? |
Sure. How should I go about testing the new changes? Do I need to create a new binary? Or is there a way to tell the binary to use a specific git repo branch to pull source code? |
Ah, I think you will need to install tutor from source and checkout the branch I created for the PR. |
Verified. This works and solved my other problem of not initializing the database properly. |
Bug description
When doing a fresh install using
tutor local quickstart
, it downloads all the images but fails during docker-compose file.How to reproduce
Environment
Windows 10 20H2
WSL2 - Ubuntu 20.04 LTS
tutor, version 12.1.6
Additional context
The text was updated successfully, but these errors were encountered: