[one-users] Issue with picking up proper ulimits during contextualization

Tino Vazquez cvazquez at c12g.com
Fri Jul 26 09:40:23 PDT 2013


Hi Richard,

Reading .bashrc with 'su' (even with -l) can be sometimes a difficult
task. Any chance of setting it in /etc/profile?

Regards,

-Tino
--
Constantino Vázquez Blanco, PhD, MSc
Senior Infrastructure Architect at C12G Labs
www.c12g.com | @C12G | es.linkedin.com/in/tinova

--
Confidentiality Warning: The information contained in this e-mail and
any accompanying documents, unless otherwise expressly indicated, is
confidential and privileged, and is intended solely for the person
and/or entity to whom it is addressed (i.e. those identified in the
"To" and "cc" box). They are the property of C12G Labs S.L..
Unauthorized distribution, review, use, disclosure, or copying of this
communication, or any part thereof, is strictly prohibited and may be
unlawful. If you have received this e-mail in error, please notify us
immediately by e-mail at abuse at c12g.com and delete the e-mail and
attachments and any copy from your system. C12G thanks you for your
cooperation.


On Fri, Jul 26, 2013 at 5:11 PM, Richard Bettridge
<rbettridge at blackberry.com> wrote:
> Hey,
>
>
>
> I’m having an issue where the ulimit for open files isn’t being set properly
> when I spin up a process for a user during contextualization.
>
>
>
> Upon start up of the non-persistent ubuntu 12 image, I am setting
> limits.conf to what I want and I’m explicitly adding ulimit –n 65536 to the
> user’s .bashrc. However at the end of my 90_tomcat script when I execute the
> tomcat process the ulimit is not being picked up and is set to 1024 instead
>
>
>
> As a test in my 90_tomcat script I’m running ulimit –a >> /tmp/tomcatsu.txt
>
>
>
> root at host002:/mnt# cat 90_tomcat |grep "su tomcatA"
>
> su tomcatA -l -c "ulimit -a >> /tmp/tomcatsu.txt"
>
>
>
>
>
> So this gets run at the end of 90_tomcat:
>
> su tomcatA -l -c "ulimit -a >> /tmp/tomcatsu.txt"
>
> su tomcatA -l -c "/var/jakarta-tomcatA/bin/startup.sh"
>
>
>
> When I cat the txt file it says 1024:
>
>
>
> root at host002:/etc/pam.d# cat /tmp/tomcatsu.txt |grep open
>
> open files                      (-n) 1024
>
>
>
> But when I log in manually as root and run /mnt/90_tomcat by hand I end up
> getting the proper ulimit:
>
>
>
> root at host002:/etc/pam.d# cat /tmp/tomcatsu.txt |grep open
>
> open files                      (-n) 65536
>
>
>
>
>
> Not sure what the issue but I’d appreciate any input.
>
>
>
> Thanks,
>
>
>
>
>
> Richard Bettridge
>
> Systems Engineering Specialist
> BlackBerry
>
>
>
> ---------------------------------------------------------------------
> This transmission (including any attachments) may contain confidential
> information, privileged material (including material protected by the
> solicitor-client or other applicable privileges), or constitute non-public
> information. Any use of this information by anyone other than the intended
> recipient is prohibited. If you have received this transmission in error,
> please immediately reply to the sender and delete this information from your
> system. Use, dissemination, distribution, or reproduction of this
> transmission by unintended recipients is not authorized and may be unlawful.
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



More information about the Users mailing list