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 2017/09/26 12:17:13 UTC
[8/9] brooklyn-server git commit: expand comments as per PR review
expand comments as per PR review
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/9a01418b
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/9a01418b
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/9a01418b
Branch: refs/heads/master
Commit: 9a01418bcb8e73fef78fefa5a3e42533139bc797
Parents: 2641f44
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Tue Sep 26 13:16:07 2017 +0100
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Tue Sep 26 13:16:07 2017 +0100
----------------------------------------------------------------------
.../apache/brooklyn/core/mgmt/ha/OsgiArchiveInstaller.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/9a01418b/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/OsgiArchiveInstaller.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/OsgiArchiveInstaller.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/OsgiArchiveInstaller.java
index 307dcd9..ff84380 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/OsgiArchiveInstaller.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/OsgiArchiveInstaller.java
@@ -174,7 +174,14 @@ class OsgiArchiveInstaller {
} else {
// if bundle is not brooklyn-managed we want to make it be so
// and for that we need to find a URL.
- // some things declare usable locations, though these might be maven and
+ // the getLocation() _might_ be usable, or might be totally opaque;
+ // in tests we rely on the block below (see system:file:) and things
+ // being explicitly set, but in live and rebind deployments the URL
+ // in practice with karaf how we package it is of the form mvn:...
+ // which _does_ work in this block, so we will be able to do most
+ // things which rely on taking osgi-installed bundles into brooklyn mgmt
+ // (and if not don't think it's a big deal, we just uninstall and reinstall
+ // sometimes or fail with a reasonable error message)
String candidateUrl = existingOsgiInstalledBundle.get().getLocation();
log.debug("Detected bundle "+suppliedKnownBundleMetadata+" installed to OSGi but not Brooklyn; trying to find a URL to get bundle binary, candidate "+candidateUrl);
if (Strings.isBlank(candidateUrl)) {