Skip to content

Conversation

@tbouron
Copy link
Member

@tbouron tbouron commented Aug 29, 2017

Background

Salt and Ansible are currently installed by Brooklyn and:

  • are used in masterless mode
  • use SSH to check their health
  • but more importantly, are used to install and manage software. For instance, using Salt, one can install and start/stop Apache or Nginx (or any other software). The same applies to Ansible.
    They are effectively software processes as they manage software lifecycle but are not considered as such based on their current implementation.

Issue

The current implementation uses EffectorStartableImpl instead of SoftwareProcessImpl. This has some side effects which might be surprising for users, such as:

  • the inboundPort (provisioning.properties) are not applied when the SG is created (on supported clouds)
  • the auto-opening port on SG by creating config keys finishing by .port does not works
  • the shell.env are also not applied (BROOKLYN-503)
  • if the location is using a machine name customiser, this will throw a NPE as the CALLER_CONTEXT is not set

This list is not exhaustive, I just wanted to illustrate the most common issues a user will bump into by using those entities.

Solution

Make those 2 entities real SoftwareProcesses, this PR is doing just that. I simply moved around the existing code to make it match the phases of SoftwareProcess.

This has been tested with YAML tests available here for Ansible and here for Salt

Copy link
Member

@drigodwin drigodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @tbouron

@asfgit asfgit merged commit ac837bc into apache:master Aug 30, 2017
asfgit pushed a commit that referenced this pull request Aug 30, 2017
asfgit pushed a commit that referenced this pull request Nov 27, 2017
BROOKLYN-566: fix SaltEntity rebind to historic state

Fixes https://issues.apache.org/jira/browse/BROOKLYN-566

This class was deleted in #123, when converting the entity to be a `SoftwareProcess`.

Also see apache/brooklyn-server#905
asfgit pushed a commit to apache/brooklyn-server that referenced this pull request Nov 27, 2017
BROOKLYN-566: fix SaltEntity rebind to historic state

Fixes https://issues.apache.org/jira/browse/BROOKLYN-566

These were renamed in apache/brooklyn-library#123, which broke rebind if the persisted state contained a SaltEntity from 0.11.0.

Also see apache/brooklyn-library#144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants