You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Imesh Gunaratne <im...@apache.org> on 2014/03/09 01:52:00 UTC

[SoftLayer] Error when invoking getOrderTemplate() method

Hi,

As I found jclouds SoftLayer provider invokes getOrderTemplate() method to
fetch order price information from SoftLayer when needed to populate
instances. However due to some reason this call fails with an error saying
set of order categories are missing. I verified previous messages and it
seems like required information is there.

*Methods invoking getOrderTemplate():*
1. GetHardwareForVirtualGuest.getHardware(): Fetch price list.
2. GetHardwareForVirtualGuest.getImage(): Fetch price list.

*Error:*
-  >> GET
https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/3752162/getOrderTemplate/MONTHLY.jsonHTTP/1.1
-  >> Accept: application/json
-  << HTTP/1.1 500 Internal Server Error
-  << "{"error":"Order is missing the following categories: Ram, Public
Bandwidth, Operating System, Primary IP Addresses, Monitoring,
Notification, Response, Uplink Port Speeds, VPN Management - Private
Network, Vulnerability Assessments & Management, Remote
Management.","code":"SoftLayer_Exception_Order_MissingCategory"}"

*Findings:*
I could see a simlar error has been handled in
GetHardwareForVirtualGuest.getImage() method when invoking
getOrderTemplate():

try {
            order =
api.getVirtualGuestApi().getOrderTemplate(guest.getId());
         } catch (SoftLayerOrderItemDuplicateException e) {
            // this is a workaround because SoftLayer throws sometimes 500
internal server errors for the above method call
            logger.warn(e, "Cannot get order template for
virtualGuestId(%s)", guest.getId());
         }

Are prices mandatory when populating instances (nodes)? If so could this be
a data error?
Really appreciate any thoughts on this.

Thanks
-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PPMC Member, Apache Stratos

Re: [SoftLayer] Error when invoking getOrderTemplate() method

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Andrea,

Thanks so much!
Absolutely! I will test this out and get back to you with my findings.

Thanks
Imesh


On Wed, Mar 12, 2014 at 7:08 PM, Andrea Turli <an...@gmail.com>wrote:

> Hi Imesh,
>
> I've committed a new version of soflayer on my branch `refactor/softlayer`
> commit 56931cb9599d251122828b462c2fae2f171f56b6
>
> It would be nice if you can test it and report on ML your
> feedback/impressions.
>
> Thanks,
>
> Andrea
>
>
> On Wed, Mar 12, 2014 at 10:21 PM, Andrea Turli <andrea.turli@gmail.com
> >wrote:
>
> > Hi Imesh,
> >
> > glad to hear you've been able to test my branch. As I said, we are
> > currently actively working on that branch so it is not stabilized yet,
> and
> > for that reason you got different version pulling the code in two
> different
> > moments.
> >
> > I'm going to push a new commit shortly so I will ping you when it is out
> > if you like to test it again.
> >
> > Thanks,
> > Andrea
> >
> >
> > On Wed, Mar 12, 2014 at 10:00 PM, Imesh Gunaratne <imesh@apache.org
> >wrote:
> >
> >> Hi Andrea,
> >>
> >> Thank you very much. Really appreciate it.
> >>
> >> I applied your pull request to my local repository and did a test. Yes
> it
> >> was much stable than the master. However I found one issue when trying
> to
> >> spawn an instance. The OperatingSystemReferenceCode property was not set
> >> in
> >> the request.
> >>
> >>
> >>
> org.jclouds.softlayer.compute.strategy.SoftLayerComputeServiceAdapter.createNodeWithGroupEncodedIntoName():
> >>
> >> operatingSystem = OperatingSystem.builder()
> >>               .id(from.getId())
> >>               .build();
> >>
> >> I update this logic to set the above property and the issue was fixed.
> >>
> >> BTW today I accidently deleted the .git folder in my local repository
> and
> >> tried to fetch your pull request again. What I did was:
> >>
> >> git clone https://github.com/apache/jclouds.git
> >> git fetch https://github.com/jclouds/jclouds.git refs/pull/296/head
> >>
> >> But as I found the new checkout I got was different from my previous.
> >> Could
> >> you please guide me how to fetch your pull request to a fresh local
> >> repository?
> >>
> >> Thanks
> >> Imesh
> >>
> >>
> >> On Mon, Mar 10, 2014 at 11:30 AM, Andrea Turli <andrea.turli@gmail.com
> >> >wrote:
> >>
> >> > Imesh,
> >> >
> >> > Just to clarify, if I checkout 1.7.1 branch and apply this pull
> request
> >> on
> >> > > top would it be ok for the moment?
> >> > >
> >> >
> >> > It should be ok, even if it can be unstable.
> >> >
> >> > Best,
> >> > Andrea
> >> >
> >>
> >>
> >>
> >> --
> >> Imesh Gunaratne
> >>
> >> Technical Lead, WSO2
> >> Committer & PPMC Member, Apache Stratos
> >>
> >
> >
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PPMC Member, Apache Stratos

Re: [SoftLayer] Error when invoking getOrderTemplate() method

Posted by Andrea Turli <an...@gmail.com>.
Hi Imesh,

I've committed a new version of soflayer on my branch `refactor/softlayer`
commit 56931cb9599d251122828b462c2fae2f171f56b6

It would be nice if you can test it and report on ML your
feedback/impressions.

Thanks,

Andrea


On Wed, Mar 12, 2014 at 10:21 PM, Andrea Turli <an...@gmail.com>wrote:

> Hi Imesh,
>
> glad to hear you've been able to test my branch. As I said, we are
> currently actively working on that branch so it is not stabilized yet, and
> for that reason you got different version pulling the code in two different
> moments.
>
> I'm going to push a new commit shortly so I will ping you when it is out
> if you like to test it again.
>
> Thanks,
> Andrea
>
>
> On Wed, Mar 12, 2014 at 10:00 PM, Imesh Gunaratne <im...@apache.org>wrote:
>
>> Hi Andrea,
>>
>> Thank you very much. Really appreciate it.
>>
>> I applied your pull request to my local repository and did a test. Yes it
>> was much stable than the master. However I found one issue when trying to
>> spawn an instance. The OperatingSystemReferenceCode property was not set
>> in
>> the request.
>>
>>
>> org.jclouds.softlayer.compute.strategy.SoftLayerComputeServiceAdapter.createNodeWithGroupEncodedIntoName():
>>
>> operatingSystem = OperatingSystem.builder()
>>               .id(from.getId())
>>               .build();
>>
>> I update this logic to set the above property and the issue was fixed.
>>
>> BTW today I accidently deleted the .git folder in my local repository and
>> tried to fetch your pull request again. What I did was:
>>
>> git clone https://github.com/apache/jclouds.git
>> git fetch https://github.com/jclouds/jclouds.git refs/pull/296/head
>>
>> But as I found the new checkout I got was different from my previous.
>> Could
>> you please guide me how to fetch your pull request to a fresh local
>> repository?
>>
>> Thanks
>> Imesh
>>
>>
>> On Mon, Mar 10, 2014 at 11:30 AM, Andrea Turli <andrea.turli@gmail.com
>> >wrote:
>>
>> > Imesh,
>> >
>> > Just to clarify, if I checkout 1.7.1 branch and apply this pull request
>> on
>> > > top would it be ok for the moment?
>> > >
>> >
>> > It should be ok, even if it can be unstable.
>> >
>> > Best,
>> > Andrea
>> >
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PPMC Member, Apache Stratos
>>
>
>

Re: [SoftLayer] Error when invoking getOrderTemplate() method

Posted by Andrea Turli <an...@gmail.com>.
Hi Imesh,

glad to hear you've been able to test my branch. As I said, we are
currently actively working on that branch so it is not stabilized yet, and
for that reason you got different version pulling the code in two different
moments.

I'm going to push a new commit shortly so I will ping you when it is out if
you like to test it again.

Thanks,
Andrea


On Wed, Mar 12, 2014 at 10:00 PM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Andrea,
>
> Thank you very much. Really appreciate it.
>
> I applied your pull request to my local repository and did a test. Yes it
> was much stable than the master. However I found one issue when trying to
> spawn an instance. The OperatingSystemReferenceCode property was not set in
> the request.
>
>
> org.jclouds.softlayer.compute.strategy.SoftLayerComputeServiceAdapter.createNodeWithGroupEncodedIntoName():
>
> operatingSystem = OperatingSystem.builder()
>               .id(from.getId())
>               .build();
>
> I update this logic to set the above property and the issue was fixed.
>
> BTW today I accidently deleted the .git folder in my local repository and
> tried to fetch your pull request again. What I did was:
>
> git clone https://github.com/apache/jclouds.git
> git fetch https://github.com/jclouds/jclouds.git refs/pull/296/head
>
> But as I found the new checkout I got was different from my previous. Could
> you please guide me how to fetch your pull request to a fresh local
> repository?
>
> Thanks
> Imesh
>
>
> On Mon, Mar 10, 2014 at 11:30 AM, Andrea Turli <andrea.turli@gmail.com
> >wrote:
>
> > Imesh,
> >
> > Just to clarify, if I checkout 1.7.1 branch and apply this pull request
> on
> > > top would it be ok for the moment?
> > >
> >
> > It should be ok, even if it can be unstable.
> >
> > Best,
> > Andrea
> >
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PPMC Member, Apache Stratos
>

Re: [SoftLayer] Error when invoking getOrderTemplate() method

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Andrea,

Thank you very much. Really appreciate it.

I applied your pull request to my local repository and did a test. Yes it
was much stable than the master. However I found one issue when trying to
spawn an instance. The OperatingSystemReferenceCode property was not set in
the request.

org.jclouds.softlayer.compute.strategy.SoftLayerComputeServiceAdapter.createNodeWithGroupEncodedIntoName():

operatingSystem = OperatingSystem.builder()
              .id(from.getId())
              .build();

I update this logic to set the above property and the issue was fixed.

BTW today I accidently deleted the .git folder in my local repository and
tried to fetch your pull request again. What I did was:

git clone https://github.com/apache/jclouds.git
git fetch https://github.com/jclouds/jclouds.git refs/pull/296/head

But as I found the new checkout I got was different from my previous. Could
you please guide me how to fetch your pull request to a fresh local
repository?

Thanks
Imesh


On Mon, Mar 10, 2014 at 11:30 AM, Andrea Turli <an...@gmail.com>wrote:

> Imesh,
>
> Just to clarify, if I checkout 1.7.1 branch and apply this pull request on
> > top would it be ok for the moment?
> >
>
> It should be ok, even if it can be unstable.
>
> Best,
> Andrea
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PPMC Member, Apache Stratos

Re: [SoftLayer] Error when invoking getOrderTemplate() method

Posted by Andrea Turli <an...@gmail.com>.
Imesh,

Just to clarify, if I checkout 1.7.1 branch and apply this pull request on
> top would it be ok for the moment?
>

It should be ok, even if it can be unstable.

Best,
Andrea

Re: [SoftLayer] Error when invoking getOrderTemplate() method

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Andrea/Aled,

Thank you very much for the information. Really appreciate it!

I was actually using 1.8.0-SNAPSHOT (master). I could see in the pull
request discussion that you are planning to first merge it to 1.7.x and
then forward port to master.

Just to clarify, if I checkout 1.7.1 branch and apply this pull request on
top would it be ok for the moment?
Just for me to do some tests until we have it applied on a branch or master.

Thanks
Imesh


On Mon, Mar 10, 2014 at 4:34 AM, Aled Sage <al...@gmail.com> wrote:

> Hi Imesh,
>
> The refactoring that Andrea mentions is in this pull request:
>     https://github.com/jclouds/jclouds/pull/296
>
> We've been running against a custom build of this branch for a while, and
> have found it *much* more reliable and faster than the existing 1.7.1 code.
>
> Aled
>
>
>
> On 09/03/2014 04:56, Andrea Turli wrote:
>
>> Imesh,
>>
>> this kind of errors are the driving reason for our refactoring: in fact,
>> very often the current implementation fails in listing pre-existing
>> manually created nodes with exceptions similar to the one you had.
>>
>> We hope to have a new version soon  to have all of those problems solved.
>>
>> Best,
>> Andrea
>> Il 09/mar/2014 01:52 "Imesh Gunaratne" <im...@apache.org> ha scritto:
>>
>>  Hi,
>>>
>>> As I found jclouds SoftLayer provider invokes getOrderTemplate() method
>>> to
>>> fetch order price information from SoftLayer when needed to populate
>>> instances. However due to some reason this call fails with an error
>>> saying
>>> set of order categories are missing. I verified previous messages and it
>>> seems like required information is there.
>>>
>>> *Methods invoking getOrderTemplate():*
>>> 1. GetHardwareForVirtualGuest.getHardware(): Fetch price list.
>>> 2. GetHardwareForVirtualGuest.getImage(): Fetch price list.
>>>
>>> *Error:*
>>> -  >> GET
>>>
>>> https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/3752162/
>>> getOrderTemplate/MONTHLY.jsonHTTP/1.1
>>> -  >> Accept: application/json
>>> -  << HTTP/1.1 500 Internal Server Error
>>> -  << "{"error":"Order is missing the following categories: Ram, Public
>>> Bandwidth, Operating System, Primary IP Addresses, Monitoring,
>>> Notification, Response, Uplink Port Speeds, VPN Management - Private
>>> Network, Vulnerability Assessments & Management, Remote
>>> Management.","code":"SoftLayer_Exception_Order_MissingCategory"}"
>>>
>>> *Findings:*
>>> I could see a simlar error has been handled in
>>> GetHardwareForVirtualGuest.getImage() method when invoking
>>> getOrderTemplate():
>>>
>>> try {
>>>              order =
>>> api.getVirtualGuestApi().getOrderTemplate(guest.getId());
>>>           } catch (SoftLayerOrderItemDuplicateException e) {
>>>              // this is a workaround because SoftLayer throws sometimes
>>> 500
>>> internal server errors for the above method call
>>>              logger.warn(e, "Cannot get order template for
>>> virtualGuestId(%s)", guest.getId());
>>>           }
>>>
>>> Are prices mandatory when populating instances (nodes)? If so could this
>>> be
>>> a data error?
>>> Really appreciate any thoughts on this.
>>>
>>> Thanks
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PPMC Member, Apache Stratos
>>>
>>>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PPMC Member, Apache Stratos

Re: [SoftLayer] Error when invoking getOrderTemplate() method

Posted by Aled Sage <al...@gmail.com>.
Hi Imesh,

The refactoring that Andrea mentions is in this pull request:
     https://github.com/jclouds/jclouds/pull/296

We've been running against a custom build of this branch for a while, 
and have found it *much* more reliable and faster than the existing 
1.7.1 code.

Aled


On 09/03/2014 04:56, Andrea Turli wrote:
> Imesh,
>
> this kind of errors are the driving reason for our refactoring: in fact,
> very often the current implementation fails in listing pre-existing
> manually created nodes with exceptions similar to the one you had.
>
> We hope to have a new version soon  to have all of those problems solved.
>
> Best,
> Andrea
> Il 09/mar/2014 01:52 "Imesh Gunaratne" <im...@apache.org> ha scritto:
>
>> Hi,
>>
>> As I found jclouds SoftLayer provider invokes getOrderTemplate() method to
>> fetch order price information from SoftLayer when needed to populate
>> instances. However due to some reason this call fails with an error saying
>> set of order categories are missing. I verified previous messages and it
>> seems like required information is there.
>>
>> *Methods invoking getOrderTemplate():*
>> 1. GetHardwareForVirtualGuest.getHardware(): Fetch price list.
>> 2. GetHardwareForVirtualGuest.getImage(): Fetch price list.
>>
>> *Error:*
>> -  >> GET
>>
>> https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/3752162/getOrderTemplate/MONTHLY.jsonHTTP/1.1
>> -  >> Accept: application/json
>> -  << HTTP/1.1 500 Internal Server Error
>> -  << "{"error":"Order is missing the following categories: Ram, Public
>> Bandwidth, Operating System, Primary IP Addresses, Monitoring,
>> Notification, Response, Uplink Port Speeds, VPN Management - Private
>> Network, Vulnerability Assessments & Management, Remote
>> Management.","code":"SoftLayer_Exception_Order_MissingCategory"}"
>>
>> *Findings:*
>> I could see a simlar error has been handled in
>> GetHardwareForVirtualGuest.getImage() method when invoking
>> getOrderTemplate():
>>
>> try {
>>              order =
>> api.getVirtualGuestApi().getOrderTemplate(guest.getId());
>>           } catch (SoftLayerOrderItemDuplicateException e) {
>>              // this is a workaround because SoftLayer throws sometimes 500
>> internal server errors for the above method call
>>              logger.warn(e, "Cannot get order template for
>> virtualGuestId(%s)", guest.getId());
>>           }
>>
>> Are prices mandatory when populating instances (nodes)? If so could this be
>> a data error?
>> Really appreciate any thoughts on this.
>>
>> Thanks
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PPMC Member, Apache Stratos
>>


Re: [SoftLayer] Error when invoking getOrderTemplate() method

Posted by Andrea Turli <an...@gmail.com>.
Imesh,

this kind of errors are the driving reason for our refactoring: in fact,
very often the current implementation fails in listing pre-existing
manually created nodes with exceptions similar to the one you had.

We hope to have a new version soon  to have all of those problems solved.

Best,
Andrea
Il 09/mar/2014 01:52 "Imesh Gunaratne" <im...@apache.org> ha scritto:

> Hi,
>
> As I found jclouds SoftLayer provider invokes getOrderTemplate() method to
> fetch order price information from SoftLayer when needed to populate
> instances. However due to some reason this call fails with an error saying
> set of order categories are missing. I verified previous messages and it
> seems like required information is there.
>
> *Methods invoking getOrderTemplate():*
> 1. GetHardwareForVirtualGuest.getHardware(): Fetch price list.
> 2. GetHardwareForVirtualGuest.getImage(): Fetch price list.
>
> *Error:*
> -  >> GET
>
> https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/3752162/getOrderTemplate/MONTHLY.jsonHTTP/1.1
> -  >> Accept: application/json
> -  << HTTP/1.1 500 Internal Server Error
> -  << "{"error":"Order is missing the following categories: Ram, Public
> Bandwidth, Operating System, Primary IP Addresses, Monitoring,
> Notification, Response, Uplink Port Speeds, VPN Management - Private
> Network, Vulnerability Assessments & Management, Remote
> Management.","code":"SoftLayer_Exception_Order_MissingCategory"}"
>
> *Findings:*
> I could see a simlar error has been handled in
> GetHardwareForVirtualGuest.getImage() method when invoking
> getOrderTemplate():
>
> try {
>             order =
> api.getVirtualGuestApi().getOrderTemplate(guest.getId());
>          } catch (SoftLayerOrderItemDuplicateException e) {
>             // this is a workaround because SoftLayer throws sometimes 500
> internal server errors for the above method call
>             logger.warn(e, "Cannot get order template for
> virtualGuestId(%s)", guest.getId());
>          }
>
> Are prices mandatory when populating instances (nodes)? If so could this be
> a data error?
> Really appreciate any thoughts on this.
>
> Thanks
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PPMC Member, Apache Stratos
>