Bug 814991 - Users on Forums requesting access to shared memory for python apps' multiprocessing
Summary: Users on Forums requesting access to shared memory for python apps' multiproc...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Tim Kramer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 767033
TreeView+ depends on / blocked
 
Reported: 2012-04-21 22:43 UTC by Nam Duong
Modified: 2015-05-14 22:53 UTC (History)
9 users (show)

Fixed In Version: devenv_2423+
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-06 18:47:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nam Duong 2012-04-21 22:43:26 UTC
Description of problem:
See forum post:  https://www.redhat.com/openshift/community/forums/openshift/devshm-support

Users are requesting r/w access to /dev/shm for Python app multiprocessing.  Is that something we can do?

User's comments: "I'm experimenting with a diy app with the goal of deploying a django application with gunicorn, supervisor and celery support.
When running celeryd on openshift, the following error "[Errno 38] Function not implemented - multiprocessing " is thrown.
Upon investigation i found an issue related to the lack of OS shm support: https://github.com/ask/celery/issues/185 .
Would it be something that could be added to the openshift architecture?"

Thanks;
~Nam

Comment 1 Mike McGrath 2012-04-23 15:44:33 UTC
It's not today. We might be able to add it but quota and security issues abound.  We certainly couldn't set it up as a shared environment (as in, multiple gears using the same location).  We'll have to do some more research on the cost / benefit of doing such a thing.

Comment 2 Mike McGrath 2012-08-27 16:22:27 UTC
Updating on an old bug.  I *think* they can do shared environment memory now but not sure, re-assigning to tkramer to look at and confirm or see if it's reasonable to do.

Comment 3 Nam Duong 2012-10-01 23:05:46 UTC
Just to add another forum thread to this issue:  https://openshift.redhat.com/community/forums/openshift/problem-with-starting-celery-on-the-openshift-python-26-environment

celeryd is dependent upon /dev/shm support.

Comment 4 Gianluca Sforna 2012-10-10 10:54:23 UTC
I just hit the same problem. Is there any news? my app was almost ready when I discovered I can not really use celery on OpenShift.
Now I'd need to decide if it's better to look for another PaaS solution or there is hope this is going to be fixed in the near term

Comment 7 Dan Mace 2012-11-02 14:32:53 UTC
Support for /dev/shm (limited to 5MB) is now available as of devenv_2423+.

Comment 11 Tim Kramer 2012-11-05 15:19:27 UTC
The original user was just looking for /dev/shm support.  We need to test it in terms of writability, isolation, quota, tmpfs usability (does the files get removed when the user logs out), etc.

We can investigate specific use cases with our carts separately.

Comment 12 Jianwei Hou 2012-11-06 07:11:13 UTC
Verified on devenv_2431

Steps:
1. Create a python application
rhc app create pythonapp python-2.6

2. ssh into created application, write to /dev/shm

[py1-2431t.dev.rhcloud.com ~]\> ls -Zd /dev/shm/
drwxrwxrwt. root root system_u:object_r:tmpfs_t:s0:c0,c511 /dev/shm/

[py1-2431t.dev.rhcloud.com ~]\> dd if=/dev/zero of=/dev/shm/file bs=10M count=1
dd: writing `/dev/shm/file': No space left on device
1+0 records in
0+0 records out
5226496 bytes (5.2 MB) copied, 0.0277891 s, 188 MB/s
[py1-2431t.dev.rhcloud.com ~]\> ls -lh /dev/shm/file 
-rw-r--r--. 1 2174adcf838f486eb52bcc75fb5a9168 2174adcf838f486eb52bcc75fb5a9168 5.0M Nov  6 02:04 /dev/shm/file

Quota is 5MB

3. Create another application, ssh into app and check file under /dev/shm
rhc app create phpapp php-5.3

[php1-2431t.dev.rhcloud.com ~]\> ls -lh /dev/shm/
total 0

4. Log out of first application, and ssh into it again, check file under /dev/shm
[py1-2431t.dev.rhcloud.com ~]\> ls -lh /dev/shm/
total 0

Tested in terms of writability, isolation, quota, tmpfs usability, so move it to verified.

Comment 13 Steven Citron-Pousty 2012-11-21 18:44:07 UTC
Status bump - need to use Celery for a demo


Note You need to log in before you can comment on or make changes to this bug.