You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by aledsage <gi...@git.apache.org> on 2017/11/13 16:48:58 UTC

[GitHub] brooklyn-server pull request #894: Adds SetLimitsCustomizer for centos/rhel

GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-server/pull/894

    Adds SetLimitsCustomizer for centos/rhel

    I tested this with the catalog item:
    ```
    brooklyn.catalog:
      id: my-nginx-node
      itemType: entity
    
      item:
        type: org.apache.brooklyn.entity.proxy.nginx.NginxController
    
        brooklyn.parameters:
        - name: ulimits
          type: java.util.List
          description: |
            Contents to add to the limits config file
          default:
            - "* soft nofile 16384"
            - "* hard nofile 16384"
            - "* soft nproc 16384"
            - "* hard nproc 16384"
     
        brooklyn.config:
          provisioning.properties:
            machineCustomizers:
              - $brooklyn:object:
                  type: io.cloudsoft.amp.cluster.customizer.SetLimitsCustomizer
                  brooklyn.config:
                    contents: $brooklyn:config("ulimits")
    
          nginx.sticky: false
          install.version: 1.12.1
    ```
    I deployed this to aws eu-west-1 using `imageId: eu-west-1/ami-5f76b626` (i.e. the official centos marketplace image).
    
    I then checked that the nginx process had the correct "max processes" and "max open files":
    ```
    ps aux | grep nginx
    aled     14120  0.0  0.0  43764  1672 ?        Ss   16:26   0:00 nginx: master process ./sbin/nginx -p /home/users/aled/brooklyn-managed-processes/apps/z810z6e23t/entities/NginxController_c4j33pu7ly/ -c conf/server.conf
    aled     14241  0.0  0.1  47168  4784 ?        S    16:26   0:00 nginx: worker process
    aled     14428  0.0  0.0 112660   972 pts/0    S+   16:27   0:00 grep --color=auto nginx
    
    cat /proc/14120/limits 
    Limit                     Soft Limit           Hard Limit           Units     
    Max cpu time              unlimited            unlimited            seconds   
    Max file size             unlimited            unlimited            bytes     
    Max data size             unlimited            unlimited            bytes     
    Max stack size            8388608              unlimited            bytes     
    Max core file size        0                    unlimited            bytes     
    Max resident set          unlimited            unlimited            bytes     
    Max processes             16384                16384                processes 
    Max open files            16384                16384                files     
    Max locked memory         65536                65536                bytes     
    Max address space         unlimited            unlimited            bytes     
    Max file locks            unlimited            unlimited            locks     
    Max pending signals       14996                14996                signals   
    Max msgqueue size         819200               819200               bytes     
    Max nice priority         0                    0                    
    Max realtime priority     0                    0                    
    Max realtime timeout      unlimited            unlimited            us        
    ```
    
    I also deployed a similar nginx without the customizer, and confirmed these had:
    ```
    Max processes             4096                 14996                processes 
    Max open files            1024                 4096                 files     
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aledsage/brooklyn-server add-SetLimitsCustomizer

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/894.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #894
    
----
commit 6ecbbf1b2901fbc25fd58c441c451be28ca173fb
Author: Aled Sage <al...@gmail.com>
Date:   2017-11-13T16:12:29Z

    Adds SetLimitsCustomizer for centos/rhel

----


---

[GitHub] brooklyn-server pull request #894: Adds SetLimitsCustomizer for centos/rhel

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-server/pull/894


---

[GitHub] brooklyn-server issue #894: Adds SetLimitsCustomizer for centos/rhel

Posted by drigodwin <gi...@git.apache.org>.
Github user drigodwin commented on the issue:

    https://github.com/apache/brooklyn-server/pull/894
  
    retest this please


---

[GitHub] brooklyn-server issue #894: Adds SetLimitsCustomizer for centos/rhel

Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on the issue:

    https://github.com/apache/brooklyn-server/pull/894
  
    Reviewed by @duncangrant and tests passed, merging this. Thanks @aledsage 


---

[GitHub] brooklyn-server issue #894: Adds SetLimitsCustomizer for centos/rhel

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-server/pull/894
  
    Retest this please
    
    Test failure was `MachineEntityJcloudsRebindTest.testRebind`, which is unrelated I believe. I could reproduce this locally by running with `@Test(invocationCount=...)` to do it a few dozen times. The failure is shown below - not obvious what's going wrong here.
    ```
    2017-12-12 10:04:49,600 INFO  failed succeeds-eventually, 74 attempts, 30002ms elapsed (rethrowing): java.lang.AssertionError: Commands (/etc/os-release) not contain in [[cat /proc/uptime], [uptime], [ps -A -o pcpu], [free | grep Mem:]]
    	at org.apache.brooklyn.entity.machine.MachineEntityJcloudsRebindTest.assertRecordedSshCmdContainsEventually(MachineEntityJcloudsRebindTest.java:117)
    	at org.apache.brooklyn.entity.machine.MachineEntityJcloudsRebindTest.testRebind(MachineEntityJcloudsRebindTest.java:103)
    ```


---

[GitHub] brooklyn-server issue #894: Adds SetLimitsCustomizer for centos/rhel

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-server/pull/894
  
    retest this please


---

[GitHub] brooklyn-server issue #894: Adds SetLimitsCustomizer for centos/rhel

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/brooklyn-server/pull/894
  
    FAILURE
     3245 tests run, 0 skipped, 0 failed.
    --none--


---

[GitHub] brooklyn-server issue #894: Adds SetLimitsCustomizer for centos/rhel

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-server/pull/894
  
    retest this please


---