brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Kennedy <>
Subject Command Config Inheritance
Date Mon, 29 Aug 2016 16:52:26 GMT

I've run into an issue with the `SoftwareProcess` entities, where the
default inheritance settings for configuration keys like `install.command`
and so on mean that child entities do not behave as expected. Consider the
following blueprint:

  - type: vanilla-software-process
      install.command: |
      customize.command: |
        tar zxf archive.tgz
        cp archive/foo /usr/bin
      launch.command: |
        foo --daemon
      - type: vanilla-software-process
          install.command: |
            yum install -y something
          launch.command: |
            bar --whatever

This looks like it will run 'foo' after extracting it from an archive we
download, then in a child entity we install a a package and run 'bar' as
well. However, the child entity will inherit configuration from its parent,
in particular it is going to get the 'customize.command' value set, which
will cause those commands to be executed, and then fail! The same will
happen with the resource and template configuration keys.


The above pull request fixes this so that the expected (non-surprising)
behaviour happens instead, and in the child entity the `customize.command`
value will be blank. It does this by setting the config to only inherit
with the entity inheritance hierarchy, not the entity ownership
(parent-child)  hierarchy.

All tests are passing with this change, so I think it is safe to merge, but
would like to know if anyone thinks it will break their blueprints before I
do so.


Andrew Kennedy ; Founder project ; @grkvlt ; Cloudsoft

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message