-
Notifications
You must be signed in to change notification settings - Fork 254
Unable to use existing EFS filesystem #1739
Comments
As a workaround, I let docker compose create the EFS volume. After that it seemed to mount correctly. There seems to be some issue using an EFS volume I create manually through the console. |
After I made some changes to the docker-compose.yml file, I am now seeing this message again. My only option seems to be to remove the filesystems and allow them to be created again. So it seems like this is a bug. |
Yeah, bump - I'm seeing this issue as well. What is happening is that when you have an external EFS, the docker compose generated CloudFormation YAML expects to create the AWS::EFS::MountTarget entries. e.g.:
Results in doing this:
So if you attempt to use the same FileSystemId as an external volume more than once, and the mount target already exists (either because it was created by a different stack or someone created it manually e.g. during EFS volume creation), then the stack will fail because AWS will not allow a mount target with the same pair of FileSystemId and SubnetId. What we need here is that the MountTargets should not really be "inside" the stack - they need to be maintained outside of the stack, like the EFS volumes are. As a minimum solution |
FYI my current workaround is to do this ugly hack (which works because I'm hard coding the SubnetIds):
|
Has anyone gotten this issue resolved. I'm currently trying to achieve something similar and my volumes will not mount no matter what I do. I tried @thorfi work around, but it still fails. |
I haven’t had any more issues, other than that first hiccup, after letting docker compose create the filesystems. |
I think this is a sort of a deadlock as docker compose when creating the filesystem doesn't add the inbound NFS rule which causes the stack to fail and it also fails as above if we manually specify a filesystem. Related issue: #1490 |
This fixed a BUNCH of frustrating problems I've been having with EFS volumes. Thank you. |
This thread goes back a full year, highlighting a fundamental problem--actually just one of many issues I've had to deal with setting up a simple Docker/ECS implementation for a website with a backend database. The hack offered by thorfi seems to be working for me. The problem is I'm not hearing any music--I'm looking for signs of activity or progress on the Docker/ECS, but it's just crickets. Is this a safe path, or should I be moving to Kubernetes or some other platform? Like I said, it's just a scalable web frontend with a shared volume for data and node_modules. What's everybody doing? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
bump |
This issue has been automatically marked as not stale anymore due to the recent activity. |
//me goes implement this in ecs-composex |
Oo, cool. Adding that to my future projects implementation list. |
can we just create the mount points for public subnets only, instead of all private + public ones.. this will solve it? |
Still an issue... |
bump |
@chingc @thorfi |
Description
I'm trying to start a service using ECS and mount an existing EFS as a volume. When I try, I get the following error:
Steps to reproduce the issue:
docker-compose.yml
Describe the results you received:
Describe the results you expected:
Filesystem to be mounted.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker context show
:You can also run
docker context inspect context-name
to give us more details but don't forget to remove sensitive content.Output of
docker info
:Additional environment details (AWS ECS, Azure ACI, local, etc.):
The text was updated successfully, but these errors were encountered: