You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Ignasi Barrera <no...@github.com> on 2016/09/02 09:44:38 UTC
[jclouds/jclouds-karaf] JCLOUDS-1156: Shade the jsch-agentproxy-jsch
bundle (#77)
https://issues.apache.org/jira/browse/JCLOUDS-1156
I've shaded the offending bundle and shaded it to remove the invalid export. I did this by adding a `bundles` project where we can put our own bundles if we get into similar situations in the future.
With this fix, I've been able to properly register compute services, but there is an issue in the output of the commands. As you can see below, the commands are executed but produce no output. it actually fetches the results (each empty line is a result) but they are not printed. The same command run outside CLI shell produces a proper output.
@demobox Good to merge the exports fix? We can fix the output thing in an upcoming PR.
@ccustine @iocanel Could you give us some hint on what could be going on with the output of the commands?
```bash
jclouds> jclouds:compute-service-create --provider profitbricks --identity **** --credential **** --name pb
Waiting for compute service with name: pb.
jclouds> jclouds:compute-service-list
Compute APIs:
-------------
[id] [type] [service]
ec2 compute [ ]
stub compute [ ]
Compute Providers:
------------------
[id] [type] [service]
aws-ec2 compute [ ]
profitbricks compute [ pb ]
jclouds> jclouds:location-list --provider profitbricks --name pb
[id] [scope] [description] [parent]
$ ./jclouds location list --provider profitbricks --identity **** --credential ****
[id] [scope] [description] [parent]
us/las ZONE us/las us
us REGION us profitbricks
de REGION de profitbricks
de/fra ZONE de/fra de
de/fkb ZONE de/fkb de
profitbricks PROVIDER https://api.profitbricks.com/1.3
us/lasdev ZONE us/lasdev us
```
You can view, comment on, or merge this pull request online at:
https://github.com/jclouds/jclouds-karaf/pull/77
-- Commit Summary --
* JCLOUDS-1156: Shade the jsch-agentproxy-jsch bundle
-- File Changes --
A bundles/jsch-agentproxy-jsch/pom.xml (93)
A bundles/pom.xml (36)
M feature/src/main/resources/feature.xml (2)
M pom.xml (1)
-- Patch Links --
https://github.com/jclouds/jclouds-karaf/pull/77.patch
https://github.com/jclouds/jclouds-karaf/pull/77.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> @@ -23,6 +23,7 @@ limitations under the License.
> <artifactId>chef</artifactId>
> <groupId>org.apache.jclouds.karaf</groupId>
> <version>2.0.0-SNAPSHOT</version>
> + <relativePath>../..</relativePath>
See comment below
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686084
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> +(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.
> +-->
> +
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> + <parent>
> + <artifactId>jclouds-karaf</artifactId>
> + <groupId>org.apache.jclouds</groupId>
[nit] Artifact ID after group ID? Just because we seem to do that elsewhere, too
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77427302
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
rebuild please
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244338358
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> @@ -23,6 +23,7 @@ limitations under the License.
> <artifactId>chef</artifactId>
> <groupId>org.apache.jclouds.karaf</groupId>
> <version>2.0.0-SNAPSHOT</version>
> + <relativePath>../..</relativePath>
I don't think this is correct - the `chef` artifact is indeed one level up
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686003
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
@nacx pushed 1 commit.
ee48960 Add relative paths to maven parent in all modules
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/3f9003886b501991e34bd3d84373a85ae7e93d32..ee4896065371024725828b023367e6b35ba12e9f
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> + 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.
> +-->
> +
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> + <modelVersion>4.0.0</modelVersion>
> + <parent>
> + <groupId>org.apache.jclouds</groupId>
> + <artifactId>jclouds-karaf</artifactId>
> + <version>2.0.0-SNAPSHOT</version>
> + <relativePath>../..</relativePath>
For `chef`, submodules depend on the immediate parent, which would be `bundles`, in this case. Do that here too?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686274
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
@demobox Addressed the review comments.
I've also been able to fix the display issue, but I'm pretty sure it is not the best solution. The problem is that the [scriptEngine](https://github.com/jclouds/jclouds-karaf/blob/master/commands/src/main/java/org/jclouds/karaf/commands/table/internal/ScriptEngineShellTable.java#L40) is not loaded and is always `null` when running in the interactive shell, which results in silently printing [null values](https://github.com/jclouds/jclouds-karaf/blob/master/commands/src/main/java/org/jclouds/karaf/commands/table/internal/ScriptEngineShellTable.java#L49-L58) when a NPE occurs.
I've spent these days trying to figure out why the "groovy" engine (the [default one](https://github.com/jclouds/jclouds-karaf/blob/master/commands/src/main/java/org/jclouds/karaf/commands/table/BasicShellTableFactory.java#L42)) can't be loaded in interactive mode, but with no success at all. I've tried changing it to "JavaScript", as it is bundled in the JRE since Java 6, but it failed to load it too. I've also copied the classes mentioned [here](https://devnotesblog.wordpress.com/2011/09/07/scripting-using-jsr-223-in-an-osgi-environment/) but that didn't worked. I don't really know how to properly fix this.
The workaround is to explicitly load the Groovy engine (have a look at the last commit) if no engine can be loaded. This way we keep our default engine and the only possible issue would be users manually configuring a different engine and working in interactive mode. If the expressions they use to render the columns in the command output are not compatible with Groovy, the output won't be rendeded. Anyway, I think it is a reasonable fallback. WDYT @demobox?
@ccustine @iocanel I would really appreciate your feedback on this! :)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244901813
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
@nacx Quick ping on the comments here?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244759266
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
You're right. The dependency was no longer needed so I've removed it.
> The message is a warning rather than an error, so I think we should be good to ignore it...but then again, I'm hardly the expert ;-)
Neither am I, so let's assume it is good to ignore it as long as the functionality we care about is working?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-245229265
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> + <Import-Package>${import.packages}</Import-Package>
> + </instructions>
> + </configuration>
> + </plugin>
> + <plugin>
> + <groupId>org.apache.maven.plugins</groupId>
> + <artifactId>maven-shade-plugin</artifactId>
> + <version>2.4.3</version>
> + <executions>
> + <execution>
> + <phase>package</phase>
> + <goals>
> + <goal>shade</goal>
> + </goals>
> + <configuration>
> + <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
Curious whether this might be a default value that we could omit?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77427353
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> +
> + <groupId>org.apache.jclouds.karaf.bundles</groupId>
> + <artifactId>jsch-agentproxy-jsch</artifactId>
> + <name>jclouds :: Karaf :: JSCH Agentproxy Shaded Bundle</name>
> + <packaging>bundle</packaging>
> +
> + <dependencies>
> + <dependency>
> + <groupId>org.apache.servicemix.bundles</groupId>
> + <artifactId>org.apache.servicemix.bundles.jsch-agentproxy-jsch</artifactId>
> + <version>${jsch.agentproxy.bundle.version}</version>
> + </dependency>
> + </dependencies>
> +
> + <properties>
> + <import.packages>
Just to ensure I'm understanding what's going on: with this property, we're effectively "overriding" the import package spec from the original bundle and packaging up all the code with a manifest resulting from this?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77427329
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> @@ -468,11 +469,6 @@ limitations under the License.
>
> <!-- JSch agentproxy -->
> <dependency>
> - <groupId>org.apache.servicemix.bundles</groupId>
> - <artifactId>org.apache.servicemix.bundles.jsch-agentproxy-jsch</artifactId>
> - <version>${jsch.agentproxy.bundle.version}</version>
Can this property (i.e. `jsch.agentproxy.bundle.version`) go too?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/c2ec97b044018464a713d89b65edb342703af918#r77874201
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
> + <Import-Package>${import.packages}</Import-Package>
> + </instructions>
> + </configuration>
> + </plugin>
> + <plugin>
> + <groupId>org.apache.maven.plugins</groupId>
> + <artifactId>maven-shade-plugin</artifactId>
> + <version>2.4.3</version>
> + <executions>
> + <execution>
> + <phase>package</phase>
> + <goals>
> + <goal>shade</goal>
> + </goals>
> + <configuration>
> + <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
The shade plugin puts the reduced pom in the root directory (not in `target`) and the RAT plugin complains about it. This way we ignore it and we don't commit it to the SCM.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77601104
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> @@ -23,6 +23,7 @@ limitations under the License.
> <artifactId>chef</artifactId>
> <groupId>org.apache.jclouds.karaf</groupId>
> <version>2.0.0-SNAPSHOT</version>
> + <relativePath>../..</relativePath>
See comment below
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686093
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> The problem is that the scriptEngine is not loaded and is always null when running in the interactive shell, which results in silently printing null values when a NPE occurs.
Which value is passed in for the `engine` parameter? From your explanation and what I can see in the code, the problem is that `scriptEngineFactory.getEngineByName` is no longer returning anything? If so, do we know whether we are passing the correct argument to that method?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244949211
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
Removed the offending commit that screwed up the poms and changed the parent of the bundles one. Also moved the engine fix to https://github.com/jclouds/jclouds-karaf/pull/78
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-245096702
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> @@ -21,6 +21,7 @@ limitations under the License.
> <artifactId>jclouds-karaf</artifactId>
> <groupId>org.apache.jclouds</groupId>
> <version>2.0.0-SNAPSHOT</version>
> + <relativePath>..</relativePath>
Isn't that the default value?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686126
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
Thanks for putting this together, @nacx! Just minors and nits from me - can be taken care of during the merge, I think.
Independently of this PR: now that we have the framework for including shaded bundles relatively easily, perhaps worth considering making one that applies ymnk/jsch-agent-proxy#24 and then switching back to SSHJ?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244515404
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> BTW, regarding the shaded bundle fix, it works, but there is still this error when the CLI starts:
From [this example of `startup.properties`](https://github.com/apache/karaf/blob/karaf-2.3.11/assemblies/apache-karaf/src/main/filtered-resources/etc/startup.properties#L75), it looks like we're simply not importing/starting some of the features that would be necessary for this.
The message is a warning rather than an error, so I _think_ we should be good to ignore it...but then again, I'm hardly the expert ;-)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-245168756
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
Squashed, rebased, addressed last minor comment and pushed to master as [00ff5d21](http://git-wip-us.apache.org/repos/asf/jclouds-karaf/commit/00ff5d21).
Thanks for all the help @demobox!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-245534105
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
>Independently of this PR: now that we have the framework for including shaded bundles relatively easily, perhaps worth considering making one that applies ymnk/jsch-agent-proxy#24 and then switching back to SSHJ?
Absolutely. Let's address that in another PR.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244902646
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
> @@ -468,11 +469,6 @@ limitations under the License.
>
> <!-- JSch agentproxy -->
> <dependency>
> - <groupId>org.apache.servicemix.bundles</groupId>
> - <artifactId>org.apache.servicemix.bundles.jsch-agentproxy-jsch</artifactId>
> - <version>${jsch.agentproxy.bundle.version}</version>
Nope. It is used [here](https://github.com/jclouds/jclouds-karaf/pull/77/files#diff-dd692a9b30ef09ae1bdc70c053148e11R36) to import the dependency to shade.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/c2ec97b044018464a713d89b65edb342703af918#r77890120
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
The question I would have at this point is whether this ever worked? I'd be surprised if it was broken all the way from the time it was implemented. So I wonder what has changed (on the Felix side?) to break this?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244950309
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
Thanks for the changes, @nacx! Just one more additional thing that I noticed while working on this: the dependency on `org.apache.servicemix.bundles.jsch-agentproxy-jsch` in the root POM can probably be removed too.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-245133735
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
Closed #77.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#event-782069903
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> @@ -468,11 +469,6 @@ limitations under the License.
>
> <!-- JSch agentproxy -->
> <dependency>
> - <groupId>org.apache.servicemix.bundles</groupId>
> - <artifactId>org.apache.servicemix.bundles.jsch-agentproxy-jsch</artifactId>
> - <version>${jsch.agentproxy.bundle.version}</version>
> Nope. It is used here to import the dependency to shade.
Ah, OK, thanks for explaining!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/c2ec97b044018464a713d89b65edb342703af918#r77952835
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> +
> +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.
> +-->
> +
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> + <parent>
> + <artifactId>jclouds-karaf</artifactId>
> + <groupId>org.apache.jclouds</groupId>
> + <version>2.0.0-SNAPSHOT</version>
> + <relativePath>../..</relativePath>
> + </parent>
> + <modelVersion>4.0.0</modelVersion>
[nit] Have this above the parent (also in the other POMs here) - seems to be what we do in the [project POM](https://github.com/jclouds/jclouds/blob/master/pom.xml)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77427398
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> so let's assume it is good to ignore it as long as the functionality we care about is working?
Sounds like a plan ;-)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-245366418
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> + <Import-Package>${import.packages}</Import-Package>
> + </instructions>
> + </configuration>
> + </plugin>
> + <plugin>
> + <groupId>org.apache.maven.plugins</groupId>
> + <artifactId>maven-shade-plugin</artifactId>
> + <version>2.4.3</version>
> + <executions>
> + <execution>
> + <phase>package</phase>
> + <goals>
> + <goal>shade</goal>
> + </goals>
> + <configuration>
> + <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
> This way we ignore it and we don't commit it to the SCM.
Ah, clear - this is **not** the default value, in other words. Thanks for clarifying!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77632459
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
> +
> + <groupId>org.apache.jclouds.karaf.bundles</groupId>
> + <artifactId>jsch-agentproxy-jsch</artifactId>
> + <name>jclouds :: Karaf :: JSCH Agentproxy Shaded Bundle</name>
> + <packaging>bundle</packaging>
> +
> + <dependencies>
> + <dependency>
> + <groupId>org.apache.servicemix.bundles</groupId>
> + <artifactId>org.apache.servicemix.bundles.jsch-agentproxy-jsch</artifactId>
> + <version>${jsch.agentproxy.bundle.version}</version>
> + </dependency>
> + </dependencies>
> +
> + <properties>
> + <import.packages>
Right. We deliberately remove the "exports", since that was the offending part. The resulting Manifest is a good one to be used here.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77600971
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> + 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.
> +-->
> +
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> + <modelVersion>4.0.0</modelVersion>
> + <parent>
> + <groupId>org.apache.jclouds</groupId>
> + <artifactId>jclouds-karaf</artifactId>
> + <version>2.0.0-SNAPSHOT</version>
> + <relativePath>..</relativePath>
Isn't this the default value?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686166
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> +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.
> +-->
> +
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> + <parent>
> + <artifactId>jclouds-karaf</artifactId>
> + <groupId>org.apache.jclouds</groupId>
> + <version>2.0.0-SNAPSHOT</version>
> + <relativePath>..</relativePath>
> + </parent>
> + <modelVersion>4.0.0</modelVersion>
> +
> + <groupId>org.apache.jclouds.karaf</groupId>
> + <artifactId>shaded-bundles</artifactId>
[minor] Call this "bundles" too? There may be "real" bundles here in future. Or rename the directory to "shaded-bundles" instead?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77427377
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
@nacx Suggestion: break out the "fix output" issue out into a different JIRA issue and PR? I think that's a slightly different discussion from the bundle fix that this PR is about?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-245035065
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
Thanks for the updates, @nacx! [This minor comment](https://github.com/jclouds/jclouds-karaf/pull/77/files/c2ec97b044018464a713d89b65edb342703af918#r77740874) would be the only one I still have, but that could be taken care of during the merge, or ignored.
Looks good to me!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-245507784
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> + <Import-Package>${import.packages}</Import-Package>
> + </instructions>
> + </configuration>
> + </plugin>
> + <plugin>
> + <groupId>org.apache.maven.plugins</groupId>
> + <artifactId>maven-shade-plugin</artifactId>
> + <version>2.4.3</version>
> + <executions>
> + <execution>
> + <phase>package</phase>
> + <goals>
> + <goal>shade</goal>
> + </goals>
> + <configuration>
> + <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
Thought: add a comment to clarify this? Something like
```
<!-- the RAT plugin complains if we use the default location -->
```
?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77740874
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
We are not passing any value. The [default configuration](https://github.com/jclouds/jclouds-karaf/blob/master/feature/src/main/resources/shell.cfg) does not set the engine value, so "groovy" was used (which seems to be the [right value](https://github.com/groovy/groovy-core/blob/master/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java#L44)). I've also tried setting custom values there and directly instantiating the javascript engine classes provided by the JRE, but both tests failed.
>but nothing happened? Were you able to query the OSGiScriptEngineManager to see which engines it had been able to load?
Yes. Well, there is no default constructor for that class; it requires the BundleContext. I tried getting the context by calling the OSGI `FrameworkUtil` to get and pass it to the engine. However, it couldn't load the engines. I'm pretty sure I was doing something wrong here, as I don't know enough about OSGi to be confident about what I was doing :)
>The question I would have at this point is whether this ever worked? I'd be surprised if it was broken all the way from the time it was implemented. So I wonder what has changed (on the Felix side?) to break this?
I really don't know. Honestly, I've never used the interactive shell except for installing features for other providers, so I have never tried. I don't know if there were relevant changes that might have broken this.
BTW, regarding the shaded bundle fix, it works, but there is still this error when the CLI starts:
```
$ cat karaf.log
Sep 06, 2016 3:28:20 PM org.apache.karaf.main.SimpleFileLock lock
INFO: locking
2016-09-06 15:28:21,596 | INFO | FelixStartLevel | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.4.2 | Updating configuration from org.apache.jclouds.credentials.cfg
2016-09-06 15:28:21,866 | INFO | FelixStartLevel | BlueprintExtender | rint.container.BlueprintExtender 146 | 12 - org.apache.aries.blueprint.core - 1.4.0 | No quiesce support is available, so blueprint components will not participate in quiesce operations
2016-09-06 15:28:22,953 | WARN | FelixStartLevel | ConsoleFactory | ell.console.jline.ConsoleFactory 193 | 15 - org.apache.karaf.shell.console - 2.3.9 | Error starting ssh agent for local console
java.lang.NoClassDefFoundError: org/apache/sshd/agent/SshAgent
at org.apache.karaf.shell.console.jline.ConsoleFactory.startAgent(ConsoleFactory.java:186)[15:org.apache.karaf.shell.console:2.3.9]
at org.apache.karaf.shell.console.jline.ConsoleFactory.doStart(ConsoleFactory.java:118)[15:org.apache.karaf.shell.console:2.3.9]
at org.apache.karaf.shell.console.jline.ConsoleFactory$1.run(ConsoleFactory.java:91)
at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_51]
at javax.security.auth.Subject.doAs(Subject.java:415)[:1.7.0_51]
at org.apache.karaf.shell.console.jline.ConsoleFactory.start(ConsoleFactory.java:89)[15:org.apache.karaf.shell.console:2.3.9]
at org.apache.karaf.shell.console.jline.ConsoleFactory.registerCommandProcessor(ConsoleFactory.java:68)[15:org.apache.karaf.shell.console:2.3.9]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$Listener.invokeMethods(AbstractServiceReferenceRecipe.java:574)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$Listener.bind(AbstractServiceReferenceRecipe.java:556)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.bind(AbstractServiceReferenceRecipe.java:451)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.ReferenceRecipe.bind(ReferenceRecipe.java:168)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.ReferenceRecipe.retrack(ReferenceRecipe.java:136)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.updateListeners(AbstractServiceReferenceRecipe.java:443)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:115)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[12:org.apache.aries.blueprint.core:1.4.0]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_51]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:681)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:378)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:245)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:235)[12:org.apache.aries.blueprint.core:1.4.0]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[11:org.apache.aries.util:1.1.0]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[11:org.apache.aries.util:1.1.0]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[11:org.apache.aries.util:1.1.0]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[11:org.apache.aries.util:1.1.0]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[11:org.apache.aries.util:1.1.0]
at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:1923)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)[org.apache.felix.framework-4.0.3.jar:]
at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]
Caused by: java.lang.ClassNotFoundException: org.apache.sshd.agent.SshAgent not found by org.apache.karaf.shell.console [15]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_51]
... 43 more
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244952651
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> @@ -23,6 +23,7 @@ limitations under the License.
> <artifactId>chef</artifactId>
> <groupId>org.apache.jclouds.karaf</groupId>
> <version>2.0.0-SNAPSHOT</version>
> + <relativePath>../..</relativePath>
See comment below
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/fc62962216847e92c464638902993b7231a17a25#r77686061
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
@nacx pushed 1 commit.
c2ec97b Removed unneeded dependency
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/5f4d9d15ede060019c0170ad476b79a45c8819a4..c2ec97b044018464a713d89b65edb342703af918
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> I've also copied the classes mentioned here but that didn't work...
Just to confirm: you followed the instructions in that blog post and replaced
```
private final ScriptEngineManager scriptEngineFactory = new ScriptEngineManager();
```
with
```
private final ScriptEngineManager scriptEngineFactory = new OSGiScriptEngineManager();
```
but nothing happened? Were you able to query the `OSGiScriptEngineManager` to see which engines it had been able to load?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77#issuecomment-244950033
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
@nacx pushed 1 commit.
5f4d9d1 Fixed parent pom
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/228233239da796ee8c8b00692923fe57b3b47e22..5f4d9d15ede060019c0170ad476b79a45c8819a4
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Andrew Phillips <no...@github.com>.
> +See the License for the specific language governing permissions and
> +limitations under the License.
> +-->
> +
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> + <parent>
> + <artifactId>jclouds-karaf</artifactId>
> + <groupId>org.apache.jclouds</groupId>
> + <version>2.0.0-SNAPSHOT</version>
> + <relativePath>../..</relativePath>
> + </parent>
> + <modelVersion>4.0.0</modelVersion>
> +
> + <groupId>org.apache.jclouds.karaf.bundles</groupId>
> + <artifactId>jsch-agentproxy-jsch</artifactId>
> + <name>jclouds :: Karaf :: JSCH Agentproxy Shaded Bundle</name>
[nit] I think it's "JSch" - see http://www.jcraft.com/jsch/
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f#r77427313
Re: [jclouds/jclouds-karaf] JCLOUDS-1156: Shade the
jsch-agentproxy-jsch bundle (#77)
Posted by Ignasi Barrera <no...@github.com>.
@nacx pushed 2 commits.
9c7d134 Addressed review comments
fc62962 Explicitly fallback to the Groocy scripting engine
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/77/files/ee4896065371024725828b023367e6b35ba12e9f..fc62962216847e92c464638902993b7231a17a25