Build failed in Jenkins: brooklyn-master-build #132

2016-04-13 Thread Apache Jenkins Server
See 

--
[...truncated 47410 lines...]
[INFO] Brooklyn Jclouds Location Targets .. SUCCESS [ 30.902 s]
[INFO] Brooklyn Software Base . SUCCESS [01:36 min]
[INFO] Brooklyn CAMP REST API . SUCCESS [04:42 min]
[INFO] Brooklyn Hazelcast Storage . SUCCESS [  7.974 s]
[INFO] Brooklyn Launcher Common ... SUCCESS [ 11.085 s]
[INFO] Brooklyn REST API .. SUCCESS [ 16.173 s]
[INFO] Brooklyn REST Resources  SUCCESS [01:08 min]
[INFO] Brooklyn REST Server ... SUCCESS [ 29.624 s]
[INFO] Brooklyn Launcher .. SUCCESS [ 55.189 s]
[INFO] Brooklyn Command Line Interface  SUCCESS [ 26.965 s]
[INFO] Brooklyn REST Client ... SUCCESS [ 26.678 s]
[INFO] Brooklyn Test Framework  SUCCESS [01:18 min]
[INFO] Brooklyn OSGi init . SUCCESS [ 11.345 s]
[INFO] Brooklyn Karaf . SUCCESS [  0.634 s]
[INFO] Jetty config fragment .. SUCCESS [  9.465 s]
[INFO] Brooklyn Karaf Features  SUCCESS [  6.647 s]
[INFO] Brooklyn Karaf Distro .. SUCCESS [ 19.662 s]
[INFO] Brooklyn Karaf Shell Commands .. SUCCESS [  7.946 s]
[INFO] Brooklyn Karaf pax-exam itest .. SUCCESS [ 52.850 s]
[INFO] Brooklyn Library Root .. SUCCESS [  2.964 s]
[INFO] Brooklyn CM SaltStack .. SUCCESS [ 12.936 s]
[INFO] Brooklyn CM Ansible  SUCCESS [  9.975 s]
[INFO] Brooklyn CM Integration Root ... SUCCESS [  1.454 s]
[INFO] Brooklyn Network Software Entities . SUCCESS [ 11.480 s]
[INFO] Brooklyn OSGi Software Entities  SUCCESS [ 11.513 s]
[INFO] Brooklyn Database Software Entities  SUCCESS [ 13.632 s]
[INFO] Brooklyn Web App Software Entities . SUCCESS [ 39.439 s]
[INFO] Brooklyn Messaging Software Entities ... SUCCESS [ 15.249 s]
[INFO] Brooklyn NoSQL Data Store Software Entities  SUCCESS [ 33.418 s]
[INFO] Brooklyn Monitoring Software Entities .. SUCCESS [ 11.415 s]
[INFO] Brooklyn QA  SUCCESS [ 25.921 s]
[INFO] Brooklyn Examples Aggregator Project ... SUCCESS [  1.429 s]
[INFO] Brooklyn Examples Aggregator Project - Webapps . SUCCESS [  1.404 s]
[INFO] hello-world-webapp Maven Webapp  SUCCESS [  4.580 s]
[INFO] hello-world-sql-webapp Maven Webapp  SUCCESS [  4.604 s]
[INFO] Brooklyn Simple Web Cluster Example  SUCCESS [ 17.641 s]
[INFO] Brooklyn Global Web Fabric Example . SUCCESS [ 12.159 s]
[INFO] Brooklyn Simple Messaging Publish-Subscribe Example  SUCCESS [ 17.333 s]
[INFO] Brooklyn NoSQL Cluster Examples  SUCCESS [ 13.074 s]
[INFO] Brooklyn Client Command Line Interface . SUCCESS [01:05 min]
[INFO] Brooklyn Downstream Project Parent . SUCCESS [  0.737 s]
[INFO] Brooklyn Dist Root . SUCCESS [  2.150 s]
[INFO] Brooklyn All Things  SUCCESS [  9.682 s]
[INFO] Brooklyn Distribution .. SUCCESS [ 36.001 s]
[INFO] Brooklyn Vagrant Getting Started Environment ... SUCCESS [  2.996 s]
[INFO] Brooklyn Quick-Start Project Archetype . SUCCESS [ 40.093 s]
[INFO] Brooklyn DEB Package ... SUCCESS [ 20.584 s]
[INFO] Brooklyn Root .. SUCCESS [  0.605 s]
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time: 34:23 min
[INFO] Finished at: 2016-04-14T01:30:41+00:00
[INFO] Final Memory: 160M/455M
[INFO] 
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving 

 to 
org.apache.brooklyn/brooklyn-policy/0.10.0-SNAPSHOT/brooklyn-policy-0.10.0-SNAPSHOT.pom
[JENKINS] Archiving 

 to 
org.apache.brooklyn/brooklyn-policy/0.10.0-SNAPSHOT/brooklyn-policy-0.10.0-SNAPSHOT.jar
[JENKINS] Archiving 

 to 
org.apache.broo

Re: Google Summer of Code - PaaS services addition proposal

2016-04-13 Thread Jose Carrasco
Hi all

Firstly, I would like to thank all of you, specially to Andrea and Aled, the 
effort from your side. 

I would like to remind the deadline description which was sent by Aled:

* 2016-04-12: Proposals to ASF projects must be reviewed roughly and
have a potential mentor so that we know how many slots to request.
Proposals that don't have a mentor at this point will be down-rated.
* 2016-04-18: Proposal scoring must be completed. Proposals without a
score will be rejected, no exceptions.
* 2016-04-22: Accepted student proposals announced on the Google
Summer of Code site.

The proposal should be scoring by my mentor and the community (I think) before 
2016-04-18. Please, feel free to read and score the proposal according your 
priorities and requirements. Probably, you will found a form and the required 
documentation in your Web GSoC Application side. I hope that this link about 
Apache ranking process is useful for you. In any case, I am looking forward to 
hearing from you and do not hesitate to ask any question you have. I am really 
happy with this and I, of course, understand you need to review in depth the 
proposal and to take a decision. 

Thanks again.
Best,
Jose

 


El 13/04/2016, a las 08:57, Andrea Turli  
escribió:

> Jose,
> 
> I'm indeed happy to mentor you.
> 
> I will try to add myself as a mentor and will update you shortly.
> 
> Andrea
> 
> On 12 April 2016 at 23:48, Jose Carrasco  wrote:
> 
>> Hi again,
>> 
>> I found this link about becoming a mentor
>> https://community.apache.org/guide-to-being-a-mentor.html
>> 
>> Best,
>> Jose
>> 
>> El 12/04/2016, a las 23:44, Jose Carrasco  escribió:
>> 
>>> Hi,
>>> 
>>> I do not have any link. I uploaded my proposal from a standard form from
>> the web and I selected Apache as a form’s field.
>>> I only have this link
>> https://community.apache.org/gsoc.html#applying-for-gsoc but I think you
>> already know it.
>>> (I sent you in a private email the think to the proposal).
>>> 
>>> Best,
>>> Jose
>>> 
>>> 
>>> El 12/04/2016, a las 23:39, Aled Sage  escribió:
>>> 
 Hi Jose,
 
 The timeline on https://community.apache.org/gsoc.html says the next
>> steps are:
 
 * 2016-04-12: Proposals to ASF projects must be reviewed roughly and
 have a potential mentor so that we know how many slots to request.
 Proposals that don't have a mentor at this point will be down-rated.
 * 2016-04-18: Proposal scoring must be completed. Proposals without a
 score will be rejected, no exceptions.
 * 2016-04-22: Accepted student proposals announced on the Google
 Summer of Code site.
 
 Do you have a link (on the Apache site) to the application you
>> submitted?
 
 Aled
 
 
 On 12/04/2016 22:33, Jose Carrasco wrote:
> Hi Aled.
> 
> I will be very happy to work with Andrea Turli :-)
> I cannot selected  a mentor and I can not see any assigned mentor from
>> my web profile,
> probably it may be added from Apache organization web profile.
> 
> Today it is the last day? Probably an extension will be available a
>> pair of days (I hope). Let me know if I need to do something,
> or sending more information.
> 
> Thanks a lot for your reply.
> Best regards,
> Jose
> 
> 
> 
> El 12/04/2016, a las 23:24, Aled Sage  escribió:
> 
>> Hi Jose,
>> 
>> Thanks for this - sounds like a great idea. I'm sure the community
>> (myself included) will be very happy to support it!
>> 
>> I believe the next step is that you need a mentor in the Brooklyn
>> community. I know that Andrea Turli would be happy to volunteer (I just
>> spoke to him offline).
>> 
>> According to the timeline on https://community.apache.org/gsoc.html:
>> 
>> /2016-04-12: Proposals to ASF projects must be reviewed roughly and
>> have a potential mentor so that we know how many slots to request.
>> Proposals that don't have a mentor at this point will be down-rated./
>> 
>> Can you therefore ensure that your application says you have a
>> mentor, ideally updating it today? (I'm not sure what the process is for
>> this).
>> 
>> Aled
>> 
>> 
>> On 12/04/2016 12:31, Jose Carrasco wrote:
>>> Hi all,
>>> 
>>> I am Jose Carrasco (a.k.a kiuby88).
>>> 
>>> I am very interesting on adding PaaS platform support to the
>> Brooklyn project. I have already forked brooklyn projects and have
>> developed some first approaches to add CloudFoundry to Brooklyn. I opened
>> some PRs, and I obtained an excellent feedback. I would like to update my
>> PRs but I am very busy with the SeaClouds European open-project.
>>> 
>>> I do think PaaS support could be a good feature, and I would like to
>> continue that work. Because of that, I applied to Google Summer of Code to
>> Apache organization. I updated a proposal about PaaS services addition to
>> Brooklyn. I think it is a great opportunity. I know B

[GitHub] brooklyn-server pull request: Feature/runtime files directory

2016-04-13 Thread sjcorbett
GitHub user sjcorbett opened a pull request:

https://github.com/apache/brooklyn-server/pull/114

Feature/runtime files directory

So blueprint writers can replace
```yaml
  brooklyn.config:
runtimeTemplates:
  /path/to/source1: dest1
  /path/to/source2: dest2
  ...
  /path/to/sourceN: destN
```
With
```yaml
  brooklyn.config:
runtimeTemplates:
  /path/to: destinationDir
```
One minor difference: in the first example the two files end up in 
`runDir/` but in the second in `runDir/to/`. If using the latter syntax I think 
this would be expected.

Each file is copied in a task so there's better visibility of what is in 
progress at any given point.

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

$ git pull https://github.com/sjcorbett/brooklyn-server 
feature/runtime-files-directory

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

https://github.com/apache/brooklyn-server/pull/114.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 #114


commit 940388f18fe6db02d508550bc88ffeddc2c94b8b
Author: Sam Corbett 
Date:   2016-04-13T15:55:08Z

Os.isAbsolutish works for blank strings

commit 2f15e17844d9c4d1936975e8d353bfeb1cc0dca3
Author: Sam Corbett 
Date:   2016-04-13T15:44:40Z

AbstractSoftwareProcessDriver copyResources walks the filesystem

Meaning blueprints can refer to directories rather than every file
individually.

Each file is copied in a task so there's better visibility of what is in
progress at any given point.




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59564515
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -168,11 +227,18 @@ private String addLibraryDetails(Bundle bundle, 
String bomText) {
 LOG.warn("Unexpected syntax for {} (expected Map), 
ignoring", BROOKLYN_CATALOG);
 }
 }
-final String updatedBom = new Yaml().dump(bom);
+final String updatedBom = backToYaml(bom);
--- End diff --

That is true, but the formatting added here will hopefully be good enough 
looking to be acceptable.  Certainly worth keeping in mind.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59564287
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -155,9 +181,42 @@ public void removedBundle(Bundle bundle, BundleEvent 
bundleEvent, Iterable> catalogItems) {
+
+final Iterator> cit = 
catalogItems.iterator();
+while (cit.hasNext()) {
+final CatalogItem item = cit.next();
+if (TEMPLATE.equals(item.getCatalogItemType())) {
+removeFromCatalog(item);
+cit.remove();
+}
+}
+}
+
+private boolean passesWhiteAndBlacklists(Bundle bundle) {
+final List white = 
managementContext.getConfig().getConfig(WHITELIST);
+final List black = 
managementContext.getConfig().getConfig(BLACKLIST);
+
+return on(bundle, white) && !on(bundle, black);
+}
+
+private boolean on(Bundle bundle, List list) {
+for (String candidate : list) {
+final String symbolicName = bundle.getSymbolicName();
+if (symbolicName.matches(candidate)) {
--- End diff --

I'll trim the value, it's good to be explicit.  It should work fine with 
just one item.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59563955
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -155,9 +181,42 @@ public void removedBundle(Bundle bundle, BundleEvent 
bundleEvent, Iterable> catalogItems) {
+
+final Iterator> cit = 
catalogItems.iterator();
+while (cit.hasNext()) {
+final CatalogItem item = cit.next();
+if (TEMPLATE.equals(item.getCatalogItemType())) {
+removeFromCatalog(item);
+cit.remove();
--- End diff --

This method modifies its argument, which is ultimately used as a return 
value for addingBundle, which becomes the set of items that is tracked by the 
BundleTracker, so if I remove something from the catalog in here, I also need 
to remove it from the iterable.  This probably this isn't clear enough from the 
code as written, so I shall change this to return a new Iterable rather than 
modify the arg.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59562130
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -74,6 +80,17 @@ public void unbind(ServiceReference 
managementContext) throws
 
 public class CatalogPopulator extends BundleTracker>> {
 
+private final String BROOKLYN_PACKAGE_REGEX = 
"org.apache.brooklyn.*";
+
+private final ConfigKey> WHITELIST =
+ConfigKeys.newConfigKey(new TypeToken>(){}, 
"brooklyn.catalog.osgi.application.whitelist",
+"CSV Whitelist of patterns to match bundle symbolic id if 
bundle is to be permitted to add " +
+"applications (templates) to the catalog", 
ImmutableList.of(BROOKLYN_PACKAGE_REGEX));
+private final ConfigKey> BLACKLIST =
+ConfigKeys.newConfigKey(new TypeToken>(){}, 
"brooklyn.catalog.osgi.application.blacklist",
+"CSV Blacklist of patterns to match bundle symbolic id to 
prevent selected whitelisted bundles " +
+"adding applications (templates) to the catalog", 
ImmutableList.of());
+
--- End diff --

I guess it would be handy enough to add them in that file and then it could 
be referred to in the documentation (will do documentation as a separate PR).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread bostko
Github user bostko commented on the pull request:

https://github.com/apache/brooklyn-server/pull/110#issuecomment-209467839
  
Thank you @neykov most of the comments were addressed.
I am verifying the changes now. It takes some time to wait all of this :)


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Fix NPE in forcePersistNow

2016-04-13 Thread neykov
Github user neykov commented on the pull request:

https://github.com/apache/brooklyn-server/pull/113#issuecomment-209461976
  
Looks like there's a similar problem with `forcePersistNow` for the `full` 
case - should we fix the method in a more general way?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Configurable removal strategies

2016-04-13 Thread neykov
Github user neykov commented on the pull request:

https://github.com/apache/brooklyn-server/pull/112#issuecomment-209458893
  
LGTM, could make it more YAML friendly.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Configurable removal strategies

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/112#discussion_r59552571
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/entity/group/SensorMatchingRemovalStrategy.java
 ---
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.brooklyn.entity.group;
+
+import java.util.Collection;
+import java.util.Objects;
+
+import javax.annotation.Nullable;
+
+import org.apache.brooklyn.api.entity.Entity;
+import org.apache.brooklyn.api.sensor.AttributeSensor;
+import org.apache.brooklyn.config.ConfigKey;
+import org.apache.brooklyn.core.config.ConfigKeys;
+
+import com.google.common.reflect.TypeToken;
+
+public class SensorMatchingRemovalStrategy extends RemovalStrategy {
+public static final ConfigKey SENSOR = 
ConfigKeys.newConfigKey(new TypeToken() {}, 
"sensor.matching.sensor");
+// Would be nice to use ConfigKey, but TypeToken cannot be 
instantiated at runtime
+public static final ConfigKey DESIRED_VALUE = 
ConfigKeys.newConfigKey(new TypeToken() {}, "sensor.matching.value");
--- End diff --

No need for a `TypeToken` here and above, could use class references 
directly.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Configurable removal strategies

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/112#discussion_r59552437
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/entity/group/FirstFromRemovalStrategy.java
 ---
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.brooklyn.entity.group;
+
+import java.util.Collection;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import org.apache.brooklyn.api.entity.Entity;
+import org.apache.brooklyn.config.ConfigKey;
+import org.apache.brooklyn.core.config.ConfigKeys;
+
+import com.google.common.collect.Iterables;
+import com.google.common.reflect.TypeToken;
+
+public class FirstFromRemovalStrategy extends RemovalStrategy {
+
+public static final ConfigKey> STRATEGIES = 
ConfigKeys.newConfigKey(new TypeToken>() {}, 
"firstfrom.strategies",
+"An ordered list of removal strategies to be used to determine 
which entity to remove");
+
+@Nullable
+@Override
+public Entity apply(@Nullable Collection input) {
+List strategies = config().get(STRATEGIES);
--- End diff --

From YAML standpoint would be better if these are set on the cluster 
entity. Could inject the cluster through a method in `RemovalStrategy`, or call 
a static util method (hiding a threadlocal) (yikes I know :) ).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Configurable removal strategies

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/112#discussion_r59550901
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/entity/group/DynamicClusterImpl.java ---
@@ -151,12 +151,14 @@ public ZoneFailureDetector apply(final String input) {
  */
 protected final Object mutex = new Object[0];
 
-private static final Function, Entity> 
defaultRemovalStrategy = new Function, Entity>() {
-@Override public Entity apply(Collection contenders) {
--- End diff --

Rule of thumb is that anything that goes into a config or sensor (or is 
nested in such an object) will get persisted. Looking at the code this is not 
the case, but can never know what an extending class might be doing, so better 
be on the safe side.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (BROOKLYN-250) displayName in location brooklyn.config not being used

2016-04-13 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15239259#comment-15239259
 ] 

ASF GitHub Bot commented on BROOKLYN-250:
-

Github user neykov commented on the pull request:

https://github.com/apache/brooklyn-server/pull/111#issuecomment-209446947
  
LGTM


> displayName in location brooklyn.config not being used
> --
>
> Key: BROOKLYN-250
> URL: https://issues.apache.org/jira/browse/BROOKLYN-250
> Project: Brooklyn
>  Issue Type: Bug
>Affects Versions: 0.9.0
>Reporter: John McCabe
>Priority: Minor
> Attachments: catalog.png, dropdown.png
>
>
> Observed that the {{displayName}} field populated by the location wizard/yaml 
> doesn't appear to be used? For example:
> {code}
> brooklyn.catalog:
>   items:
>   - id: locationid
> itemType: location
> item:
>   type: localhost
>   brooklyn.config:
> displayName: locationname
> {code}
> displays as {{locationid}} rather than {{locationname}} (in dropdown lists 
> and the catalog page), whereas the following
> {code}
> brooklyn.catalog:
>   items:
>   - id: locationid
> itemType: location
> name: locationname
> item:
>   type: localhost
> {code}
> displays the string set in the {{name}} element.
> If {{name}} isn't present it falls back to using the {{id}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] brooklyn-server pull request: pull displayName from flags in Locat...

2016-04-13 Thread neykov
Github user neykov commented on the pull request:

https://github.com/apache/brooklyn-server/pull/111#issuecomment-209446947
  
LGTM


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on the pull request:

https://github.com/apache/brooklyn-server/pull/110#issuecomment-209445859
  
Finished review. The PR was updated while commenting, so part of my 
comments are now marked as outdated. Worth going through each one the confirm 
that its addressed and not rely on github's UI.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59548931
  
--- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 ---
@@ -2742,14 +2743,41 @@ protected LoginCredentials 
waitForWinRmAvailable(final ComputeService computeSer
 Callable checker = new Callable() {
 public Boolean call() {
 for (Map.Entry 
entry : machinesToTry.entrySet()) {
-WinRmMachineLocation machine = entry.getKey();
-WinRmToolResponse response = 
machine.executeCommand(
-
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
-ImmutableList.of("echo testing"));
-boolean success = (response.getStatusCode() == 0);
-if (success) {
-credsSuccessful.set(entry.getValue());
-return true;
+try {
+final WinRmMachineLocation machine = 
entry.getKey();
+WinRmToolResponse response = 
machine.executeCommand(
+
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
+ImmutableList.of("echo testing"));
+boolean success = (response.getStatusCode() == 
0);
+if (success) {
+credsSuccessful.set(entry.getValue());
+Predicate 
pendingReboot = new Predicate() {
+@Override
+public boolean apply(@Nullable 
WinRmMachineLocation machine) {
+WinRmToolResponse response = 
machine.executeCommand("echo test");
+int statusCode = 
response.getStatusCode();
+return statusCode == 0;
+}
+};
+
+String verifyWindowsUp = 
getConfig(WinRmMachineLocation.VERIFY_WINDOWS_UP);
+if (Strings.isBlank(verifyWindowsUp) || 
verifyWindowsUp.equals("false")) {
+return true;
+}
+
+Duration verifyWindowsUpTime = 
Duration.of(verifyWindowsUp);
+
+boolean restartHappened = 
Predicates2.retry(Predicates.not(pendingReboot), 
verifyWindowsUpTime.toSeconds(), 5, 60, TimeUnit.SECONDS).apply(machine);
+
+if (restartHappened) {
+LOG.info("windows machine have 
restarted {}", machine);
+return 
Predicates2.retry(pendingReboot, verifyWindowsUpTime.toSeconds(), 5, 60, 
TimeUnit.SECONDS).apply(machine);
+} else {
+return true;
+}
+}
+} catch (Exception e) {
+LOG.warn("winrm checker exception", e);
--- End diff --

It's at `warn` level, so might improve the message a bit. For example 
"Waiting for machine xxx to be up for xxx time failed after initial 
connectivity test was successfull". Is this try-catch even needed if the 
`retry`s are wrapped individually?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59548168
  
--- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 ---
@@ -2742,14 +2743,41 @@ protected LoginCredentials 
waitForWinRmAvailable(final ComputeService computeSer
 Callable checker = new Callable() {
 public Boolean call() {
 for (Map.Entry 
entry : machinesToTry.entrySet()) {
-WinRmMachineLocation machine = entry.getKey();
-WinRmToolResponse response = 
machine.executeCommand(
-
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
-ImmutableList.of("echo testing"));
-boolean success = (response.getStatusCode() == 0);
-if (success) {
-credsSuccessful.set(entry.getValue());
-return true;
+try {
+final WinRmMachineLocation machine = 
entry.getKey();
+WinRmToolResponse response = 
machine.executeCommand(
+
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
+ImmutableList.of("echo testing"));
+boolean success = (response.getStatusCode() == 
0);
+if (success) {
+credsSuccessful.set(entry.getValue());
+Predicate 
pendingReboot = new Predicate() {
+@Override
+public boolean apply(@Nullable 
WinRmMachineLocation machine) {
+WinRmToolResponse response = 
machine.executeCommand("echo test");
+int statusCode = 
response.getStatusCode();
+return statusCode == 0;
+}
+};
+
+String verifyWindowsUp = 
getConfig(WinRmMachineLocation.VERIFY_WINDOWS_UP);
+if (Strings.isBlank(verifyWindowsUp) || 
verifyWindowsUp.equals("false")) {
+return true;
+}
+
+Duration verifyWindowsUpTime = 
Duration.of(verifyWindowsUp);
+
+boolean restartHappened = 
Predicates2.retry(Predicates.not(pendingReboot), 
verifyWindowsUpTime.toSeconds(), 5, 60, TimeUnit.SECONDS).apply(machine);
--- End diff --

What type of exception is thrown when the predicate can't connect to the 
machine? `retry` will suppress only a specific set of exceptions, rethrowing 
the rest which will prevent the following code from executing. Suggest wrapping 
this in a try-catch and treating non-fatal exceptions as `restartHappened=true`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread bostko
Github user bostko commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59548283
  
--- Diff: 
software/winrm/src/main/java/org/apache/brooklyn/location/winrm/WinRmMachineLocation.java
 ---
@@ -80,6 +81,9 @@
 public static final ConfigKey OPERATION_TIMEOUT = 
newConfigKeyWithPrefix(BrooklynConfigKeys.BROOKLYN_WINRM_CONFIG_KEY_PREFIX, 
WinRmTool.OPERATION_TIMEOUT);
 public static final ConfigKey RETRIES_OF_NETWORK_FAILURES = 
newConfigKeyWithPrefix(BrooklynConfigKeys.BROOKLYN_WINRM_CONFIG_KEY_PREFIX, 
WinRmTool.RETRIES_OF_NETWORK_FAILURES);
 public static final ConfigKey USE_HTTPS_WINRM = 
WinRmTool.USE_HTTPS_WINRM;
+public static final ConfigKey VERIFY_WINDOWS_UP = 
newStringConfigKey("verifyWindowsUp",
--- End diff --

@neykov in `WAIT_FOR_SSHABLE` and `WAIT_FOR_WINRM_AVAILABLE` it is used 
that way, the use case is when set a non null default value and if you want to 
override it with false.
It skips the retries if null as well.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59547487
  
--- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 ---
@@ -2742,14 +2743,41 @@ protected LoginCredentials 
waitForWinRmAvailable(final ComputeService computeSer
 Callable checker = new Callable() {
 public Boolean call() {
 for (Map.Entry 
entry : machinesToTry.entrySet()) {
-WinRmMachineLocation machine = entry.getKey();
-WinRmToolResponse response = 
machine.executeCommand(
-
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
-ImmutableList.of("echo testing"));
-boolean success = (response.getStatusCode() == 0);
-if (success) {
-credsSuccessful.set(entry.getValue());
-return true;
+try {
+final WinRmMachineLocation machine = 
entry.getKey();
+WinRmToolResponse response = 
machine.executeCommand(
+
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
+ImmutableList.of("echo testing"));
+boolean success = (response.getStatusCode() == 
0);
+if (success) {
+credsSuccessful.set(entry.getValue());
+Predicate 
pendingReboot = new Predicate() {
+@Override
+public boolean apply(@Nullable 
WinRmMachineLocation machine) {
+WinRmToolResponse response = 
machine.executeCommand("echo test");
+int statusCode = 
response.getStatusCode();
+return statusCode == 0;
+}
+};
+
+String verifyWindowsUp = 
getConfig(WinRmMachineLocation.VERIFY_WINDOWS_UP);
+if (Strings.isBlank(verifyWindowsUp) || 
verifyWindowsUp.equals("false")) {
+return true;
+}
+
+Duration verifyWindowsUpTime = 
Duration.of(verifyWindowsUp);
+
+boolean restartHappened = 
Predicates2.retry(Predicates.not(pendingReboot), 
verifyWindowsUpTime.toSeconds(), 5, 60, TimeUnit.SECONDS).apply(machine);
+
+if (restartHappened) {
+LOG.info("windows machine have 
restarted {}", machine);
+return 
Predicates2.retry(pendingReboot, verifyWindowsUpTime.toSeconds(), 5, 60, 
TimeUnit.SECONDS).apply(machine);
--- End diff --

Better to use milliseconds - not practical to set such low values on the 
config, but it's possible. Better handle it - not much of a difference for the 
code.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59547577
  
--- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 ---
@@ -2742,14 +2743,41 @@ protected LoginCredentials 
waitForWinRmAvailable(final ComputeService computeSer
 Callable checker = new Callable() {
 public Boolean call() {
 for (Map.Entry 
entry : machinesToTry.entrySet()) {
-WinRmMachineLocation machine = entry.getKey();
-WinRmToolResponse response = 
machine.executeCommand(
-
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
-ImmutableList.of("echo testing"));
-boolean success = (response.getStatusCode() == 0);
-if (success) {
-credsSuccessful.set(entry.getValue());
-return true;
+try {
+final WinRmMachineLocation machine = 
entry.getKey();
+WinRmToolResponse response = 
machine.executeCommand(
+
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
+ImmutableList.of("echo testing"));
+boolean success = (response.getStatusCode() == 
0);
+if (success) {
+credsSuccessful.set(entry.getValue());
+Predicate 
pendingReboot = new Predicate() {
+@Override
+public boolean apply(@Nullable 
WinRmMachineLocation machine) {
+WinRmToolResponse response = 
machine.executeCommand("echo test");
+int statusCode = 
response.getStatusCode();
+return statusCode == 0;
+}
+};
+
+String verifyWindowsUp = 
getConfig(WinRmMachineLocation.VERIFY_WINDOWS_UP);
+if (Strings.isBlank(verifyWindowsUp) || 
verifyWindowsUp.equals("false")) {
+return true;
+}
+
+Duration verifyWindowsUpTime = 
Duration.of(verifyWindowsUp);
+
+boolean restartHappened = 
Predicates2.retry(Predicates.not(pendingReboot), 
verifyWindowsUpTime.toSeconds(), 5, 60, TimeUnit.SECONDS).apply(machine);
+
+if (restartHappened) {
+LOG.info("windows machine have 
restarted {}", machine);
+return 
Predicates2.retry(pendingReboot, verifyWindowsUpTime.toSeconds(), 5, 60, 
TimeUnit.SECONDS).apply(machine);
+} else {
+return true;
+}
+}
+} catch (Exception e) {
+LOG.warn("winrm checker exception", e);
--- End diff --

Add `Exceptions.propagateIfFatal(e)`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59547127
  
--- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 ---
@@ -2742,14 +2743,41 @@ protected LoginCredentials 
waitForWinRmAvailable(final ComputeService computeSer
 Callable checker = new Callable() {
 public Boolean call() {
 for (Map.Entry 
entry : machinesToTry.entrySet()) {
-WinRmMachineLocation machine = entry.getKey();
-WinRmToolResponse response = 
machine.executeCommand(
-
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
-ImmutableList.of("echo testing"));
-boolean success = (response.getStatusCode() == 0);
-if (success) {
-credsSuccessful.set(entry.getValue());
-return true;
+try {
+final WinRmMachineLocation machine = 
entry.getKey();
+WinRmToolResponse response = 
machine.executeCommand(
+
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
+ImmutableList.of("echo testing"));
+boolean success = (response.getStatusCode() == 
0);
+if (success) {
+credsSuccessful.set(entry.getValue());
+Predicate 
pendingReboot = new Predicate() {
+@Override
+public boolean apply(@Nullable 
WinRmMachineLocation machine) {
+WinRmToolResponse response = 
machine.executeCommand("echo test");
+int statusCode = 
response.getStatusCode();
+return statusCode == 0;
+}
+};
+
+String verifyWindowsUp = 
getConfig(WinRmMachineLocation.VERIFY_WINDOWS_UP);
+if (Strings.isBlank(verifyWindowsUp) || 
verifyWindowsUp.equals("false")) {
+return true;
+}
+
+Duration verifyWindowsUpTime = 
Duration.of(verifyWindowsUp);
+
+boolean restartHappened = 
Predicates2.retry(Predicates.not(pendingReboot), 
verifyWindowsUpTime.toSeconds(), 5, 60, TimeUnit.SECONDS).apply(machine);
+
+if (restartHappened) {
+LOG.info("windows machine have 
restarted {}", machine);
--- End diff --

It's more accurate to say that we have lost connectivity to the machine. 
Also mention that will wait for xxx time for it to come back.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59546879
  
--- Diff: 
software/winrm/src/main/java/org/apache/brooklyn/location/winrm/WinRmMachineLocation.java
 ---
@@ -80,6 +81,9 @@
 public static final ConfigKey OPERATION_TIMEOUT = 
newConfigKeyWithPrefix(BrooklynConfigKeys.BROOKLYN_WINRM_CONFIG_KEY_PREFIX, 
WinRmTool.OPERATION_TIMEOUT);
 public static final ConfigKey RETRIES_OF_NETWORK_FAILURES = 
newConfigKeyWithPrefix(BrooklynConfigKeys.BROOKLYN_WINRM_CONFIG_KEY_PREFIX, 
WinRmTool.RETRIES_OF_NETWORK_FAILURES);
 public static final ConfigKey USE_HTTPS_WINRM = 
WinRmTool.USE_HTTPS_WINRM;
+public static final ConfigKey VERIFY_WINDOWS_UP = 
newStringConfigKey("verifyWindowsUp",
+"Sometimes restart could happen after a Windows VM is 
provisioned. This could be because of System Upgrade or other." +
+" Brooklyn will wait 5 minutes for a restart to happen before 
returning the machine as accessible.", null);
--- End diff --

Improve description. Remove mention of 5 minutes - you are not setting a 
default value.
Also the code could block for double the time set in this config if the 
machine doesn't come back.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59545659
  
--- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 ---
@@ -2742,14 +2743,41 @@ protected LoginCredentials 
waitForWinRmAvailable(final ComputeService computeSer
 Callable checker = new Callable() {
 public Boolean call() {
 for (Map.Entry 
entry : machinesToTry.entrySet()) {
-WinRmMachineLocation machine = entry.getKey();
-WinRmToolResponse response = 
machine.executeCommand(
-
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
-ImmutableList.of("echo testing"));
-boolean success = (response.getStatusCode() == 0);
-if (success) {
-credsSuccessful.set(entry.getValue());
-return true;
+try {
+final WinRmMachineLocation machine = 
entry.getKey();
+WinRmToolResponse response = 
machine.executeCommand(
+
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
+ImmutableList.of("echo testing"));
+boolean success = (response.getStatusCode() == 
0);
+if (success) {
+credsSuccessful.set(entry.getValue());
+Predicate 
pendingReboot = new Predicate() {
--- End diff --

A more proper name would be the reverse - `machineReachable`. It returns 
true of the command executes successfully.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59544904
  
--- Diff: 
software/winrm/src/main/java/org/apache/brooklyn/location/winrm/WinRmMachineLocation.java
 ---
@@ -80,6 +81,9 @@
 public static final ConfigKey OPERATION_TIMEOUT = 
newConfigKeyWithPrefix(BrooklynConfigKeys.BROOKLYN_WINRM_CONFIG_KEY_PREFIX, 
WinRmTool.OPERATION_TIMEOUT);
 public static final ConfigKey RETRIES_OF_NETWORK_FAILURES = 
newConfigKeyWithPrefix(BrooklynConfigKeys.BROOKLYN_WINRM_CONFIG_KEY_PREFIX, 
WinRmTool.RETRIES_OF_NETWORK_FAILURES);
 public static final ConfigKey USE_HTTPS_WINRM = 
WinRmTool.USE_HTTPS_WINRM;
+public static final ConfigKey VERIFY_WINDOWS_UP = 
newStringConfigKey("verifyWindowsUp",
--- End diff --

OK, now I see that you are treating it as both of the above :). Still think 
that typing it as a `Duration` and skipping retries if null is the way to go.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59544306
  
--- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 ---
@@ -2742,14 +2743,41 @@ protected LoginCredentials 
waitForWinRmAvailable(final ComputeService computeSer
 Callable checker = new Callable() {
 public Boolean call() {
 for (Map.Entry 
entry : machinesToTry.entrySet()) {
-WinRmMachineLocation machine = entry.getKey();
-WinRmToolResponse response = 
machine.executeCommand(
-
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
-ImmutableList.of("echo testing"));
-boolean success = (response.getStatusCode() == 0);
-if (success) {
-credsSuccessful.set(entry.getValue());
-return true;
+try {
+final WinRmMachineLocation machine = 
entry.getKey();
+WinRmToolResponse response = 
machine.executeCommand(
+
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
+ImmutableList.of("echo testing"));
+boolean success = (response.getStatusCode() == 
0);
+if (success) {
+credsSuccessful.set(entry.getValue());
+Predicate 
pendingReboot = new Predicate() {
+@Override
+public boolean apply(@Nullable 
WinRmMachineLocation machine) {
+WinRmToolResponse response = 
machine.executeCommand("echo test");
+int statusCode = 
response.getStatusCode();
+return statusCode == 0;
+}
+};
+
+String verifyWindowsUp = 
getConfig(WinRmMachineLocation.VERIFY_WINDOWS_UP);
+if (Strings.isBlank(verifyWindowsUp) || 
verifyWindowsUp.equals("false")) {
+return true;
--- End diff --

(minor) This block could be moved before creating the predicate.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59544168
  
--- Diff: 
software/winrm/src/main/java/org/apache/brooklyn/location/winrm/WinRmMachineLocation.java
 ---
@@ -80,6 +81,9 @@
 public static final ConfigKey OPERATION_TIMEOUT = 
newConfigKeyWithPrefix(BrooklynConfigKeys.BROOKLYN_WINRM_CONFIG_KEY_PREFIX, 
WinRmTool.OPERATION_TIMEOUT);
 public static final ConfigKey RETRIES_OF_NETWORK_FAILURES = 
newConfigKeyWithPrefix(BrooklynConfigKeys.BROOKLYN_WINRM_CONFIG_KEY_PREFIX, 
WinRmTool.RETRIES_OF_NETWORK_FAILURES);
 public static final ConfigKey USE_HTTPS_WINRM = 
WinRmTool.USE_HTTPS_WINRM;
+public static final ConfigKey VERIFY_WINDOWS_UP = 
newStringConfigKey("verifyWindowsUp",
--- End diff --

Or even better the timeout value (`Duration`), null for no wait.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Wait windows up time parameter.

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/110#discussion_r59544043
  
--- Diff: 
software/winrm/src/main/java/org/apache/brooklyn/location/winrm/WinRmMachineLocation.java
 ---
@@ -80,6 +81,9 @@
 public static final ConfigKey OPERATION_TIMEOUT = 
newConfigKeyWithPrefix(BrooklynConfigKeys.BROOKLYN_WINRM_CONFIG_KEY_PREFIX, 
WinRmTool.OPERATION_TIMEOUT);
 public static final ConfigKey RETRIES_OF_NETWORK_FAILURES = 
newConfigKeyWithPrefix(BrooklynConfigKeys.BROOKLYN_WINRM_CONFIG_KEY_PREFIX, 
WinRmTool.RETRIES_OF_NETWORK_FAILURES);
 public static final ConfigKey USE_HTTPS_WINRM = 
WinRmTool.USE_HTTPS_WINRM;
+public static final ConfigKey VERIFY_WINDOWS_UP = 
newStringConfigKey("verifyWindowsUp",
--- End diff --

Should be a `Boolean` with a default value `Boolean.FALSE`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Deprecate BashCommands.ifExecutableE...

2016-04-13 Thread neykov
Github user neykov commented on the pull request:

https://github.com/apache/brooklyn-server/pull/109#issuecomment-209426674
  
That's a nice improvement, clears up the intended usage. A few minor 
changes needed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Deprecate BashCommands.ifExecutableE...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/109#discussion_r59542960
  
--- Diff: 
utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -235,17 +235,33 @@ public static String onlyIfExecutableMissing(String 
executable, String command)
 return alternativesGroup(format("which %s", executable), command);
 }
 
-public static String ifExecutableElse(String command, String ifTrue, 
String otherwise) {
+/**
+ * @deprecated As of release 0.9.0, replaced by {@link 
#ifExecutableDoesNotExistElse(String, String, String)}
+ */
+@Deprecated
+public static String ifExecutableElse(String command, String 
ifNotExist, String ifExist) {
+return ifExecutableDoesNotExistElse(command, ifNotExist, ifExist);
+}
+
+public static String ifExecutableDoesNotExistElse(String command, 
String ifNotExist, String ifExist) {
 return com.google.common.base.Joiner.on('\n').join(
-ifExecutableElse(command, 
ImmutableList.of(ifTrue), ImmutableList.of(otherwise)));
+ifExecutableDoesNotExistElse(command, 
ImmutableList.of(ifNotExist), ImmutableList.of(ifExist)));
+}
+
+/**
+ * @deprecated  As of release 0.9.0, replaced by {@link 
#ifExecutableDoesNotExistElse(String, List, List)}
+ */
+@Deprecated
+public ImmutableList ifExecutableElse(String command, 
List ifNotExist, List ifExist) {
--- End diff --

Should be static.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Deprecate BashCommands.ifExecutableE...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/109#discussion_r59542746
  
--- Diff: 
utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -235,17 +235,33 @@ public static String onlyIfExecutableMissing(String 
executable, String command)
 return alternativesGroup(format("which %s", executable), command);
 }
 
-public static String ifExecutableElse(String command, String ifTrue, 
String otherwise) {
+/**
+ * @deprecated As of release 0.9.0, replaced by {@link 
#ifExecutableDoesNotExistElse(String, String, String)}
+ */
+@Deprecated
+public static String ifExecutableElse(String command, String 
ifNotExist, String ifExist) {
+return ifExecutableDoesNotExistElse(command, ifNotExist, ifExist);
+}
+
+public static String ifExecutableDoesNotExistElse(String command, 
String ifNotExist, String ifExist) {
 return com.google.common.base.Joiner.on('\n').join(
-ifExecutableElse(command, 
ImmutableList.of(ifTrue), ImmutableList.of(otherwise)));
+ifExecutableDoesNotExistElse(command, 
ImmutableList.of(ifNotExist), ImmutableList.of(ifExist)));
+}
+
+/**
+ * @deprecated  As of release 0.9.0, replaced by {@link 
#ifExecutableDoesNotExistElse(String, List, List)}
--- End diff --

Same 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Deprecate BashCommands.ifExecutableE...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/109#discussion_r59542719
  
--- Diff: 
utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -235,17 +235,33 @@ public static String onlyIfExecutableMissing(String 
executable, String command)
 return alternativesGroup(format("which %s", executable), command);
 }
 
-public static String ifExecutableElse(String command, String ifTrue, 
String otherwise) {
+/**
+ * @deprecated As of release 0.9.0, replaced by {@link 
#ifExecutableDoesNotExistElse(String, String, String)}
--- End diff --

Will be merged in the 0.10.0 master, so needs updating.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59542324
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -168,11 +227,18 @@ private String addLibraryDetails(Bundle bundle, 
String bomText) {
 LOG.warn("Unexpected syntax for {} (expected Map), 
ignoring", BROOKLYN_CATALOG);
 }
 }
-final String updatedBom = new Yaml().dump(bom);
+final String updatedBom = backToYaml(bom);
--- End diff --

Something that I didn't consider before when discussing this approach is 
that parsing and re-serializing the yaml will change its formatting. Not a 
problem for Brooklyn internals, but will be surprising to users when viewing 
the plan in the catalog. Not to be addressed in this PR, but we should keep it 
in mind.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59541706
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -155,9 +181,42 @@ public void removedBundle(Bundle bundle, BundleEvent 
bundleEvent, Iterable> catalogItems) {
+
+final Iterator> cit = 
catalogItems.iterator();
+while (cit.hasNext()) {
+final CatalogItem item = cit.next();
+if (TEMPLATE.equals(item.getCatalogItemType())) {
+removeFromCatalog(item);
+cit.remove();
--- End diff --

(minor) No need for an iterator & removing the items from `catalogItems`. 
`removeFromCatalog` does all that's needed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59540999
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -155,9 +181,42 @@ public void removedBundle(Bundle bundle, BundleEvent 
bundleEvent, Iterable> catalogItems) {
+
+final Iterator> cit = 
catalogItems.iterator();
+while (cit.hasNext()) {
+final CatalogItem item = cit.next();
+if (TEMPLATE.equals(item.getCatalogItemType())) {
+removeFromCatalog(item);
+cit.remove();
+}
+}
+}
+
+private boolean passesWhiteAndBlacklists(Bundle bundle) {
+final List white = 
managementContext.getConfig().getConfig(WHITELIST);
+final List black = 
managementContext.getConfig().getConfig(BLACKLIST);
+
+return on(bundle, white) && !on(bundle, black);
+}
+
+private boolean on(Bundle bundle, List list) {
+for (String candidate : list) {
+final String symbolicName = bundle.getSymbolicName();
+if (symbolicName.matches(candidate)) {
--- End diff --

Do we need to trim the individual values? Or does that already happen in 
the coercion step? What if there's just only one item?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: lower minimum Vagrant version to 1.8.0

2016-04-13 Thread johnmccabe
Github user johnmccabe closed the pull request at:

https://github.com/apache/brooklyn-dist/pull/30


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59540009
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -137,9 +153,19 @@ public void removedBundle(Bundle bundle, BundleEvent 
bundleEvent, Iterable item) {
+try {
+
getManagementContext().getCatalog().deleteCatalogItem(item.getSymbolicName(), 
item.getVersion());
+} catch (Exception e) {
+LOG.warn("Failed to remove {} {} from catalog as {}", new 
String[] {
+item.getSymbolicName(), item.getVersion(), 
e.getMessage()
--- End diff --

Why not pass the exception as a throwable argument to log, instead of 
including the message only. Could mask an underlying problem (for example NPE 
will have an empty message).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: lower minimum Vagrant version to 1.8.0

2016-04-13 Thread johnmccabe
Github user johnmccabe commented on the pull request:

https://github.com/apache/brooklyn-dist/pull/30#issuecomment-209410323
  
Closing


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59539820
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -121,12 +138,11 @@ public void removedBundle(Bundle bundle, BundleEvent 
bundleEvent, Iterable item : items) {
 LOG.debug("Unloading {} {} from catalog", 
item.getSymbolicName(), item.getVersion());
 
 try {
-catalog.deleteCatalogItem(item.getSymbolicName(), 
item.getVersion());
+removeFromCatalog(item);
 } catch (Exception e) {
--- End diff --

try-catch not needed any more.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59539285
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -137,9 +153,19 @@ public void removedBundle(Bundle bundle, BundleEvent 
bundleEvent, Iterable item) {
+try {
+
getManagementContext().getCatalog().deleteCatalogItem(item.getSymbolicName(), 
item.getVersion());
+} catch (Exception e) {
+LOG.warn("Failed to remove {} {} from catalog as {}", new 
String[] {
--- End diff --

`propagateIfFatal` got lost in the rebase. Better insert it as the first 
expression after the catch.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59539139
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -74,6 +80,17 @@ public void unbind(ServiceReference 
managementContext) throws
 
 public class CatalogPopulator extends BundleTracker>> {
 
+private final String BROOKLYN_PACKAGE_REGEX = 
"org.apache.brooklyn.*";
+
+private final ConfigKey> WHITELIST =
+ConfigKeys.newConfigKey(new TypeToken>(){}, 
"brooklyn.catalog.osgi.application.whitelist",
+"CSV Whitelist of patterns to match bundle symbolic id if 
bundle is to be permitted to add " +
+"applications (templates) to the catalog", 
ImmutableList.of(BROOKLYN_PACKAGE_REGEX));
+private final ConfigKey> BLACKLIST =
+ConfigKeys.newConfigKey(new TypeToken>(){}, 
"brooklyn.catalog.osgi.application.blacklist",
+"CSV Blacklist of patterns to match bundle symbolic id to 
prevent selected whitelisted bundles " +
+"adding applications (templates) to the catalog", 
ImmutableList.of());
+
--- End diff --

Since this is a configuration set at dist build time do you think it will 
be better if set in 
[`org.apache.brooklyn.osgilauncher.cfg`](https://github.com/apache/brooklyn-server/blob/master/karaf/init/src/main/resources/OSGI-INF/blueprint/blueprint.xml#L33)?
 

`brooklyn.properties` is reserved for users, so they will have to add this 
key themselves.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59538603
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -74,6 +80,17 @@ public void unbind(ServiceReference 
managementContext) throws
 
 public class CatalogPopulator extends BundleTracker>> {
 
+private final String BROOKLYN_PACKAGE_REGEX = 
"org.apache.brooklyn.*";
+
+private final ConfigKey> WHITELIST =
+ConfigKeys.newConfigKey(new TypeToken>(){}, 
"brooklyn.catalog.osgi.application.whitelist",
+"CSV Whitelist of patterns to match bundle symbolic id if 
bundle is to be permitted to add " +
--- End diff --

Mention that regexes are accepted.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59538521
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -74,6 +80,17 @@ public void unbind(ServiceReference 
managementContext) throws
 
 public class CatalogPopulator extends BundleTracker>> {
 
+private final String BROOKLYN_PACKAGE_REGEX = 
"org.apache.brooklyn.*";
+
+private final ConfigKey> WHITELIST =
+ConfigKeys.newConfigKey(new TypeToken>(){}, 
"brooklyn.catalog.osgi.application.whitelist",
+"CSV Whitelist of patterns to match bundle symbolic id if 
bundle is to be permitted to add " +
+"applications (templates) to the catalog", 
ImmutableList.of(BROOKLYN_PACKAGE_REGEX));
--- End diff --

That's a very good point. Will update.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: lower minimum Vagrant version to 1.8.0

2016-04-13 Thread neykov
Github user neykov commented on the pull request:

https://github.com/apache/brooklyn-dist/pull/30#issuecomment-209406371
  
Works for me.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: lower minimum Vagrant version to 1.8.0

2016-04-13 Thread johnmccabe
Github user johnmccabe commented on the pull request:

https://github.com/apache/brooklyn-dist/pull/30#issuecomment-209404907
  
Feels like a bad move to hack around a fixed bug in `1.8.0` that has been 
addressed in `1.8.1` - tempted to close the PR and leave as-is here but add a 
comment to the getting started steps. wdyt?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: Add catalog.bom application white/bl...

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/106#discussion_r59538390
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
@@ -74,6 +80,17 @@ public void unbind(ServiceReference 
managementContext) throws
 
 public class CatalogPopulator extends BundleTracker>> {
 
+private final String BROOKLYN_PACKAGE_REGEX = 
"org.apache.brooklyn.*";
+
+private final ConfigKey> WHITELIST =
+ConfigKeys.newConfigKey(new TypeToken>(){}, 
"brooklyn.catalog.osgi.application.whitelist",
+"CSV Whitelist of patterns to match bundle symbolic id if 
bundle is to be permitted to add " +
+"applications (templates) to the catalog", 
ImmutableList.of(BROOKLYN_PACKAGE_REGEX));
--- End diff --

If I am evaluating Brooklyn and load my own bundle in the container I'd 
expect that its `catalog.bom` is picked up out of the box. I think Brooklyn 
should accept all bundles, letting downstream distributions set their own 
policy.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: lower minimum Vagrant version to 1.8.0

2016-04-13 Thread johnmccabe
Github user johnmccabe commented on the pull request:

https://github.com/apache/brooklyn-dist/pull/30#issuecomment-209401424
  
Ah ok, missed that, I'll ping you when I submit a fix.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: lower minimum Vagrant version to 1.8.0

2016-04-13 Thread neykov
Github user neykov commented on the pull request:

https://github.com/apache/brooklyn-dist/pull/30#issuecomment-209400171
  
`1.8.0` won't work unless all env keys & values are strings, see this 
comment https://github.com/apache/brooklyn-dist/pull/30#issuecomment-205778386



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: lower minimum Vagrant version to 1.8.0

2016-04-13 Thread johnmccabe
Github user johnmccabe commented on the pull request:

https://github.com/apache/brooklyn-dist/pull/30#issuecomment-209399633
  
@neykov is there anything else I need to do before we merge this?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Brooklyn repos read-only

2016-04-13 Thread Richard Downer
This will be related to a problem I had yesterday -
https://issues.apache.org/jira/browse/INFRA-11663

I've updated your ticket with a link.

Richard.


On 13 April 2016 at 12:46, Svetoslav Neykov <
svetoslav.ney...@cloudsoftcorp.com> wrote:

> Trying to merge PRs in Brooklyn's repos fails with an error "Command 'git
> config hooks.asfgit.protect' returned non-zero exit status 1".
> Filed a ticket with Infra -
> https://issues.apache.org/jira/browse/INFRA-11673 <
> https://issues.apache.org/jira/browse/INFRA-11673>
>
> Svet.


Brooklyn repos read-only

2016-04-13 Thread Svetoslav Neykov
Trying to merge PRs in Brooklyn's repos fails with an error "Command 'git 
config hooks.asfgit.protect' returned non-zero exit status 1".
Filed a ticket with Infra - https://issues.apache.org/jira/browse/INFRA-11673 


Svet.

[GitHub] brooklyn-dist pull request: Populate catalog from bundle bom

2016-04-13 Thread geomacy
Github user geomacy commented on the pull request:

https://github.com/apache/brooklyn-dist/pull/26#issuecomment-209382589
  
That's more like it.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-docs pull request: Fixes handling of undefined values in ...

2016-04-13 Thread sjcorbett
GitHub user sjcorbett opened a pull request:

https://github.com/apache/brooklyn-docs/pull/45

Fixes handling of undefined values in templates

https://brooklyn.apache.org/learnmore/catalog is currently broken for 
entities with config keys without default values (e.g. 
[BrooklynNode](https://brooklyn.apache.org/learnmore/catalog/catalog-item.html#!entities/org.apache.brooklyn.entity.brooklynnode.BrooklynNode)).

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

$ git pull https://github.com/sjcorbett/brooklyn-docs fix/catalog

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

https://github.com/apache/brooklyn-docs/pull/45.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 #45


commit 4d7ad3bff29eef707bf9e4ed67cfc7881987cee0
Author: Sam Corbett 
Date:   2016-04-13T11:34:43Z

Fixes handling of undefined values in templates




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: Populate catalog from bundle bom

2016-04-13 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-dist/pull/26#discussion_r59532598
  
--- Diff: 
archetypes/quickstart/src/brooklyn-sample/src/main/resources/catalog.bom ---
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+brooklyn.catalog:
+version: 0.10.0 # BROOKLYN_VERSION
--- End diff --

Dang, of course. Will fix.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: Populate catalog from bundle bom

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-dist/pull/26#discussion_r59531395
  
--- Diff: 
archetypes/quickstart/src/brooklyn-sample/src/main/resources/catalog.bom ---
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+brooklyn.catalog:
+version: 0.10.0 # BROOKLYN_VERSION
--- End diff --

Should be -SNAPSHOT, as done in brooklyn-library


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-library pull request: Populate catalog from bundle bom

2016-04-13 Thread geomacy
Github user geomacy commented on the pull request:

https://github.com/apache/brooklyn-library/pull/25#issuecomment-209363921
  
Changes squashed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: Populate catalog from bundle bom

2016-04-13 Thread geomacy
Github user geomacy commented on the pull request:

https://github.com/apache/brooklyn-dist/pull/26#issuecomment-209362988
  
Version updated and commits squashed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-library pull request: Populate catalog from bundle bom

2016-04-13 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-library/pull/25#discussion_r59521509
  
--- Diff: software/webapp/src/main/resources/catalog.bom ---
@@ -0,0 +1,234 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+brooklyn.catalog:
+version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION
+items:
+- id: org.apache.brooklyn.entity.webapp.nodejs.NodeJsWebAppService
+  item:
+type: org.apache.brooklyn.entity.webapp.nodejs.NodeJsWebAppService
+name: Node.JS Application
+- id: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server
+  item:
+type: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server
+name: JBoss Application Server 7
+description: AS7 - an open source Java application server from 
JBoss
+- id: org.apache.brooklyn.entity.proxy.nginx.UrlMapping
+  item:
+type: org.apache.brooklyn.entity.proxy.nginx.UrlMapping
+- id: org.apache.brooklyn.entity.webapp.DynamicWebAppFabric
+  item:
+type: org.apache.brooklyn.entity.webapp.DynamicWebAppFabric
+- id: org.apache.brooklyn.entity.proxy.nginx.NginxController
+  item:
+type: org.apache.brooklyn.entity.proxy.nginx.NginxController
+name: Nginx Server
+description: A single Nginx server. Provides HTTP and reverse 
proxy services
+- id: org.apache.brooklyn.entity.webapp.jboss.JBoss6Server
+  item:
+type: org.apache.brooklyn.entity.webapp.jboss.JBoss6Server
+name: JBoss Application Server 6
+description: AS6 -  an open source Java application server from 
JBoss
+- id: org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server
+  item:
+type: org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server
+name: Tomcat Server
+- id: org.apache.brooklyn.entity.proxy.LoadBalancerCluster
+  item:
+type: org.apache.brooklyn.entity.proxy.LoadBalancerCluster
+- id: org.apache.brooklyn.entity.webapp.jetty.Jetty6Server
+  item:
+type: org.apache.brooklyn.entity.webapp.jetty.Jetty6Server
+name: Jetty6 Server
+description: Old version (v6 @ Mortbay) of the popular Jetty 
webapp container
+- id: org.apache.brooklyn.entity.webapp.DynamicWebAppCluster
+  item:
+type: org.apache.brooklyn.entity.webapp.DynamicWebAppCluster
+name: Dynamic Web-app Cluster
+description: A cluster of web-apps, which can be dynamically 
re-sized; this does not include a load-balancer
+- id: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
+  item:
+type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
+name: Tomcat Server
+- id: org.apache.brooklyn.entity.dns.geoscaling.GeoscalingDnsService
+  item:
+type: 
org.apache.brooklyn.entity.dns.geoscaling.GeoscalingDnsService
+- id: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
+  item:
+type: 
org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
+name: Controlled Dynamic Web-app Cluster
+description: A cluster of load-balanced web-apps, which can be 
dynamically re-sized
+
+- id: load-balancer
+  description: |
+Create a load balancer which will point at members in the group 
entity
+referred to by the config key "serverPool".
+The sensor advertising the port can be configured with the 
"member.sensor.portNumber" config key,
+defaulting to `http.port`; all member entities which have 
published "service.up" will then be picked up.
+  item:
+type: org.apache.brooklyn.entity.proxy.nginx.NginxController
+name: Load Balancer (nginx)
+
+- id: resilient-bash-web-cluster-template
--- End diff --

It is done on purpose, for the moment - it would be nice to have catalog 
inclusions, but as far as I'm aware t

[GitHub] brooklyn-library pull request: Populate catalog from bundle bom

2016-04-13 Thread neykov
Github user neykov commented on the pull request:

https://github.com/apache/brooklyn-library/pull/25#issuecomment-209336944
  
Can you squash.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: Populate catalog from bundle bom

2016-04-13 Thread neykov
Github user neykov commented on the pull request:

https://github.com/apache/brooklyn-dist/pull/26#issuecomment-209337233
  
Also could you squash the commits.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: Populate catalog from bundle bom

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-dist/pull/26#discussion_r59518879
  
--- Diff: 
archetypes/quickstart/src/brooklyn-sample/src/main/resources/catalog.bom ---
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+brooklyn.catalog:
+version: 0.9.0
+scanJavaAnnotations: true
--- End diff --

Can you remove.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-dist pull request: Populate catalog from bundle bom

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-dist/pull/26#discussion_r59518971
  
--- Diff: 
archetypes/quickstart/src/brooklyn-sample/src/main/resources/catalog.bom ---
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+brooklyn.catalog:
+version: 0.9.0
--- End diff --

Can you do the same change as you already did elsewhere (updating to 
current Brooklyn version & adding the version marker).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-library pull request: Populate catalog from bundle bom

2016-04-13 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-library/pull/25#discussion_r59519309
  
--- Diff: software/webapp/src/main/resources/catalog.bom ---
@@ -0,0 +1,234 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+brooklyn.catalog:
+version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION
+items:
+- id: org.apache.brooklyn.entity.webapp.nodejs.NodeJsWebAppService
+  item:
+type: org.apache.brooklyn.entity.webapp.nodejs.NodeJsWebAppService
+name: Node.JS Application
+- id: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server
+  item:
+type: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server
+name: JBoss Application Server 7
+description: AS7 - an open source Java application server from 
JBoss
+- id: org.apache.brooklyn.entity.proxy.nginx.UrlMapping
+  item:
+type: org.apache.brooklyn.entity.proxy.nginx.UrlMapping
+- id: org.apache.brooklyn.entity.webapp.DynamicWebAppFabric
+  item:
+type: org.apache.brooklyn.entity.webapp.DynamicWebAppFabric
+- id: org.apache.brooklyn.entity.proxy.nginx.NginxController
+  item:
+type: org.apache.brooklyn.entity.proxy.nginx.NginxController
+name: Nginx Server
+description: A single Nginx server. Provides HTTP and reverse 
proxy services
+- id: org.apache.brooklyn.entity.webapp.jboss.JBoss6Server
+  item:
+type: org.apache.brooklyn.entity.webapp.jboss.JBoss6Server
+name: JBoss Application Server 6
+description: AS6 -  an open source Java application server from 
JBoss
+- id: org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server
+  item:
+type: org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server
+name: Tomcat Server
+- id: org.apache.brooklyn.entity.proxy.LoadBalancerCluster
+  item:
+type: org.apache.brooklyn.entity.proxy.LoadBalancerCluster
+- id: org.apache.brooklyn.entity.webapp.jetty.Jetty6Server
+  item:
+type: org.apache.brooklyn.entity.webapp.jetty.Jetty6Server
+name: Jetty6 Server
+description: Old version (v6 @ Mortbay) of the popular Jetty 
webapp container
+- id: org.apache.brooklyn.entity.webapp.DynamicWebAppCluster
+  item:
+type: org.apache.brooklyn.entity.webapp.DynamicWebAppCluster
+name: Dynamic Web-app Cluster
+description: A cluster of web-apps, which can be dynamically 
re-sized; this does not include a load-balancer
+- id: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
+  item:
+type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
+name: Tomcat Server
+- id: org.apache.brooklyn.entity.dns.geoscaling.GeoscalingDnsService
+  item:
+type: 
org.apache.brooklyn.entity.dns.geoscaling.GeoscalingDnsService
+- id: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
+  item:
+type: 
org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
+name: Controlled Dynamic Web-app Cluster
+description: A cluster of load-balanced web-apps, which can be 
dynamically re-sized
+
+- id: load-balancer
+  description: |
+Create a load balancer which will point at members in the group 
entity
+referred to by the config key "serverPool".
+The sensor advertising the port can be configured with the 
"member.sensor.portNumber" config key,
+defaulting to `http.port`; all member entities which have 
published "service.up" will then be picked up.
+  item:
+type: org.apache.brooklyn.entity.proxy.nginx.NginxController
+name: Load Balancer (nginx)
+
+- id: resilient-bash-web-cluster-template
--- End diff --

Is this duplicating `default.catalog.bom` from the dist on purpose? 
Would have been nice if we supported ca

[GitHub] brooklyn-server pull request: [OSGi] Load properties from config a...

2016-04-13 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/107#discussion_r59513542
  
--- Diff: 
karaf/init/src/main/java/org/apache/brooklyn/launcher/osgi/OsgiLauncher.java ---
@@ -23,36 +26,78 @@
 import org.apache.brooklyn.core.internal.BrooklynProperties;
 import org.apache.brooklyn.core.mgmt.persist.PersistMode;
 import org.apache.brooklyn.launcher.common.BasicLauncher;
+import org.apache.brooklyn.launcher.common.BrooklynPropertiesFactoryHelper;
 import org.apache.brooklyn.rest.BrooklynWebConfig;
 import 
org.apache.brooklyn.rest.security.provider.BrooklynUserWithRandomPasswordSecurityProvider;
+import org.apache.brooklyn.util.exceptions.Exceptions;
 import org.apache.brooklyn.util.javalang.Threads;
+import org.apache.brooklyn.util.text.Strings;
 import org.apache.brooklyn.util.time.Duration;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Initializer for brooklyn-core when running in an OSGi environment.
- *
- * Temporarily here; should be totally contained in blueprint beans' 
init-methods.
  */
 public class OsgiLauncher extends BasicLauncher {
 
 private static final Logger LOG = 
LoggerFactory.getLogger(OsgiLauncher.class);
+public static final String BROOKLYN_CONFIG_PID = "brooklyn";
--- End diff --

I also think it doesn't really matter too much either way.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request: [OSGi] Load properties from config a...

2016-04-13 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/107#discussion_r59513491
  
--- Diff: 
karaf/init/src/main/java/org/apache/brooklyn/launcher/osgi/OsgiLauncher.java ---
@@ -23,36 +26,78 @@
 import org.apache.brooklyn.core.internal.BrooklynProperties;
 import org.apache.brooklyn.core.mgmt.persist.PersistMode;
 import org.apache.brooklyn.launcher.common.BasicLauncher;
+import org.apache.brooklyn.launcher.common.BrooklynPropertiesFactoryHelper;
 import org.apache.brooklyn.rest.BrooklynWebConfig;
 import 
org.apache.brooklyn.rest.security.provider.BrooklynUserWithRandomPasswordSecurityProvider;
+import org.apache.brooklyn.util.exceptions.Exceptions;
 import org.apache.brooklyn.util.javalang.Threads;
+import org.apache.brooklyn.util.text.Strings;
 import org.apache.brooklyn.util.time.Duration;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Initializer for brooklyn-core when running in an OSGi environment.
- *
- * Temporarily here; should be totally contained in blueprint beans' 
init-methods.
  */
 public class OsgiLauncher extends BasicLauncher {
 
 private static final Logger LOG = 
LoggerFactory.getLogger(OsgiLauncher.class);
+public static final String BROOKLYN_CONFIG_PID = "brooklyn";
--- End diff --

I don't think we need to feel strictly constrained to using package style 
naming, 'org.apache.brooklyn'.  It's certainly appropriate if the configuration 
is for a module, where the package style is needed to distinguish itself from 
others that might have the same basename, e.g. x.y.z.core.security.cfg versus 
x.y.z.software.base.security.cfg. In this case however we're configuring the 
whole product, rather than a module. I think we can be a bit flexible here for 
the convenience of the simpler file name.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (BROOKLYN-255) Add public and private PaaS support to Brooklyn

2016-04-13 Thread Andrea Turli (JIRA)
Andrea Turli created BROOKLYN-255:
-

 Summary: Add public and private PaaS support to Brooklyn
 Key: BROOKLYN-255
 URL: https://issues.apache.org/jira/browse/BROOKLYN-255
 Project: Brooklyn
  Issue Type: New Feature
Reporter: Andrea Turli
Assignee: Andrea Turli






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Google Summer of Code - PaaS services addition proposal

2016-04-13 Thread Jose
Hi

It would be wonderful :)
Please, write me if you need some information.

Best, 
JoseEl 13/4/2016 8:57 a. m., Andrea Turli  
escribió:
>
> Jose, 
>
> I'm indeed happy to mentor you. 
>
> I will try to add myself as a mentor and will update you shortly. 
>
> Andrea 
>
> On 12 April 2016 at 23:48, Jose Carrasco  wrote: 
>
> > Hi again, 
> > 
> > I found this link about becoming a mentor 
> > https://community.apache.org/guide-to-being-a-mentor.html 
> > 
> > Best, 
> > Jose 
> > 
> > El 12/04/2016, a las 23:44, Jose Carrasco  escribió: 
> > 
> > > Hi, 
> > > 
> > > I do not have any link. I uploaded my proposal from a standard form from 
> > the web and I selected Apache as a form’s field. 
> > > I only have this link 
> > https://community.apache.org/gsoc.html#applying-for-gsoc but I think you 
> > already know it. 
> > > (I sent you in a private email the think to the proposal). 
> > > 
> > > Best, 
> > > Jose 
> > > 
> > > 
> > > El 12/04/2016, a las 23:39, Aled Sage  escribió: 
> > > 
> > >> Hi Jose, 
> > >> 
> > >> The timeline on https://community.apache.org/gsoc.html says the next 
> > steps are: 
> > >> 
> > >> * 2016-04-12: Proposals to ASF projects must be reviewed roughly and 
> > >>  have a potential mentor so that we know how many slots to request. 
> > >>  Proposals that don't have a mentor at this point will be down-rated. 
> > >> * 2016-04-18: Proposal scoring must be completed. Proposals without a 
> > >>  score will be rejected, no exceptions. 
> > >> * 2016-04-22: Accepted student proposals announced on the Google 
> > >>  Summer of Code site. 
> > >> 
> > >> Do you have a link (on the Apache site) to the application you 
> > submitted? 
> > >> 
> > >> Aled 
> > >> 
> > >> 
> > >> On 12/04/2016 22:33, Jose Carrasco wrote: 
> > >>> Hi Aled. 
> > >>> 
> > >>> I will be very happy to work with Andrea Turli :-) 
> > >>> I cannot selected  a mentor and I can not see any assigned mentor from 
> > my web profile, 
> > >>> probably it may be added from Apache organization web profile. 
> > >>> 
> > >>> Today it is the last day? Probably an extension will be available a 
> > pair of days (I hope). Let me know if I need to do something, 
> > >>> or sending more information. 
> > >>> 
> > >>> Thanks a lot for your reply. 
> > >>> Best regards, 
> > >>> Jose 
> > >>> 
> > >>> 
> > >>> 
> > >>> El 12/04/2016, a las 23:24, Aled Sage  escribió: 
> > >>> 
> >  Hi Jose, 
> >  
> >  Thanks for this - sounds like a great idea. I'm sure the community 
> > (myself included) will be very happy to support it! 
> >  
> >  I believe the next step is that you need a mentor in the Brooklyn 
> > community. I know that Andrea Turli would be happy to volunteer (I just 
> > spoke to him offline). 
> >  
> >  According to the timeline on https://community.apache.org/gsoc.html: 
> >  
> >   /2016-04-12: Proposals to ASF projects must be reviewed roughly and 
> >   have a potential mentor so that we know how many slots to request. 
> >   Proposals that don't have a mentor at this point will be down-rated./ 
> >  
> >  Can you therefore ensure that your application says you have a 
> > mentor, ideally updating it today? (I'm not sure what the process is for 
> > this). 
> >  
> >  Aled 
> >  
> >  
> >  On 12/04/2016 12:31, Jose Carrasco wrote: 
> > > Hi all, 
> > > 
> > > I am Jose Carrasco (a.k.a kiuby88). 
> > > 
> > > I am very interesting on adding PaaS platform support to the 
> > Brooklyn project. I have already forked brooklyn projects and have 
> > developed some first approaches to add CloudFoundry to Brooklyn. I opened 
> > some PRs, and I obtained an excellent feedback. I would like to update my 
> > PRs but I am very busy with the SeaClouds European open-project. 
> > > 
> > > I do think PaaS support could be a good feature, and I would like to 
> > continue that work. Because of that, I applied to Google Summer of Code to 
> > Apache organization. I updated a proposal about PaaS services addition to 
> > Brooklyn. I think it is a great opportunity. I know Brooklyn a quite well 
> > (because I have develop some new entities for SeaClouds), and I have also 
> > collaborated on cloudsoft/brooklyn-tosca project. I am really interested on 
> > this. Probably I should have written previously to the application for 
> > Google Summer of Code, but I decided it too late and the application’s 
> > deadline was so close..  I do not know if I can put the proposal link here. 
> > But if you are interesting I will be happy send it to you. 
> > > 
> > > I am looking forward to hearing from you and do not hesitate to ask 
> > any question you have. 
> > > 
> > > Best regards, 
> > > Jose Carrasco 
> > >> 
> > > 
> > 
> >