Github user neykov commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/782#discussion_r36163212
--- Diff:
software/nosql/src/main/java/brooklyn/entity/nosql/redis/RedisClusterImpl.java
---
@@ -72,12 +120,12 @@ public void restart() {
throw new UnsupportedOperationException();
}
- protected boolean calculateServiceUp() {
- boolean up = false;
- for (Entity member : slaves.getMembers()) {
- if (Boolean.TRUE.equals(member.getAttribute(SERVICE_UP))) up =
true;
- }
- return up;
- }
+ private boolean calculateServiceUp() {
+ if (!Boolean.TRUE.equals(getMaster().getAttribute(SERVICE_UP)))
return false;
+ for (Entity member : getSlaves().getMembers())
--- End diff --
You can check the status of the `getSlaves()` entity directly, it will
update based on the members state. It's at [least
one](https://github.com/apache/incubator-brooklyn/blob/master/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java#L171)
by default.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---