You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Jai M <ja...@gmail.com> on 2014/08/28 16:23:21 UTC

Softlayer GlobalIdentifier question

Hi,

   I am trying out the Softlayer adapter in 1.8.x release. While creating a
virtual guest with method createNodeWithGroupEncodedIntoName, I get a
validation error that the globalIdentifier is null. The problem was that,
the private images that I have in softlayer have globalIdentifier as null.
However they all have an Id.

Why is the adapter code looking for the global identifier if the private
images can have it as null ?
Only after I changed the SoftLayerComputeServiceAdapter code to look for id
instead of globalIdentifier, I was able to proceed.

Changed line 354 from

 final String globalIdentifier = "" + image.getGlobalIdentifier();

to

 final String globalIdentifier = "" + image.getId();

Let me know if this is good and if can be incorporated.

Rgds
Jai

Re: Softlayer GlobalIdentifier question

Posted by Ignasi Barrera <na...@apache.org>.
That is because Eclipse does weird things with the classpath. Often is
enough to "close" the jclouds-core project.

On 10 September 2014 17:25, Jai M <ja...@gmail.com> wrote:
>
>
>> When I import the whole branch as a project, Eclipse is not able to
>> resolve the dependencies. Note that, I am able to execute the base pom.xml
>> without issues. (It compiles and executes the tests). The problem was for
>> running individual test methods when eclipse complains about the class not
>> found .
>> So I just imported the provider I want to test. since I noticed that the
>> pom.xml under each provider is self sufficient. With one provider as a
>> project and the build path having the maven dependencies, I am able to run
>> individual unit test methods.
>>
>> Rgds
>> Jai
>>
>> On Sat, Sep 6, 2014 at 2:11 AM, Ignasi Barrera <na...@apache.org> wrote:
>>>
>>> I also use m2e. You will just have to "Import an existing Maven project"
>>> and everything should be ready.
>>> El 06/09/2014 01:08, "Andrew Phillips" <ap...@qrmedia.com> escribió:
>>>
>>> >  I am having problems setting up jclouds as an eclipse project with
>>> > maven.
>>> >>
>>> >
>>> > Are you using m2e [1]? I always found that to be the easiest way to get
>>> > things set up.
>>> >
>>> > If you are unable to use that, for some reason, could you share a
>>> > screenshot of how your Workspace is set up and/or which errors you are
>>> > seeing?
>>> >
>>> > Regards
>>> >
>>> > ap
>>> >
>>> > [1] https://www.eclipse.org/m2e/
>>> >
>>
>>
>

Re: Softlayer GlobalIdentifier question

Posted by Ignasi Barrera <na...@apache.org>.
I also use m2e. You will just have to "Import an existing Maven project"
and everything should be ready.
El 06/09/2014 01:08, "Andrew Phillips" <ap...@qrmedia.com> escribió:

>  I am having problems setting up jclouds as an eclipse project with maven.
>>
>
> Are you using m2e [1]? I always found that to be the easiest way to get
> things set up.
>
> If you are unable to use that, for some reason, could you share a
> screenshot of how your Workspace is set up and/or which errors you are
> seeing?
>
> Regards
>
> ap
>
> [1] https://www.eclipse.org/m2e/
>

Re: Softlayer GlobalIdentifier question

Posted by Andrew Phillips <ap...@qrmedia.com>.
>  I am having problems setting up jclouds as an eclipse project with maven.

Are you using m2e [1]? I always found that to be the easiest way to  
get things set up.

If you are unable to use that, for some reason, could you share a  
screenshot of how your Workspace is set up and/or which errors you are  
seeing?

Regards

ap

[1] https://www.eclipse.org/m2e/

Re: Softlayer GlobalIdentifier question

Posted by Jai M <ja...@gmail.com>.
Hi,

 I am having problems setting up jclouds as an eclipse project with maven.
I have been tweeking the setting to add maven dependencies to classpath
e.t.c. I am making slow progress. Is there any wiki with steps to do this
or someone can share their .project and .classpath file (along with the
version name of eclipse )?

Thanks
Jai


On Thu, Sep 4, 2014 at 4:49 PM, Jai M <ja...@gmail.com> wrote:

> Thanks for looking into it.
> Jira link : https://issues.apache.org/jira/browse/JCLOUDS-704
>
> Rgds
> Jai
>
>
> On Thu, Sep 4, 2014 at 4:21 PM, Everett Toews <everett.toews@rackspace.com
> > wrote:
>
>>  Here’s how to report a bug.
>>
>>  http://jclouds.apache.org/reference/report-a-bug/
>>
>>  Thanks,
>> Everett
>>
>>
>>  On Sep 4, 2014, at 4:14 PM, Ignasi Barrera <na...@apache.org> wrote:
>>
>>  Using the latest version should work. Could you please file an issue in
>> our JIRA [1] with the relevant code and the provided stacktrace, so we can
>> properly track and fix it?
>>
>> Thanks!
>>
>> I.
>>
>> [1] https://issues.apache.org/jira/browse/JCLOUDS
>> El 04/09/2014 23:04, "Andrew Phillips" <an...@apache.org> escribió:
>>
>>>  With the most recent code (master) I am running into other issues. (Pls
>>>> Note, I initially tried to update my maven to version 2.0.0 and that
>>>> still
>>>> had the the globalIdentifier problem).
>>>>
>>>
>>> 2.0.0 does not exist (yet). I take it you mean 2.0.0-SNAPSHOT [1]?
>>>
>>> ap
>>>
>>> [1] https:/jclouds.apache.org/start/install/ (see "Using the daily
>>> builds")
>>>
>>
>>
>

Re: Softlayer GlobalIdentifier question

Posted by Jai M <ja...@gmail.com>.
Thanks for looking into it.
Jira link : https://issues.apache.org/jira/browse/JCLOUDS-704

Rgds
Jai


On Thu, Sep 4, 2014 at 4:21 PM, Everett Toews <ev...@rackspace.com>
wrote:

>  Here’s how to report a bug.
>
>  http://jclouds.apache.org/reference/report-a-bug/
>
>  Thanks,
> Everett
>
>
>  On Sep 4, 2014, at 4:14 PM, Ignasi Barrera <na...@apache.org> wrote:
>
>  Using the latest version should work. Could you please file an issue in
> our JIRA [1] with the relevant code and the provided stacktrace, so we can
> properly track and fix it?
>
> Thanks!
>
> I.
>
> [1] https://issues.apache.org/jira/browse/JCLOUDS
> El 04/09/2014 23:04, "Andrew Phillips" <an...@apache.org> escribió:
>
>>  With the most recent code (master) I am running into other issues. (Pls
>>> Note, I initially tried to update my maven to version 2.0.0 and that
>>> still
>>> had the the globalIdentifier problem).
>>>
>>
>> 2.0.0 does not exist (yet). I take it you mean 2.0.0-SNAPSHOT [1]?
>>
>> ap
>>
>> [1] https:/jclouds.apache.org/start/install/ (see "Using the daily
>> builds")
>>
>
>

Re: Softlayer GlobalIdentifier question

Posted by Everett Toews <ev...@RACKSPACE.COM>.
Here’s how to report a bug.

http://jclouds.apache.org/reference/report-a-bug/

Thanks,
Everett


On Sep 4, 2014, at 4:14 PM, Ignasi Barrera <na...@apache.org>> wrote:


Using the latest version should work. Could you please file an issue in our JIRA [1] with the relevant code and the provided stacktrace, so we can properly track and fix it?

Thanks!

I.

[1] https://issues.apache.org/jira/browse/JCLOUDS

El 04/09/2014 23:04, "Andrew Phillips" <an...@apache.org>> escribió:
With the most recent code (master) I am running into other issues. (Pls
Note, I initially tried to update my maven to version 2.0.0 and that still
had the the globalIdentifier problem).

2.0.0 does not exist (yet). I take it you mean 2.0.0-SNAPSHOT [1]?

ap

[1] https:/jclouds.apache.org/start/install/<http://jclouds.apache.org/start/install/> (see "Using the daily builds")


Re: Softlayer GlobalIdentifier question

Posted by Ignasi Barrera <na...@apache.org>.
Using the latest version should work. Could you please file an issue in our
JIRA [1] with the relevant code and the provided stacktrace, so we can
properly track and fix it?

Thanks!

I.

[1] https://issues.apache.org/jira/browse/JCLOUDS
El 04/09/2014 23:04, "Andrew Phillips" <an...@apache.org> escribió:

> With the most recent code (master) I am running into other issues. (Pls
>> Note, I initially tried to update my maven to version 2.0.0 and that still
>> had the the globalIdentifier problem).
>>
>
> 2.0.0 does not exist (yet). I take it you mean 2.0.0-SNAPSHOT [1]?
>
> ap
>
> [1] https:/jclouds.apache.org/start/install/ (see "Using the daily
> builds")
>

Re: Softlayer GlobalIdentifier question

Posted by Jai M <ja...@gmail.com>.
Yep, I tried 2.0.0-SNAPSHOT

Rgds
Jai


On Thu, Sep 4, 2014 at 4:02 PM, Andrew Phillips <an...@apache.org> wrote:

> With the most recent code (master) I am running into other issues. (Pls
>> Note, I initially tried to update my maven to version 2.0.0 and that still
>> had the the globalIdentifier problem).
>>
>
> 2.0.0 does not exist (yet). I take it you mean 2.0.0-SNAPSHOT [1]?
>
> ap
>
> [1] https:/jclouds.apache.org/start/install/ (see "Using the daily
> builds")
>

Re: Softlayer GlobalIdentifier question

Posted by Andrew Phillips <an...@apache.org>.
> With the most recent code (master) I am running into other issues. (Pls
> Note, I initially tried to update my maven to version 2.0.0 and that still
> had the the globalIdentifier problem).

2.0.0 does not exist (yet). I take it you mean 2.0.0-SNAPSHOT [1]?

ap

[1] https:/jclouds.apache.org/start/install/ (see "Using the daily builds")

Re: Softlayer GlobalIdentifier question

Posted by Jai M <ja...@gmail.com>.
With the most recent code (master) I am running into other issues. (Pls
Note, I initially tried to update my maven to version 2.0.0 and that still
had the the globalIdentifier problem).
In the master branch, the globalIdentifier problem does not happen.
The first difference is, for the zone, I have to set the data center ID
instead of the friendly name ("138124" Vs "dal05" )
Once I updated to the ID, I am getting the below error and the application
exists. However on the customer portal, I can see the guest being
instantiated successfully.

2014-09-04 15:29:45,812 [main] DEBUG SLF4JLogger Sending request
-1350657235: POST
https://api.softlayer.com/rest/v3/SoftLayer_Product_Order/placeOrder.json
HTTP/1.1
2014-09-04 15:29:48,963 [main] DEBUG SLF4JLogger Receiving response
-1350657235: HTTP/1.1 200 OK
java.lang.IndexOutOfBoundsException: position (0) must be less than the
number of elements that remained (0)
    at com.google.common.collect.Iterators.get(Iterators.java:813)
    at com.google.common.collect.Iterables.get(Iterables.java:728)
    at
org.jclouds.softlayer.compute.strategy.SoftLayerComputeServiceAdapter.createNodeWithGroupEncodedIntoName(SoftLayerComputeServiceAdapter.java:129)
    at
com.cisco.vnmc.hcloud.cpm.service.providers.softlayer.SLProviderOps.getLocation(SLProviderOps.java:118)
    at
com.cisco.vnmc.hcloud.cpm.service.providers.softlayer.SLProviderOps.getRegions(SLProviderOps.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Pls let me know if you need more info.
Values used in the template builder
        //inst is a local object to contain the template information
        inst.setArchitecture(ArchitectureEnum.BIT64.getNumber());
        inst.setVcpus(1);
        inst.setMemory(512);
        inst.setZone("138124");
        inst.setName("abcd");
        inst.setOsFamily("RHEL");

Additionally, I set

template.getOptions().as(SoftLayerTemplateOptions.class).domainName("me.org
");

template.getOptions().as(SoftLayerTemplateOptions.class).networks("253152","260523");

Rgds
Jai


On Wed, Sep 3, 2014 at 12:48 PM, Ignasi Barrera <na...@apache.org> wrote:

> Ah, right. The SoftLayer provider was modernized in our last 1.8 release.
> Could you try upgrading and share what you find out?
>
> Thanks!
>
> I.
> El 03/09/2014 19:40, "Jai M" <ja...@gmail.com> escribió:
>
> Thanks Ignasi for getting back on this. I was looking at the master branch
>> code to see if I can fix it. However the SoftLayerComputeServiceAdapter
>> class has been revamped now. I don not see the globalIdentifier being used
>> anymore.
>> I will try out with the latest code.
>>
>> Rgds
>> Jai
>>
>>
>> On Sun, Aug 31, 2014 at 7:32 AM, Ignasi Barrera <na...@apache.org> wrote:
>>
>>> Hi Jai,
>>>
>>> Thanks for sharing and figuring out the cause of your issue.
>>>
>>> Could you please open a JIRA issue [1] so we can track this?
>>>
>>> And could you send your changes as a pull request [2]? This way we'll be
>>> able to review and test it before merging. Patches and pull request are
>>> very welcome!
>>>
>>> Thanks!
>>>
>>> I.
>>>
>>> [1] https://issues.apache.org/jira/browse/JCLOUDS
>>> [2] http://wiki.apache.org/jclouds/How%20to%20Contribute
>>> El 28/08/2014 16:23, "Jai M" <ja...@gmail.com> escribió:
>>>
>>> Hi,
>>>>
>>>>    I am trying out the Softlayer adapter in 1.8.x release. While
>>>> creating a virtual guest with method createNodeWithGroupEncodedIntoName, I
>>>> get a validation error that the globalIdentifier is null. The problem was
>>>> that, the private images that I have in softlayer have globalIdentifier as
>>>> null. However they all have an Id.
>>>>
>>>> Why is the adapter code looking for the global identifier if the
>>>> private images can have it as null ?
>>>> Only after I changed the SoftLayerComputeServiceAdapter code to look
>>>> for id instead of globalIdentifier, I was able to proceed.
>>>>
>>>> Changed line 354 from
>>>>
>>>>  final String globalIdentifier = "" + image.getGlobalIdentifier();
>>>>
>>>> to
>>>>
>>>>  final String globalIdentifier = "" + image.getId();
>>>>
>>>> Let me know if this is good and if can be incorporated.
>>>>
>>>> Rgds
>>>> Jai
>>>>
>>>
>>

Re: Softlayer GlobalIdentifier question

Posted by Ignasi Barrera <na...@apache.org>.
Ah, right. The SoftLayer provider was modernized in our last 1.8 release.
Could you try upgrading and share what you find out?

Thanks!

I.
El 03/09/2014 19:40, "Jai M" <ja...@gmail.com> escribió:

> Thanks Ignasi for getting back on this. I was looking at the master branch
> code to see if I can fix it. However the SoftLayerComputeServiceAdapter
> class has been revamped now. I don not see the globalIdentifier being used
> anymore.
> I will try out with the latest code.
>
> Rgds
> Jai
>
>
> On Sun, Aug 31, 2014 at 7:32 AM, Ignasi Barrera <na...@apache.org> wrote:
>
>> Hi Jai,
>>
>> Thanks for sharing and figuring out the cause of your issue.
>>
>> Could you please open a JIRA issue [1] so we can track this?
>>
>> And could you send your changes as a pull request [2]? This way we'll be
>> able to review and test it before merging. Patches and pull request are
>> very welcome!
>>
>> Thanks!
>>
>> I.
>>
>> [1] https://issues.apache.org/jira/browse/JCLOUDS
>> [2] http://wiki.apache.org/jclouds/How%20to%20Contribute
>> El 28/08/2014 16:23, "Jai M" <ja...@gmail.com> escribió:
>>
>> Hi,
>>>
>>>    I am trying out the Softlayer adapter in 1.8.x release. While
>>> creating a virtual guest with method createNodeWithGroupEncodedIntoName, I
>>> get a validation error that the globalIdentifier is null. The problem was
>>> that, the private images that I have in softlayer have globalIdentifier as
>>> null. However they all have an Id.
>>>
>>> Why is the adapter code looking for the global identifier if the private
>>> images can have it as null ?
>>> Only after I changed the SoftLayerComputeServiceAdapter code to look for
>>> id instead of globalIdentifier, I was able to proceed.
>>>
>>> Changed line 354 from
>>>
>>>  final String globalIdentifier = "" + image.getGlobalIdentifier();
>>>
>>> to
>>>
>>>  final String globalIdentifier = "" + image.getId();
>>>
>>> Let me know if this is good and if can be incorporated.
>>>
>>> Rgds
>>> Jai
>>>
>>
>

Re: Softlayer GlobalIdentifier question

Posted by Jai M <ja...@gmail.com>.
Thanks Ignasi for getting back on this. I was looking at the master branch
code to see if I can fix it. However the SoftLayerComputeServiceAdapter
class has been revamped now. I don not see the globalIdentifier being used
anymore.
I will try out with the latest code.

Rgds
Jai


On Sun, Aug 31, 2014 at 7:32 AM, Ignasi Barrera <na...@apache.org> wrote:

> Hi Jai,
>
> Thanks for sharing and figuring out the cause of your issue.
>
> Could you please open a JIRA issue [1] so we can track this?
>
> And could you send your changes as a pull request [2]? This way we'll be
> able to review and test it before merging. Patches and pull request are
> very welcome!
>
> Thanks!
>
> I.
>
> [1] https://issues.apache.org/jira/browse/JCLOUDS
> [2] http://wiki.apache.org/jclouds/How%20to%20Contribute
> El 28/08/2014 16:23, "Jai M" <ja...@gmail.com> escribió:
>
> Hi,
>>
>>    I am trying out the Softlayer adapter in 1.8.x release. While creating
>> a virtual guest with method createNodeWithGroupEncodedIntoName, I get a
>> validation error that the globalIdentifier is null. The problem was that,
>> the private images that I have in softlayer have globalIdentifier as null.
>> However they all have an Id.
>>
>> Why is the adapter code looking for the global identifier if the private
>> images can have it as null ?
>> Only after I changed the SoftLayerComputeServiceAdapter code to look for
>> id instead of globalIdentifier, I was able to proceed.
>>
>> Changed line 354 from
>>
>>  final String globalIdentifier = "" + image.getGlobalIdentifier();
>>
>> to
>>
>>  final String globalIdentifier = "" + image.getId();
>>
>> Let me know if this is good and if can be incorporated.
>>
>> Rgds
>> Jai
>>
>

Re: Softlayer GlobalIdentifier question

Posted by Ignasi Barrera <na...@apache.org>.
Hi Jai,

Thanks for sharing and figuring out the cause of your issue.

Could you please open a JIRA issue [1] so we can track this?

And could you send your changes as a pull request [2]? This way we'll be
able to review and test it before merging. Patches and pull request are
very welcome!

Thanks!

I.

[1] https://issues.apache.org/jira/browse/JCLOUDS
[2] http://wiki.apache.org/jclouds/How%20to%20Contribute
El 28/08/2014 16:23, "Jai M" <ja...@gmail.com> escribió:

> Hi,
>
>    I am trying out the Softlayer adapter in 1.8.x release. While creating
> a virtual guest with method createNodeWithGroupEncodedIntoName, I get a
> validation error that the globalIdentifier is null. The problem was that,
> the private images that I have in softlayer have globalIdentifier as null.
> However they all have an Id.
>
> Why is the adapter code looking for the global identifier if the private
> images can have it as null ?
> Only after I changed the SoftLayerComputeServiceAdapter code to look for
> id instead of globalIdentifier, I was able to proceed.
>
> Changed line 354 from
>
>  final String globalIdentifier = "" + image.getGlobalIdentifier();
>
> to
>
>  final String globalIdentifier = "" + image.getId();
>
> Let me know if this is good and if can be incorporated.
>
> Rgds
> Jai
>