-
Notifications
You must be signed in to change notification settings - Fork 457
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
Bind mounting MFEs fails on dev #711
Comments
I'm currently working on a fix to this issue. In the meantime, it seems to me that Compose v2 is not affected by this issue. On my machine, I use
Of course this would only be a temporary fix. Cc @dagg who might be interested in this. |
The -m/--mount option makes it possible to bind-mount volumes at runtime. The volumes are declared in a local/docker-compose.tmp.yml file. The problem with this approach is when we want to bind-mount a volume to a service which is specific to the dev context. For instance: the "learning" service when the MFE plugin is enabled. In such a case, starting the service triggers a call to `docker-compose stop` in the local context. This call fails because the "learning" service does not exist in the local context. Note that this issue only seems to occur with docker-compose v1. To resolve this issue, we create two additional filters for the dev context, which emulate the behaviour of the local context. With this approach, we convert the -m/--mount arguments right after they are parsed. Because they are parsed just once, we can get rid of the de-duplication logic initially introduced with the COMPOSE_CLI_MOUNTS context. Close #711. Close also overhangio/tutor-mfe#57.
The -m/--mount option makes it possible to bind-mount volumes at runtime. The volumes are declared in a local/docker-compose.tmp.yml file. The problem with this approach is when we want to bind-mount a volume to a service which is specific to the dev context. For instance: the "learning" service when the MFE plugin is enabled. In such a case, starting the service triggers a call to `docker-compose stop` in the local context. This call fails because the "learning" service does not exist in the local context. Note that this issue only seems to occur with docker-compose v1. To resolve this issue, we create two additional filters for the dev context, which emulate the behaviour of the local context. With this approach, we convert the -m/--mount arguments right after they are parsed. Because they are parsed just once, we can get rid of the de-duplication logic initially introduced with the COMPOSE_CLI_MOUNTS context. Close #711. Close also overhangio/tutor-mfe#57.
The -m/--mount option makes it possible to bind-mount volumes at runtime. The volumes are declared in a local/docker-compose.tmp.yml file. The problem with this approach is when we want to bind-mount a volume to a service which is specific to the dev context. For instance: the "learning" service when the MFE plugin is enabled. In such a case, starting the service triggers a call to `docker-compose stop` in the local context. This call fails because the "learning" service does not exist in the local context. Note that this issue only seems to occur with docker-compose v1. To resolve this issue, we create two additional filters for the dev context, which emulate the behaviour of the local context. With this approach, we convert the -m/--mount arguments right after they are parsed. Because they are parsed just once, we can get rid of the de-duplication logic initially introduced with the COMPOSE_CLI_MOUNTS context. Close #711. Close also overhangio/tutor-mfe#57.
The -m/--mount option makes it possible to bind-mount volumes at runtime. The volumes are declared in a local/docker-compose.tmp.yml file. The problem with this approach is when we want to bind-mount a volume to a service which is specific to the dev context. For instance: the "learning" service when the MFE plugin is enabled. In such a case, starting the service triggers a call to `docker-compose stop` in the local context. This call fails because the "learning" service does not exist in the local context. Note that this issue only seems to occur with docker-compose v1. To resolve this issue, we create two additional filters for the dev context, which emulate the behaviour of the local context. With this approach, we convert the -m/--mount arguments right after they are parsed. Because they are parsed just once, we can get rid of the de-duplication logic initially introduced with the COMPOSE_CLI_MOUNTS context. Close #711. Close also overhangio/tutor-mfe#57.
The -m/--mount option makes it possible to bind-mount volumes at runtime. The volumes are declared in a local/docker-compose.tmp.yml file. The problem with this approach is when we want to bind-mount a volume to a service which is specific to the dev context. For instance: the "learning" service when the MFE plugin is enabled. In such a case, starting the service triggers a call to `docker-compose stop` in the local context. This call fails because the "learning" service does not exist in the local context. Note that this issue only seems to occur with docker-compose v1. To resolve this issue, we create two additional filters for the dev context, which emulate the behaviour of the local context. With this approach, we convert the -m/--mount arguments right after they are parsed. Because they are parsed just once, we can get rid of the de-duplication logic initially introduced with the COMPOSE_CLI_MOUNTS context. Close #711. Close also overhangio/tutor-mfe#57.
The -m/--mount option makes it possible to bind-mount volumes at runtime. The volumes are declared in a local/docker-compose.tmp.yml file. The problem with this approach is when we want to bind-mount a volume to a service which is specific to the dev context. For instance: the "learning" service when the MFE plugin is enabled. In such a case, starting the service triggers a call to `docker-compose stop` in the local context. This call fails because the "learning" service does not exist in the local context. Note that this issue only seems to occur with docker-compose v1. To resolve this issue, we create two additional filters for the dev context, which emulate the behaviour of the local context. With this approach, we convert the -m/--mount arguments right after they are parsed. Because they are parsed just once, we can get rid of the de-duplication logic initially introduced with the COMPOSE_CLI_MOUNTS context. Close #711. Close also overhangio/tutor-mfe#57.
The -m/--mount option makes it possible to bind-mount volumes at runtime. The volumes are declared in a local/docker-compose.tmp.yml file. The problem with this approach is when we want to bind-mount a volume to a service which is specific to the dev context. For instance: the "learning" service when the MFE plugin is enabled. In such a case, starting the service triggers a call to `docker-compose stop` in the local context. This call fails because the "learning" service does not exist in the local context. Note that this issue only seems to occur with docker-compose v1. To resolve this issue, we create two additional filters for the dev context, which emulate the behaviour of the local context. With this approach, we convert the -m/--mount arguments right after they are parsed. Because they are parsed just once, we can get rid of the de-duplication logic initially introduced with the COMPOSE_CLI_MOUNTS context. Close #711. Close also overhangio/tutor-mfe#57.
The -m/--mount option makes it possible to bind-mount volumes at runtime. The volumes are declared in a local/docker-compose.tmp.yml file. The problem with this approach is when we want to bind-mount a volume to a service which is specific to the dev context. For instance: the "learning" service when the MFE plugin is enabled. In such a case, starting the service triggers a call to `docker-compose stop` in the local context. This call fails because the "learning" service does not exist in the local context. Note that this issue only seems to occur with docker-compose v1. To resolve this issue, we create two additional filters for the dev context, which emulate the behaviour of the local context. With this approach, we convert the -m/--mount arguments right after they are parsed. Because they are parsed just once, we can get rid of the de-duplication logic initially introduced with the COMPOSE_CLI_MOUNTS context. Close overhangio#711. Close also overhangio/tutor-mfe#57.
The -m/--mount option makes it possible to bind-mount volumes at runtime. The volumes are declared in a local/docker-compose.tmp.yml file. The problem with this approach is when we want to bind-mount a volume to a service which is specific to the dev context. For instance: the "learning" service when the MFE plugin is enabled. In such a case, starting the service triggers a call to `docker-compose stop` in the local context. This call fails because the "learning" service does not exist in the local context. Note that this issue only seems to occur with docker-compose v1. To resolve this issue, we create two additional filters for the dev context, which emulate the behaviour of the local context. With this approach, we convert the -m/--mount arguments right after they are parsed. Because they are parsed just once, we can get rid of the de-duplication logic initially introduced with the COMPOSE_CLI_MOUNTS context. Close overhangio#711. Close also overhangio/tutor-mfe#57.
This bug has been reported on tutor-mfe but I believe it concerns tutor not tutor-mfe.
Bug description
Running
tutor dev start --mount=<MFE_PATH> <MFE_NAME>
results in docker-compose error. Please find the output for the command regarding theprofile
MFE from the tutor-mfe readme in the How to reproduce section below.I've tried the command using both syntaxes of
--mount
, running the commands in thefrontend-app-profile
directory:tutor dev start --mount=profile:.:/openedx/app
and
tutor dev start --mount=. profile
How to reproduce
command:
tutor dev start --mount=. profile
output:
mfe plugin is installed and enabled.
Environment
Ubuntu 20.04
Tutor version: 13.3.1
tutor-mfe version: 13.0.6
Additional context
The problem seems to be that running
tutor dev start
triggers_stop_on_dev_start
(code) which in turns callsself.__update_docker_compose_tmp()
(code) on the runner which populates/env/local/docker-compose.tmp.yml
with the volume configuration:But since the profile mfe service is not defined in the
/env/local/docker-compose.prod.yml
docker-compose sees the service definition as insufficient.I've gone through this PR by @kdmccormick which seems closely related.
I'm thinking a solution would be that services must only be added to
docker-compose.tmp.yml
files if such service exists in non temp files.The text was updated successfully, but these errors were encountered: