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/12/06 16:50:14 UTC
[brooklyn-server] 01/07: fix bug where upgraded bundles cause log warnings when the old one is removed
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 02dfde847993ad0bfd7cfff51a70f1e162cdbb53
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Mon Dec 6 12:34:41 2021 +0000
fix bug where upgraded bundles cause log warnings when the old one is removed
---
.../apache/brooklyn/core/catalog/internal/CatalogInitialization.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogInitialization.java b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogInitialization.java
index 8ff5180..b16000c 100644
--- a/core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogInitialization.java
+++ b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogInitialization.java
@@ -663,6 +663,7 @@ public class CatalogInitialization implements ManagementContextInjectable {
for (Map.Entry<VersionedName, InstallableManagedBundle> entry : persistedState.getBundles().entrySet()) {
if (catalogUpgrades.isBundleRemoved(entry.getKey())) {
rebindLogger.debug("Filtering out persisted bundle "+entry.getKey());
+ getManagementContext().getRebindManager().getChangeListener().onUnmanaged(entry.getValue().getManagedBundle());
} else {
bundles.put(entry.getKey(), entry.getValue());
}
@@ -672,6 +673,7 @@ public class CatalogInitialization implements ManagementContextInjectable {
for (CatalogItem<?, ?> legacyCatalogItem : persistedState.getLegacyCatalogItems()) {
if (catalogUpgrades.isLegacyItemRemoved(legacyCatalogItem)) {
rebindLogger.debug("Filtering out persisted legacy catalog item "+legacyCatalogItem.getId());
+ getManagementContext().getRebindManager().getChangeListener().onUnmanaged(legacyCatalogItem);
} else {
legacyCatalogItems.add(legacyCatalogItem);
}