You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2021/08/23 08:01:28 UTC

[brooklyn-server] branch master updated (9e62cdc -> 554f61e)

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git.


    from 9e62cdc  This closes #1226
     new 16ad4bf  fix description of config key
     new dbf1df3  better logging for lifecycle state computation
     new 06bed8d  Default path for logbook using FileLogStore relative
     new 554f61e  This closes #1227

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../brooklyn/core/entity/lifecycle/ServiceStateLogic.java | 15 ++++++++++-----
 .../brooklyn/util/core/logbook/file/FileLogStore.java     |  2 +-
 .../brooklyn/util/core/internal/winrm/WinRmTool.java      |  2 +-
 3 files changed, 12 insertions(+), 7 deletions(-)

[brooklyn-server] 04/04: This closes #1227

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit 554f61e4cdd45879f8a4c8d5d8e2cf53c39404ac
Merge: dbf1df3 06bed8d
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Mon Aug 23 09:01:24 2021 +0100

    This closes #1227

 .../java/org/apache/brooklyn/util/core/logbook/file/FileLogStore.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[brooklyn-server] 01/04: Default path for logbook using FileLogStore relative

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit 06bed8d4c16aee2ae7863c641ba3a14a6f85b179
Author: Juan Cabrerizo <ju...@cloudsoft.io>
AuthorDate: Sat Aug 21 16:34:19 2021 +0100

    Default path for logbook using FileLogStore relative
---
 .../java/org/apache/brooklyn/util/core/logbook/file/FileLogStore.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/brooklyn/util/core/logbook/file/FileLogStore.java b/core/src/main/java/org/apache/brooklyn/util/core/logbook/file/FileLogStore.java
index 57fd10f..a8cf3bd 100644
--- a/core/src/main/java/org/apache/brooklyn/util/core/logbook/file/FileLogStore.java
+++ b/core/src/main/java/org/apache/brooklyn/util/core/logbook/file/FileLogStore.java
@@ -60,7 +60,7 @@ public class FileLogStore implements LogStore {
     */
     public final static String BASE_NAME_FILE_LOG_STORE = BASE_NAME_LOGBOOK + ".fileLogStore";
     public final static ConfigKey<String> LOGBOOK_LOG_STORE_PATH = ConfigKeys.newStringConfigKey(
-            BASE_NAME_FILE_LOG_STORE + ".path", "Log file path", "/var/log/brooklyn/brooklyn.debug.log");
+            BASE_NAME_FILE_LOG_STORE + ".path", "Log file path", "data/log/brooklyn.debug.log");
 
     public final static ConfigKey<String> LOGBOOK_LOG_STORE_REGEX = ConfigKeys.newStringConfigKey(
             BASE_NAME_FILE_LOG_STORE + ".regexPattern",

[brooklyn-server] 03/04: better logging for lifecycle state computation

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit dbf1df39b305c0fc03e3200bcb24fb9e4deef82c
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Mon Aug 23 09:00:34 2021 +0100

    better logging for lifecycle state computation
---
 .../brooklyn/core/entity/lifecycle/ServiceStateLogic.java | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/lifecycle/ServiceStateLogic.java b/core/src/main/java/org/apache/brooklyn/core/entity/lifecycle/ServiceStateLogic.java
index 6731e83..d32d0c5 100644
--- a/core/src/main/java/org/apache/brooklyn/core/entity/lifecycle/ServiceStateLogic.java
+++ b/core/src/main/java/org/apache/brooklyn/core/entity/lifecycle/ServiceStateLogic.java
@@ -25,6 +25,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import java.util.stream.Collectors;
 import javax.annotation.Nullable;
 
 import org.apache.brooklyn.api.effector.Effector;
@@ -322,6 +323,9 @@ public class ServiceStateLogic {
                 return Maybe.of(Lifecycle.RUNNING);
             } else {
                 if (!Lifecycle.ON_FIRE.equals(entity.getAttribute(SERVICE_STATE_ACTUAL))) {
+                    Lifecycle.Transition serviceExpected = entity.getAttribute(SERVICE_STATE_EXPECTED);
+                    // very occasional race here; might want to give a grace period if entity has just transitioned,
+                    // allow children to catch up
                     BrooklynLogging.log(log, BrooklynLogging.levelDependingIfReadOnly(entity, LoggingLevel.WARN, LoggingLevel.TRACE, LoggingLevel.DEBUG),
                         "Setting "+entity+" "+Lifecycle.ON_FIRE+" due to problems when expected running, up="+serviceUp+", "+
                             (problems==null || problems.isEmpty() ? "not-up-indicators: "+entity.getAttribute(SERVICE_NOT_UP_INDICATORS) : "problems: "+problems));
@@ -536,7 +540,7 @@ public class ServiceStateLogic {
             if (entity==null || !Entities.isManaged(entity)) {
                 // either invoked during setup or entity has become unmanaged; just ignore
                 BrooklynLogging.log(log, BrooklynLogging.levelDebugOrTraceIfReadOnly(entity),
-                    "Ignoring {} onUpdated when entity is not in valid state ({})", this, entity);
+                    "Ignoring service indicators onUpdated at {} from invalid/unmanaged entity ({})", this, entity);
                 return;
             }
 
@@ -591,12 +595,12 @@ public class ServiceStateLogic {
         protected Object computeServiceProblems() {
             Map<Entity, Lifecycle> values = getValues(SERVICE_STATE_ACTUAL);
             int numRunning=0;
-            List<Entity> onesNotHealthy=MutableList.of();
+            Map<Entity,String> onesNotHealthy=MutableMap.of();
             Set<Lifecycle> ignoreStates = getConfig(IGNORE_ENTITIES_WITH_THESE_SERVICE_STATES);
             for (Map.Entry<Entity,Lifecycle> state: values.entrySet()) {
                 if (state.getValue()==Lifecycle.RUNNING) numRunning++;
                 else if (!ignoreStates.contains(state.getValue()))
-                    onesNotHealthy.add(state.getKey());
+                    onesNotHealthy.put(state.getKey(), ""+state.getValue());
             }
 
             QuorumCheck qc = getConfig(RUNNING_QUORUM_CHECK);
@@ -613,8 +617,9 @@ public class ServiceStateLogic {
             }
 
             return "Required entit"+Strings.ies(onesNotHealthy.size())+" not healthy: "+
-                (onesNotHealthy.size()>3 ? nameOfEntity(onesNotHealthy.get(0))+" and "+(onesNotHealthy.size()-1)+" others"
-                    : Strings.join(nameOfEntity(onesNotHealthy), ", "));
+                (onesNotHealthy.size()>3
+                        ? nameOfEntity(onesNotHealthy.keySet().iterator().next())+" ("+onesNotHealthy.values().iterator().next()+") and "+(onesNotHealthy.size()-1)+" others"
+                        : onesNotHealthy.entrySet().stream().map(entry -> nameOfEntity(entry.getKey())+" ("+entry.getValue()+")").collect(Collectors.joining(", ")));
         }
 
         private List<String> nameOfEntity(List<Entity> entities) {

[brooklyn-server] 02/04: fix description of config key

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit 16ad4bfc994f43275031041fed92032e9f87ed1e
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Mon Aug 23 09:00:26 2021 +0100

    fix description of config key
---
 .../java/org/apache/brooklyn/util/core/internal/winrm/WinRmTool.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/software/winrm/src/main/java/org/apache/brooklyn/util/core/internal/winrm/WinRmTool.java b/software/winrm/src/main/java/org/apache/brooklyn/util/core/internal/winrm/WinRmTool.java
index b566224..55545ce 100644
--- a/software/winrm/src/main/java/org/apache/brooklyn/util/core/internal/winrm/WinRmTool.java
+++ b/software/winrm/src/main/java/org/apache/brooklyn/util/core/internal/winrm/WinRmTool.java
@@ -61,7 +61,7 @@ public interface WinRmTool {
      * TODO Winrm supports several authentication mechanisms so it would be better to replace it with a prioritised list of authentication mechanisms to try.
      */
     @Beta
-    ConfigKey<Boolean> USE_NTLM = ConfigKeys.newBooleanConfigKey("winrm.useNtlm", "The parameter configures tells the machine sensors whether the winrm port is over https. If the parameter is true then 5986 will be used as a winrm port.", true);
+    ConfigKey<Boolean> USE_NTLM = ConfigKeys.newBooleanConfigKey("winrm.useNtlm", "The parameter configures whether to use NTLM or not.", true);
 
     @Beta
     ConfigKey<String> COMPUTER_NAME = ConfigKeys.newStringConfigKey("winrm.computerName", "Windows Computer Name to use for authentication.");