Re: Contribute to jClouds(HypervisorAPI for Openstack)
That sounds good. There is no need to fill all the fields. Just fill the mandatory ones and try to explain the issue, and we'll add and complete whatever needs to be completed. Thanks! On 12 February 2015 at 06:00, Alka Beniwal beniwala...@gmail.com wrote: Hi Igansi, I read the same.I have to first create an issue in JIRA as there is no issue regarding this. There are so many fields that need to be filled while creating an JIRA issue.For some I am not sure. AFAIK issue type will be new feature.Component will be jclouds-labs-openstack.Affects version will be 1.8.1. Please correct me. -- Thanks, AB On Thu, Feb 12, 2015 at 9:47 AM, Alka Beniwal beniwala...@gmail.com wrote: Hi Jeremy, You are correct.This contribution is for the Nova os-hypervisors² [1] Extension.It's my first contribution so I am not familiar with this thing. I am expecting a detailed reply including contribution steps. Please guide me.Thanks! -- AB On Wed, Feb 11, 2015 at 10:10 PM, Ignasi Barrera n...@apache.org wrote: Hi Alka! You will find the details in the How To Contribute page [1]. Is that the one you read? There you'll find also links that explain how the GitHub pull requests work, and everything you need to know. If in doubt, you can ask whatever you need here or join the #jclouds IRC channel @ Freenode and we'll be happy to help! I. [1] https://cwiki.apache.org/confluence/display/JCLOUDS/How+to+Contribute On 11 February 2015 at 16:01, Jeremy Daggett jeremy.dagg...@rackspace.com wrote: Hi Alka, I would be more than happy to guide you on the journey. :) I am assuming this contribution is for the Nova os-hypervisors² [1] Extension. Is that correct? Please let us know, thanks! /jd [1] http://docs.openstack.org/api/openstack-compute/2/content/ext-os-hypervisor s.html On 2/11/15, 1:07 AM, Alka Beniwal beniwala...@gmail.com wrote: Hi all, I would like to contribute to jClouds.As I have developed HypervisorApi for Openstack. I have tried with my OpenStack installation and it's working fine. I have read the How to contribute guide,but I dont know from where I should start. I'd appreciate any other relevent advice. -- Thanks, AB
Re: Guice 4.0-beta5
Thanks for the feedback Florent, Mind opening a JIRA issue [1] so we can properly track this? Also, I see no problem in your patch, as it should be backwards compatible, so if you want to open a PR with it, that would make things move faster :) Regarding Rocoto, IIRC we only use it to parse the properties provided to the context when building it, but I think we should be able to remove it, as it does not provide many value IMO. I'd suggest to add a separate issue for that so we can properly work on it too. Thx! I. [1] https://issues.apache.org/jira/browse/JCLOUDS On 16 February 2015 at 13:04, Florent Guillaume f...@nuxeo.com wrote: Hi, We're trying to the latest use jclouds 1.8.1 with a recent version of Guice 4.0-beta5, as Guice 3 is quite old. There are two problems: 1. jclouds has to be modified to work with Guice 4.0-beta5. Otherwise you get this: 1) Overriding @Provides methods is not allowed. @Provides method: org.jclouds.logging.config.LoggingModule.createLoggerFactory() overridden by: org.jclouds.logging.jdk.config.JDKLoggingModule.createLoggerFactory() at com.google.inject.internal.ProviderMethodsModule.getProviderMethods(ProviderMethodsModule.java:128) The @Provides annotation has to be moved from the base method to each of the overriding concrete methods. I'm attaching to this mail an example which solves my use case for reference but there are likely other places where this has to be done. 2. jclouds depends on Rocoto 6.2 which is basically unmaintained. We had to fork it, a (very simple) patch is available at https://github.com/nuxeo/rocoto/commit/7c09617dac9cbbf8cd9f179ceb799f9d5e733d46 Because Rocoto is unmaintained, a solution has to be found for jclouds to keep using it. Maybe it could simply be included as an additional module inside jclouds? It would be great if the upcoming jclouds 1.9.0 would include this to support a more recent version of Guice, because otherwise projects using it with Java 8 and requiring a recent Guice won't work. Witness for instance https://issues.jenkins-ci.org/browse/JENKINS-26639 Regards, Florent -- Florent Guillaume, Director of RD, Nuxeo Open Source Content Management Platform for Business Apps http://www.nuxeo.com http://community.nuxeo.com
Re: JClouds bootstrap issue in aws-ec2 using Chef
It really depends. The chef way to do that, is to make sure you add the chef-client recipe when you bootstrap the node for the first time. This way it will keep in sync with the Chef Server. At this point, you don't have to access the node anymore. You just have to use the ChefApi to get the node from the chef server, and update its run list. It is as easy as getting the node using the API, nodifying its runlist to add the new recipe, and update the node using the Chef API. In the next chef run, the node will also execute the new recipe. On 15 February 2015 at 09:04, Subhadip Bagui i.ba...@gmail.com wrote: Hi Ignasi, Passing ssl ca to chef node while doing first bootstrap actually worked for me. Some issue was there regarding the certificate. Thanks a lot for your suggestion. One thing though, after bootstrapping to install chef-client If I want to bootstrap again with a particular recipe present in chef server to deploy on the chef node what Statement should I pass to runScriptOnNode ? Can you please share a working example. Regards, Subhadip --- On Fri, Feb 13, 2015 at 1:26 PM, Ignasi Barrera n...@apache.org wrote: Then the problem is just about the Chef configuration and with the certificate itself. Are you sure it is the right one? I'd recommend you to read the Chef client config documentation [1], especially the ssl_* properties. Play with them. You'll see that despite not being the recommended solution you can also disable the SSL certificate validation if needed. You now know how to add those properties to the client config file. Let's play with them. I. [1] https://docs.chef.io/config_rb_client.html El 12/02/2015 15:06, Subhadip Bagui i.ba...@gmail.com escribió: Hi Ignasi, The certificate is generating now in chef client side, but still the SSl authentication is failing. Please let me know how to proceed. Thank you for installing Chef! [2015-02-12T08:59:31+00:00] INFO: Forking chef instance to converge... [2015-02-12T08:59:31+00:00] INFO: *** Chef 12.0.3 *** [2015-02-12T08:59:31+00:00] INFO: Chef-client pid: 7979 [2015-02-12T08:59:33+00:00] INFO: Client key /etc/chef/client.pem is not present - registering [2015-02-12T08:59:34+00:00] ERROR: SSL Validation failure connecting to host: 125.16.230.216 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ^[[0m ^[[0m ^[[31mChef encountered an error attempting to create the client aricloud-172.31.9.180^[[0m ^[[0m ^[[0m[2015-02-12T08:59:34+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2015-02-12T08:59:34+00:00] ERROR: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed [2015-02-12T08:59:34+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) Regards, Subhadip --- On Thu, Feb 12, 2015 at 8:34 AM, Subhadip Bagui i.ba...@gmail.com wrote: Hi Ignasi, I tried the code u suggested. I'm getting some error now like that file what we have passed cannot be created in chef client. Please suggest. [2015-02-11T18:18:32+00:00] INFO: Client key /etc/chef/client.pem is not present - registering ^[[0m ^[[0m ^[[31mChef encountered an error attempting to create the client aricloud-172.31.9.180^[[0m ^[[0m ^[[0m[2015-02-11T18:18:32+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2015-02-11T18:18:32+00:00] ERROR: The configured ssl_ca_file /etc/chef/chef-server.crt does not exist [2015-02-11T18:18:32+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) here is my full code. private String createBootstrapAWS(String userName, String password, InstanceBean instance, ComputeService computeService) throws IOException { String status = Constants.SUCCESS; ListString runlist = new ArrayListString(); String recipe = INITIAL_UPDATE_VM; // initialising chef ChefContext chefContext = AriServiceConfiguration .chefServerConfigurationCloudWise(instance); Iterable? extends CookbookVersion cookbookVersions = chefContext .getChefService().listCookbookVersions();
Guice 4.0-beta5
Hi, We're trying to the latest use jclouds 1.8.1 with a recent version of Guice 4.0-beta5, as Guice 3 is quite old. There are two problems: 1. jclouds has to be modified to work with Guice 4.0-beta5. Otherwise you get this: 1) Overriding @Provides methods is not allowed. @Provides method: org.jclouds.logging.config.LoggingModule.createLoggerFactory() overridden by: org.jclouds.logging.jdk.config.JDKLoggingModule.createLoggerFactory() at com.google.inject.internal.ProviderMethodsModule.getProviderMethods(ProviderMethodsModule.java:128) The @Provides annotation has to be moved from the base method to each of the overriding concrete methods. I'm attaching to this mail an example which solves my use case for reference but there are likely other places where this has to be done. 2. jclouds depends on Rocoto 6.2 which is basically unmaintained. We had to fork it, a (very simple) patch is available at https://github.com/nuxeo/rocoto/commit/7c09617dac9cbbf8cd9f179ceb799f9d5e733d46 Because Rocoto is unmaintained, a solution has to be found for jclouds to keep using it. Maybe it could simply be included as an additional module inside jclouds? It would be great if the upcoming jclouds 1.9.0 would include this to support a more recent version of Guice, because otherwise projects using it with Java 8 and requiring a recent Guice won't work. Witness for instance https://issues.jenkins-ci.org/browse/JENKINS-26639 Regards, Florent -- Florent Guillaume, Director of RD, Nuxeo Open Source Content Management Platform for Business Apps http://www.nuxeo.com http://community.nuxeo.com diff --git a/core/pom.xml b/core/pom.xml index 3cc3b89..9913737 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -55,12 +55,12 @@ dependency groupIdcom.google.inject.extensions/groupId artifactIdguice-assistedinject/artifactId - version3.0/version + version4.0-beta5/version /dependency dependency groupIdcom.google.inject/groupId artifactIdguice/artifactId - version3.0/version + version4.0-beta5/version /dependency dependency groupIdorg.99soft.guice/groupId diff --git a/core/src/main/java/org/jclouds/logging/config/ConsoleLoggingModule.java b/core/src/main/java/org/jclouds/logging/config/ConsoleLoggingModule.java index 6f1f6f6..d346f76 100644 --- a/core/src/main/java/org/jclouds/logging/config/ConsoleLoggingModule.java +++ b/core/src/main/java/org/jclouds/logging/config/ConsoleLoggingModule.java @@ -18,11 +18,15 @@ package org.jclouds.logging.config; import org.jclouds.logging.Logger; +import com.google.inject.Provides; + /** * Configures logging of type {@link ConsoleLogger} */ public class ConsoleLoggingModule extends LoggingModule { + @Provides + @Override public Logger.LoggerFactory createLoggerFactory() { return new Logger.LoggerFactory() { public Logger getLogger(String category) { diff --git a/core/src/main/java/org/jclouds/logging/config/LoggingModule.java b/core/src/main/java/org/jclouds/logging/config/LoggingModule.java index ad47bd1..ae89fcf 100644 --- a/core/src/main/java/org/jclouds/logging/config/LoggingModule.java +++ b/core/src/main/java/org/jclouds/logging/config/LoggingModule.java @@ -23,7 +23,6 @@ import javax.inject.Singleton; import org.jclouds.logging.Logger; import com.google.inject.AbstractModule; -import com.google.inject.Provides; /** * Creates a post-injection listener that binds Loggers named the same as the enclosing class. @@ -35,7 +34,6 @@ public abstract class LoggingModule extends AbstractModule { bindListener(any(), new BindLoggersAnnotatedWithResource(createLoggerFactory())); } - @Provides @Singleton public abstract Logger.LoggerFactory createLoggerFactory(); diff --git a/core/src/main/java/org/jclouds/logging/config/NullLoggingModule.java b/core/src/main/java/org/jclouds/logging/config/NullLoggingModule.java index a771b2a..886bbea 100644 --- a/core/src/main/java/org/jclouds/logging/config/NullLoggingModule.java +++ b/core/src/main/java/org/jclouds/logging/config/NullLoggingModule.java @@ -18,11 +18,15 @@ package org.jclouds.logging.config; import org.jclouds.logging.Logger; +import com.google.inject.Provides; + /** * Configures logging of type {@link NullLogger} */ public class NullLoggingModule extends LoggingModule { + @Provides + @Override public Logger.LoggerFactory createLoggerFactory() { return new Logger.LoggerFactory() { public Logger getLogger(String category) { diff --git a/core/src/main/java/org/jclouds/logging/jdk/config/JDKLoggingModule.java b/core/src/main/java/org/jclouds/logging/jdk/config/JDKLoggingModule.java index 5a57473..be9a12a 100644 --- a/core/src/main/java/org/jclouds/logging/jdk/config/JDKLoggingModule.java +++ b/core/src/main/java/org/jclouds/logging/jdk/config/JDKLoggingModule.java @@ -20,10 +20,15 @@ import org.jclouds.logging.Logger; import