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

[FARGATE] [SHM]: allow usage of /dev/shm and tmpfs #710

Closed
taktakpeops opened this issue Jan 21, 2020 · 1 comment
Closed

[FARGATE] [SHM]: allow usage of /dev/shm and tmpfs #710

taktakpeops opened this issue Jan 21, 2020 · 1 comment
Labels
Proposed Community submitted issue

Comments

@taktakpeops
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about your request
As a software engineer, I want to deploy a Selenium Grid in ECS Fargate with Chrome and Firefox nodes running in headless mode.

I currently can have only Chrome deployed because it can be configured for not using /dev/shm. As far as I know, Firefox headless needs /dev/shm.

The idea behind my request is to enable a Fargate task to use /dev/shm or tmpfs as it's possible in ECS.

Which service(s) is this request for?
Fargate

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
Currently, for giving access to /dev/shm to my container inside a task, I am doing the following in my Cloudformation manifest:

SeleniumNodeFirefoxTask:
    Type: "AWS::ECS::TaskDefinition"
    DependsOn: TalpaAccountSeleniumGrid
    Properties:
      Volumes:
        - Name: "shm"
    ContainerDefinitions:
    - MountPoints:
           - ContainerPath: /dev/shm
              SourceVolume: shm
              ReadOnly: false

The volume is mounted correctly but Firefox keep failing.

Here is an error message I got from my Firefox container:

WARNING: failed to open shm: Permission denied: file /builds/worker/workspace/build/src/ipc/chromium/src/base/shared_memory_posix.cc, line 250

Are you currently working around this issue?

I have tried to with what I explained just before, but it won't work due to the ACL attached to the volume and due to the fact that, as for now, ECS Fargate disallow using /dev/shm and tmpfs.

A previous issue was open here. @fenxiong suggested to re-open the issue in this repository.

@taktakpeops taktakpeops added the Proposed Community submitted issue label Jan 21, 2020
@taktakpeops
Copy link
Author

After reading this blog post, I think the issue is answered.

Fargate, because of its serverless architecture, cannot offer a shared memory or swap space.

Therefore, my use-case is slightly wrong since ECS EC2 would be the launch type to use for my Selenium Grid.

Closing the issue since it's not relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposed Community submitted issue
Projects
None yet
Development

No branches or pull requests

1 participant