1. 28 Feb, 2019 1 commit
  2. 20 Feb, 2019 1 commit
  3. 18 Feb, 2019 1 commit
    • Alain Takoudjou's avatar
      plugin recipe: improve recipe to correctly generate promise which has complex parameters · b53ba563
      Alain Takoudjou authored
      Use json.dumps/.loads to generate promise plugin code. This is safe as it will correctly escape sring and prevent code injection from untrustable parameters.
      Add 'import' parameter to simplify parameters used to generate the script instead of passing full import code. When import parameter is set, promise will be loaded from that import path and parameter `content` is ignored.
      /reviewed-on !515
  4. 27 Dec, 2018 1 commit
  5. 16 Dec, 2018 1 commit
  6. 13 Dec, 2018 1 commit
  7. 26 Nov, 2018 1 commit
  8. 15 Nov, 2018 2 commits
  9. 14 Nov, 2018 1 commit
  10. 21 Sep, 2018 1 commit
  11. 06 Sep, 2018 3 commits
  12. 03 Sep, 2018 2 commits
  13. 31 Aug, 2018 3 commits
  14. 29 Aug, 2018 1 commit
  15. 23 Aug, 2018 1 commit
  16. 17 Aug, 2018 1 commit
  17. 28 Jul, 2018 1 commit
  18. 29 Jun, 2018 1 commit
    • Vincent Pelletier's avatar
      Stop using erp5 test recipe · 1436c63b
      Vincent Pelletier authored
      The goal is to drop slapos.cookbook:erp5.test
      No need for a recipe to do a bit of url parsing and generating 2 wrappers.
      Also, drop unused & empty "host-common" section.
      - stack/erp5: Add path to all binary links in PATH
      - stack/erp5: Add single quotation marks to not break parameters in many lines
      - stack/erp5: Fix path to avoid one section to overwrite the file from another section
      - stack/erp5: pass cloudooo host instead of the IP address. The IP address and cloudooo hostname are well in $SLAPPART/etc/hosts
      - stack/erp5: Use use-ipv6 instance parameter to control where caucased listens when locally deployed.
        Drop incomplete 6tunnel usage on balancer toward zopes.
      Tests are somehow happy test_result_module/20180626-62AD32BB test_result_module/20180626-70AC16FA
      If no objections I would like to merge tomorrow but feel free to press merge for me :)
      The goal is rebase !318 to fix the conflict and merge after tomorrow.
      /cc @rafael @vpelletier 
      /reviewed-on !347
  19. 21 Jun, 2018 1 commit
  20. 18 May, 2018 1 commit
    • Roque's avatar
      Automatic restart of services when configuration changes · 6b82838e
      Roque authored
      The main idea is to rename the service wrapper using a hash of the corresponding configuration files. In that way, if the config files are updated, the corresponding script file, section in supervisor.conf and service process will be updated accordingly.
      - the file name in wrapper_path contains a hash of the corresponding config files
      - when config files change, and therefore the hash, the wrapper will be re-created and the corresponding service restarted
      - the config files paths will be a parameter in the corresponding buildout section, if it isn't set there won't be hash-check
      /reviewed-on !326
  21. 17 May, 2018 1 commit
  22. 27 Apr, 2018 1 commit
    • Jérome Perrin's avatar
      userinfo: expose values as string · f06e61a6
      Jérome Perrin authored
      To be compatible with buildout (and not only `slapos.recipe.template:jinja2`)
      See [#20180416-1138FFA](https://nexedi.erp5.net/bug_module/20180416-1138FFA/)
      Running this buildout:
      recipe = slapos.cookbook:userinfo
      recipe = plone.recipe.command
      command = echo "Hello user id ${userinfo:pw-uid}"
      In a slapos patched buildout it outputs: `"Hello user id !py!991"` (which means it's not usable for references directly in other buildout parts)
      In a "non patched" buildout fail with error:
        Getting section x.
        Initializing section x.
        Getting option x:command.
        Getting section userinfo.
        Initializing section userinfo.
      An internal error occurred due to a bug in either zc.buildout or in a
      recipe being used:
      Traceback (most recent call last):
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2127, in main
          getattr(buildout, command)(args)
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 681, in install
          [self[part]['recipe'] for part in install_parts]
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1278, in __getitem__
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1376, in _initialize
          self._dosub(k, v)
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1431, in _dosub
          v = '$$'.join([self._sub(s, seen) for s in v.split('$$')])
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1495, in _sub
          v = self.buildout[section].get(option, None, seen)
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1278, in __getitem__
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1386, in _initialize
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1395, in initialize
          self.recipe = recipe_class(buildout, name, self)
        File "/tmp/x/eggs/slapos.cookbook-1.0.62-py2.7.egg/slapos/recipe/userinfo.py", line 13, in __init__
          options['pw-uid'] = pinfo.pw_uid
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1520, in __setitem__
          raise TypeError('Option values must be strings', value)
      TypeError: ('Option values must be strings', 991)
      /cc @Nicolas @alain.takoudjou  @vpelletier 
      /reviewed-on !321
  23. 10 Apr, 2018 1 commit
    • Alain Takoudjou's avatar
      slapos.cookbook: add new recipe for python promises plugin script generation with eggs · 6f7b3a31
      Alain Takoudjou authored
      This recipe will be used to generate promise in etc/plugin dir. It solve the problem of promise eggs
      dependencies and allow to set custom parameter to use in promise.
      The generated script will looks like:
          import sys
          sys.path[0:0] = [
          extra_config_dict = {
            'KEY': 'VALUE'
      CONTENT is a python code, the expected content looks like:
          from namespace.module import RunPromise
      then the promise section in buildout will be something like:
          recipe = slapos.cookbook:promise.plugin
          eggs =
          output = OUTPUT
          content =
            from namespace.module import RunPromise
          config-KEY = VALUE
  24. 04 Apr, 2018 2 commits
  25. 16 Mar, 2018 1 commit
  26. 13 Mar, 2018 1 commit
  27. 12 Mar, 2018 1 commit
  28. 26 Feb, 2018 1 commit
  29. 13 Feb, 2018 5 commits
    • Julien Muchembled's avatar
      ERP5: new 'private-dev-shm' zope partition option for wendelin.core · e6bd1e78
      Julien Muchembled authored
      Current version of wendelin.core is limited in that there's no cooperation
      in memory allocation between several processes sharing the same /dev/shm.
      Over time, the distribution of memory among processes becomes more and more
      inequal until some of them get killed due to allocation failure.
      This is a temporary solution that relies on user namespaces.
    • Julien Muchembled's avatar
      Always use GenericBaseRecipe.createWrapper for executable wrappers · 411212fb
      Julien Muchembled authored
      This moves most of the wrapper recipe to GenericBaseRecipe so that
      createWrapper automatically switches to Python scripts for complex cases.
      Recipes should not use slapos.recipe.librecipe.execute.generic_exec directly
    • Julien Muchembled's avatar
      Remove 'comments' parameter in GenericBaseRecipe.createWrapper · a5d31970
      Julien Muchembled authored
      It was used in only 2 places and createPythonScript has no equivalent
      (maybe reusing 'initialization' from easy_install would produce something
      readable enough). For the moment, let's drop this parameter, so that
      createWrapper can switch to Python wrappers for complex cases.
    • Julien Muchembled's avatar
      Drop the 'parameters-extra' option and always forward extra parameters · 5c980caf
      Julien Muchembled authored
      There was an inconsistency between the 2 ways of creating executable wrappers:
      - createWrapper: parameters-extra defaults to False
      - slapos.recipe.librecipe.execute.generic_exec: no option, enabled
      An option for that is not worth the effort.
      Let's always enable even if it's meaningless.
      /software/ and /stack/ will be cleaned up once a new version of this egg
      is released.
    • Julien Muchembled's avatar
      More optimization to wrapper scripts · fcd4e69f
      Julien Muchembled authored
      The workaround for shebang size limitation is removed because it's redundant
      with what is done by zc.buildout.easy_install and slapos.recipe.cmmi. This also
      fix the issue that a process has a bad name even when the workaround is useless.