You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by bostko <gi...@git.apache.org> on 2015/11/13 23:00:24 UTC

[GitHub] incubator-brooklyn pull request: BROOKLYN-193: Add configuration f...

GitHub user bostko opened a pull request:

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

    BROOKLYN-193: Add configuration for skipping invalid config 

    Add configuration option for skipping invalid config values

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

    $ git pull https://github.com/bostko/incubator-brooklyn add_config_rebind_failure

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

    https://github.com/apache/incubator-brooklyn/pull/1033.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 #1033
    
----
commit 680ee07b38da835a3cb3a2c2efc5e0ff3076169b
Author: Valentin Aitken <va...@cloudsoftcorp.com>
Date:   2015-11-13T21:58:27Z

    BROOKLYN-193 Add configuration for skipping invalid config values during rebind

----


---
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: BROOKLYN-193: Add configuration f...

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

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


---
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: BROOKLYN-193: Add configuration f...

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

    https://github.com/apache/incubator-brooklyn/pull/1033#discussion_r44920971
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java ---
    @@ -92,6 +92,9 @@
         public static final ConfigKey<RebindFailureMode> REBIND_FAILURE_MODE =
                 ConfigKeys.newConfigKey(RebindFailureMode.class, "rebind.failureMode.rebind",
                         "Action to take if a failure occurs during rebind", RebindFailureMode.FAIL_AT_END);
    +    public static final ConfigKey<RebindFailureMode> ADD_CONFIG_FAILURE_MODE =
    +            ConfigKeys.newConfigKey(RebindFailureMode.class, "rebind.failureMode.addConfig",
    +                    "Action to take if a failure occurs when setting a config value. It could happen coercion of the value type to fail.", RebindFailureMode.FAIL_AT_END);
    --- End diff --
    
    The default for isolated problems is to `.CONTINUE` which will let Brooklyn complete the startup, but display an error message in the console and deny REST requests. Better apply the same default here.


---
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: BROOKLYN-193: Add configuration f...

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

    https://github.com/apache/incubator-brooklyn/pull/1033#issuecomment-156572688
  
    Looks good. Can we get a unit test?
    
    Should the default be `addConfigFailureMode = RebindManager.RebindFailureMode.FAIL_AT_END`? If so, we need to ensure customers are aware of how to configure it so as to skip this error (great that you've already added it to `docs/guide/ops/persistence/index.md` - this is more a reminder to us to point it out to customers explicitly).


---
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: BROOKLYN-193: Add configuration f...

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

    https://github.com/apache/incubator-brooklyn/pull/1033#discussion_r44921362
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java ---
    @@ -92,6 +92,9 @@
         public static final ConfigKey<RebindFailureMode> REBIND_FAILURE_MODE =
                 ConfigKeys.newConfigKey(RebindFailureMode.class, "rebind.failureMode.rebind",
                         "Action to take if a failure occurs during rebind", RebindFailureMode.FAIL_AT_END);
    +    public static final ConfigKey<RebindFailureMode> ADD_CONFIG_FAILURE_MODE =
    +            ConfigKeys.newConfigKey(RebindFailureMode.class, "rebind.failureMode.addConfig",
    +                    "Action to take if a failure occurs when setting a config value. It could happen coercion of the value type to fail.", RebindFailureMode.FAIL_AT_END);
    --- End diff --
    
    I just preserved it like the behavior it was before this change. Startup was failing the same way.
    Svet, do you really want me to change the default to CONTINUE ?


---
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: BROOKLYN-193: Add configuration f...

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/1033#discussion_r45047799
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java ---
    @@ -92,6 +92,9 @@
         public static final ConfigKey<RebindFailureMode> REBIND_FAILURE_MODE =
                 ConfigKeys.newConfigKey(RebindFailureMode.class, "rebind.failureMode.rebind",
                         "Action to take if a failure occurs during rebind", RebindFailureMode.FAIL_AT_END);
    +    public static final ConfigKey<RebindFailureMode> ADD_CONFIG_FAILURE_MODE =
    +            ConfigKeys.newConfigKey(RebindFailureMode.class, "rebind.failureMode.addConfig",
    +                    "Action to take if a failure occurs when setting a config value. It could happen coercion of the value type to fail.", RebindFailureMode.FAIL_AT_END);
    --- End diff --
    
    As long as we can definitely supply the configuration on Brooklyn startup to override it to CONTINUE, so that a customer can rebind with this kind of error.
    
    @bostko can we definitely do that?


---
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: BROOKLYN-193: Add configuration f...

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

    https://github.com/apache/incubator-brooklyn/pull/1033#discussion_r44922056
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java ---
    @@ -92,6 +92,9 @@
         public static final ConfigKey<RebindFailureMode> REBIND_FAILURE_MODE =
                 ConfigKeys.newConfigKey(RebindFailureMode.class, "rebind.failureMode.rebind",
                         "Action to take if a failure occurs during rebind", RebindFailureMode.FAIL_AT_END);
    +    public static final ConfigKey<RebindFailureMode> ADD_CONFIG_FAILURE_MODE =
    +            ConfigKeys.newConfigKey(RebindFailureMode.class, "rebind.failureMode.addConfig",
    +                    "Action to take if a failure occurs when setting a config value. It could happen coercion of the value type to fail.", RebindFailureMode.FAIL_AT_END);
    --- End diff --
    
    Good point, keep it as is. I confused it for a different functionality (`--startupFailOnPersistenceErrors` startup option).


---
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: BROOKLYN-193: Add configuration f...

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

    https://github.com/apache/incubator-brooklyn/pull/1033#issuecomment-157340932
  
    Thanks; merging.


---
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: BROOKLYN-193: Add configuration f...

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

    https://github.com/apache/incubator-brooklyn/pull/1033#issuecomment-157341283
  
    Yes I tested with `rebind.failureMode.addConfig=continue` and without it and it works as expected.
    I am working on providing tests now. It will take me several hours, they can be merged in a separate PR if you'd like.


---
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.
---