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

[GitHub] incubator-brooklyn pull request: Add configuration to skip start i...

GitHub user grkvlt opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/364

    Add configuration to skip start if entity already running

    Add check if entity is already running before skipping startup. Also allows setting the configuration for skip of startup and ionstall on the location, useful when known good images are being used in a fixed IP byon location or an on premises cloud.

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

    $ git pull https://github.com/grkvlt/incubator-brooklyn entity-running-config

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

    https://github.com/apache/incubator-brooklyn/pull/364.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 #364
    
----
commit d779ed53fa0c9b76fb2a9cdcf1ff3b04760e1819
Author: Andrew Kennedy <gr...@apache.org>
Date:   2014-11-25T23:55:50Z

    Add configuration to skip start if entity already running

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add configuration to skip start i...

Posted by nakomis <gi...@git.apache.org>.
Github user nakomis commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/364#discussion_r21980058
  
    --- Diff: core/src/main/java/brooklyn/entity/basic/BrooklynConfigKeys.java ---
    @@ -55,8 +55,9 @@
                 "this should include something readable, and must include a hash of all data which differentiates an installation " +
                 "(e.g. version, plugins, etc), but should be the same where install dirs can be shared to allow for re-use");
     
    -    public static final ConfigKey<Boolean> ENTITY_STARTED = newBooleanConfigKey("entity.started", "Skip the startup process entirely, for running services", Boolean.FALSE);
    -    public static final ConfigKey<Boolean> SKIP_INSTALLATION = newBooleanConfigKey("install.skip", "Skip the driver install commands entirely, for pre-installed software", Boolean.FALSE);
    +    public static final ConfigKey<Boolean> ENTITY_STARTED = newBooleanConfigKey("entity.started", "Skip the startup process entirely, for running services");
    +    public static final ConfigKey<Boolean> ENTITY_RUNNING = newBooleanConfigKey("entity.running", "Skip the startup process entirely, if service already running");
    --- End diff --
    
    It's not clear what the difference is between ENTITY_STARTED, and ENTITY_RUNNING


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add configuration to skip start i...

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

    https://github.com/apache/incubator-brooklyn/pull/364#issuecomment-67465375
  
    Agree with @nakomis 
    
    Similarly, I don't understand why you lookup `ENTITY_RUNNING` from the location, but don't get `ENTITY_STARTED` from the location's config. What is the difference between them?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add configuration to skip start i...

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/364#discussion_r21981468
  
    --- Diff: core/src/main/java/brooklyn/entity/basic/BrooklynConfigKeys.java ---
    @@ -55,8 +55,9 @@
                 "this should include something readable, and must include a hash of all data which differentiates an installation " +
                 "(e.g. version, plugins, etc), but should be the same where install dirs can be shared to allow for re-use");
     
    -    public static final ConfigKey<Boolean> ENTITY_STARTED = newBooleanConfigKey("entity.started", "Skip the startup process entirely, for running services", Boolean.FALSE);
    -    public static final ConfigKey<Boolean> SKIP_INSTALLATION = newBooleanConfigKey("install.skip", "Skip the driver install commands entirely, for pre-installed software", Boolean.FALSE);
    +    public static final ConfigKey<Boolean> ENTITY_STARTED = newBooleanConfigKey("entity.started", "Skip the startup process entirely, for running services");
    +    public static final ConfigKey<Boolean> ENTITY_RUNNING = newBooleanConfigKey("entity.running", "Skip the startup process entirely, if service already running");
    --- End diff --
    
    OK, probably needs better description, will add Javadoc


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add configuration to skip start i...

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/364#issuecomment-69665991
  
    Updated key names to `SKIP_ENTITY_INSTALLATION` `SKIP_ENTITY_START` and `SKIP_ENTITY_START_IF_RUNNING`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add configuration to skip start i...

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/364#issuecomment-69761044
  
    Test failures are unrelated and spurious. Note multiple previous _SUCCESS_ responses. I'm happy to merge now :frog:


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add configuration to skip start i...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/364#discussion_r22707836
  
    --- Diff: core/src/main/java/brooklyn/entity/basic/BrooklynConfigKeys.java ---
    @@ -55,8 +57,36 @@
                 "this should include something readable, and must include a hash of all data which differentiates an installation " +
                 "(e.g. version, plugins, etc), but should be the same where install dirs can be shared to allow for re-use");
     
    -    public static final ConfigKey<Boolean> ENTITY_STARTED = newBooleanConfigKey("entity.started", "Skip the startup process entirely, for running services", Boolean.FALSE);
    -    public static final ConfigKey<Boolean> SKIP_INSTALLATION = newBooleanConfigKey("install.skip", "Skip the driver install commands entirely, for pre-installed software", Boolean.FALSE);
    +    /**
    +     * Set this configuration value to true if the entity installation, customization and launch process is to be skipped entirely.
    +     * <p>
    +     * This is usually because the process or service the entity represents is already present and started, as part of the image
    +     * being used. The {@link Startable#SERVICE_UP} attribute will be set in the usual manner.
    +     * <p>
    +     * If this key is set on a {@link Location} then all entities in that location will be treated in this way. This is useful
    +     * when the location is configured with a particular image containing installed and running services.
    +     *
    +     * @see #ENTITY_RUNNING
    +     */
    +    public static final ConfigKey<Boolean> ENTITY_STARTED = newBooleanConfigKey("entity.started", "Skip the startup process entirely, for running services");
    +
    +    /**
    +     * Set this configuration value to true to skip the entity startup process as with {@link #ENTITY_STARTED} if the process or
    +     * service represented by the entity is already running, otherwise proceed normally. This is determined using the driver's
    +     * {@code isRunning()} method.
    +     * <p>
    +     * If this key is set on a {@link Location} then all entities in that location will be treated in this way, again as with {@link #ENTITY_STARTED}.
    +     *
    +     * @see #ENTITY_STARTED
    +     */
    +    public static final ConfigKey<Boolean> ENTITY_RUNNING = newBooleanConfigKey("entity.running", "Skip the startup process entirely, if service already running");
    +
    +    /**
    +     * Set this configuration value to true if the entity installation, customization and launch process is to be skipped entirely.
    --- End diff --
    
    Incorrect javadoc - should be"if the entity installation process is to be skipped entirely."


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add configuration to skip start i...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/364#discussion_r22707994
  
    --- Diff: core/src/main/java/brooklyn/entity/basic/BrooklynConfigKeys.java ---
    @@ -55,8 +57,36 @@
                 "this should include something readable, and must include a hash of all data which differentiates an installation " +
                 "(e.g. version, plugins, etc), but should be the same where install dirs can be shared to allow for re-use");
     
    -    public static final ConfigKey<Boolean> ENTITY_STARTED = newBooleanConfigKey("entity.started", "Skip the startup process entirely, for running services", Boolean.FALSE);
    -    public static final ConfigKey<Boolean> SKIP_INSTALLATION = newBooleanConfigKey("install.skip", "Skip the driver install commands entirely, for pre-installed software", Boolean.FALSE);
    +    /**
    +     * Set this configuration value to true if the entity installation, customization and launch process is to be skipped entirely.
    +     * <p>
    +     * This is usually because the process or service the entity represents is already present and started, as part of the image
    +     * being used. The {@link Startable#SERVICE_UP} attribute will be set in the usual manner.
    +     * <p>
    +     * If this key is set on a {@link Location} then all entities in that location will be treated in this way. This is useful
    +     * when the location is configured with a particular image containing installed and running services.
    +     *
    +     * @see #ENTITY_RUNNING
    +     */
    +    public static final ConfigKey<Boolean> ENTITY_STARTED = newBooleanConfigKey("entity.started", "Skip the startup process entirely, for running services");
    --- End diff --
    
    I'm concerned about the names `ENTITY_STARTED` and `ENTITY_RUNNING`. Looking at just the name, there is no way anyone would guess the difference. There is also an inconsistency in naming compared the `SKIP_INSTALLATION`.
    
    Maybe a better name would be `SKIP_START`? (I don't like that someone might think it means "skip launch" - but we use "start" to mean the whole install+customize+launch, so I think it's ok).
    
    Could change `ENTITY_RUNNING` to `SKIP_START_IF_RUNNING`.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add configuration to skip start i...

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

    https://github.com/apache/incubator-brooklyn/pull/364


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---