You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Yaron Rosenbaum <ya...@gmail.com> on 2014/11/20 09:42:09 UTC

#767 - Creating multiple spot instances fails. Status polling too frequent?

Background:

I am using jClouds to create and maintain a cluster. My cluster uses spot instances.

As I understand it, jClouds is polling AWS to see whether the requested nodes have been created.
This polling, however, happens too frequently for AWS - which blocks these requests returning an error.
jClouds misinterprets this error as a failure to create, but leaves the spot request - which is eventually fulfilled.
The created nodes are not configured by jClouds, and are left orphaned.

In my case - this endlessly creates more and more nodes.
————————

1) Is it possible to specify polling interval for new Spot instance requests ? How ?
2) Is it possible to ignore certain errors ?

This is a blocker for me, so any help would be appreciated.


(Y)


Re: #767 - Creating multiple spot instances fails. Status polling too frequent?

Posted by Adrian Cole <ad...@gmail.com>.
Hi, Yaron.

Appreciate your interest. I will give you some hints.

1. Fork jclouds on github and make sure you work on a branch of master for
anything you would like to go in th project.
2. Import project from maven in eclipse. Use jdk 7, but language level 6.
3. Use this formatter http://wiki.apache.org/jclouds/Coding%20Standards
4. Check jclouds.org, the wiki, and do markmail searches. Jclouds hasn't
changed fundamentally, but last notable change was undoing async. IOTW,
there is a high chance questions have been asked, and the code referenced
is similar if not same.

Hope this helps
On Nov 23, 2014 3:45 AM, "Yaron Rosenbaum" <ya...@gmail.com>
wrote:

> Adrian,
>
> Although not on the same subject as the original email:
> If you help me understand the project structure, and create a dev env in
> Eclipse - I promise I will contribute back and help wherever I can. I'm not
> being lazy - I did spend quite a lot of time on this, but I find that the
> structure and set of idiom secrecies of this specific project are a bit
> complex.
>
>
> (Y)
>
> > On Nov 21, 2014, at 7:05 PM, Adrian Cole <ad...@gmail.com>
> wrote:
> >
> >> Yes, I know - I tried tracking it down myself. I find the jClouds code
> a bit hard to comprehend.
> > understood.. try maintaining it :)
> >
> >> BTW
> >> 50-1000 msecs are insanely small numbers IMO. No wonder AWS returned
> errors
> > yeah, it is silly for spot instances, but some clouds start vms in
> > well under 30 seconds, so not terrible there.
>
>

Re: #767 - Creating multiple spot instances fails. Status polling too frequent?

Posted by Yaron Rosenbaum <ya...@gmail.com>.
Adrian,

Although not on the same subject as the original email:
If you help me understand the project structure, and create a dev env in Eclipse - I promise I will contribute back and help wherever I can. I'm not being lazy - I did spend quite a lot of time on this, but I find that the structure and set of idiom secrecies of this specific project are a bit complex.


(Y)

> On Nov 21, 2014, at 7:05 PM, Adrian Cole <ad...@gmail.com> wrote:
> 
>> Yes, I know - I tried tracking it down myself. I find the jClouds code a bit hard to comprehend.
> understood.. try maintaining it :)
> 
>> BTW
>> 50-1000 msecs are insanely small numbers IMO. No wonder AWS returned errors
> yeah, it is silly for spot instances, but some clouds start vms in
> well under 30 seconds, so not terrible there.


Re: #767 - Creating multiple spot instances fails. Status polling too frequent?

Posted by Adrian Cole <ad...@gmail.com>.
> Yes, I know - I tried tracking it down myself. I find the jClouds code a bit hard to comprehend.
understood.. try maintaining it :)

> BTW
> 50-1000 msecs are insanely small numbers IMO. No wonder AWS returned errors
yeah, it is silly for spot instances, but some clouds start vms in
well under 30 seconds, so not terrible there.

Re: #767 - Creating multiple spot instances fails. Status polling too frequent?

Posted by Yaron Rosenbaum <ya...@gmail.com>.
Hi Adrian, thanks again

Yes, I know - I tried tracking it down myself. I find the jClouds code a bit hard to comprehend.

BTW
50-1000 msecs are insanely small numbers IMO. No wonder AWS returned errors


(Y)

> On Nov 21, 2014, at 5:53 PM, Adrian Cole <ad...@gmail.com> wrote:
> 
> sorry they are a bit indirect to track down!
> 
>   /**
>    * @see org.jclouds.compute.config.ComputeServiceProperties#POLL_INITIAL_PERIOD
>    */
>   public static final long DEFAULT_PERIOD = 50l;
>   /**
>    * @see org.jclouds.compute.config.ComputeServiceProperties#POLL_MAX_PERIOD
>    */
>   public static final long DEFAULT_MAX_PERIOD = 1000l;
> 
> 
> On Fri, Nov 21, 2014 at 6:02 AM, Yaron Rosenbaum
> <ya...@gmail.com> wrote:
>> Adrian,
>> 
>> Thank you!
>> BTW. What are the defaults?
>> 
>> (Y)
>> 
>>> On Nov 20, 2014, at 6:08 PM, Adrian Cole <ad...@gmail.com> wrote:
>>> 
>>> Hi, Yaron.
>>> 
>>> I believe you are looking to override these two from
>>> ComputeServiceProperties. Use ContextBuilder.overrides (or set java
>>> system properties) to do so!
>>> 
>>> Hope this helps,
>>> -A
>>> 
>>>  /**
>>>   * Initial period between the ComputeService's node polls.
>>> Subsequent periods increase exponentially
>>>   * (based on the backoff factor) and become constant when the
>>> maximum period is reached.
>>>   * The unit is milliseconds.
>>>   */
>>>  public static final String POLL_INITIAL_PERIOD =
>>> "jclouds.compute.poll-status.initial-period";
>>> 
>>>  /**
>>>   * Once the exponentially increasing period between ComputeService's node
>>>   * polls has reached this maximum period, it remains at this value.
>>>   * The unit is milliseconds.
>>>   */
>>>  public static final String POLL_MAX_PERIOD =
>>> "jclouds.compute.poll-status.max-period";
>>> 
>>> 
>>> On Thu, Nov 20, 2014 at 12:42 AM, Yaron Rosenbaum
>>> <ya...@gmail.com> wrote:
>>>> Background:
>>>> 
>>>> I am using jClouds to create and maintain a cluster. My cluster uses spot instances.
>>>> 
>>>> As I understand it, jClouds is polling AWS to see whether the requested nodes have been created.
>>>> This polling, however, happens too frequently for AWS - which blocks these requests returning an error.
>>>> jClouds misinterprets this error as a failure to create, but leaves the spot request - which is eventually fulfilled.
>>>> The created nodes are not configured by jClouds, and are left orphaned.
>>>> 
>>>> In my case - this endlessly creates more and more nodes.
>>>> ————————
>>>> 
>>>> 1) Is it possible to specify polling interval for new Spot instance requests ? How ?
>>>> 2) Is it possible to ignore certain errors ?
>>>> 
>>>> This is a blocker for me, so any help would be appreciated.
>>>> 
>>>> 
>>>> (Y)
>>>> 
>> 


Re: #767 - Creating multiple spot instances fails. Status polling too frequent?

Posted by Adrian Cole <ad...@gmail.com>.
sorry they are a bit indirect to track down!

   /**
    * @see org.jclouds.compute.config.ComputeServiceProperties#POLL_INITIAL_PERIOD
    */
   public static final long DEFAULT_PERIOD = 50l;
   /**
    * @see org.jclouds.compute.config.ComputeServiceProperties#POLL_MAX_PERIOD
    */
   public static final long DEFAULT_MAX_PERIOD = 1000l;


On Fri, Nov 21, 2014 at 6:02 AM, Yaron Rosenbaum
<ya...@gmail.com> wrote:
> Adrian,
>
> Thank you!
> BTW. What are the defaults?
>
> (Y)
>
>> On Nov 20, 2014, at 6:08 PM, Adrian Cole <ad...@gmail.com> wrote:
>>
>> Hi, Yaron.
>>
>> I believe you are looking to override these two from
>> ComputeServiceProperties. Use ContextBuilder.overrides (or set java
>> system properties) to do so!
>>
>> Hope this helps,
>> -A
>>
>>   /**
>>    * Initial period between the ComputeService's node polls.
>> Subsequent periods increase exponentially
>>    * (based on the backoff factor) and become constant when the
>> maximum period is reached.
>>    * The unit is milliseconds.
>>    */
>>   public static final String POLL_INITIAL_PERIOD =
>> "jclouds.compute.poll-status.initial-period";
>>
>>   /**
>>    * Once the exponentially increasing period between ComputeService's node
>>    * polls has reached this maximum period, it remains at this value.
>>    * The unit is milliseconds.
>>    */
>>   public static final String POLL_MAX_PERIOD =
>> "jclouds.compute.poll-status.max-period";
>>
>>
>> On Thu, Nov 20, 2014 at 12:42 AM, Yaron Rosenbaum
>> <ya...@gmail.com> wrote:
>>> Background:
>>>
>>> I am using jClouds to create and maintain a cluster. My cluster uses spot instances.
>>>
>>> As I understand it, jClouds is polling AWS to see whether the requested nodes have been created.
>>> This polling, however, happens too frequently for AWS - which blocks these requests returning an error.
>>> jClouds misinterprets this error as a failure to create, but leaves the spot request - which is eventually fulfilled.
>>> The created nodes are not configured by jClouds, and are left orphaned.
>>>
>>> In my case - this endlessly creates more and more nodes.
>>> ————————
>>>
>>> 1) Is it possible to specify polling interval for new Spot instance requests ? How ?
>>> 2) Is it possible to ignore certain errors ?
>>>
>>> This is a blocker for me, so any help would be appreciated.
>>>
>>>
>>> (Y)
>>>
>

Re: #767 - Creating multiple spot instances fails. Status polling too frequent?

Posted by Yaron Rosenbaum <ya...@gmail.com>.
Adrian,

Thank you!
BTW. What are the defaults?

(Y)

> On Nov 20, 2014, at 6:08 PM, Adrian Cole <ad...@gmail.com> wrote:
> 
> Hi, Yaron.
> 
> I believe you are looking to override these two from
> ComputeServiceProperties. Use ContextBuilder.overrides (or set java
> system properties) to do so!
> 
> Hope this helps,
> -A
> 
>   /**
>    * Initial period between the ComputeService's node polls.
> Subsequent periods increase exponentially
>    * (based on the backoff factor) and become constant when the
> maximum period is reached.
>    * The unit is milliseconds.
>    */
>   public static final String POLL_INITIAL_PERIOD =
> "jclouds.compute.poll-status.initial-period";
> 
>   /**
>    * Once the exponentially increasing period between ComputeService's node
>    * polls has reached this maximum period, it remains at this value.
>    * The unit is milliseconds.
>    */
>   public static final String POLL_MAX_PERIOD =
> "jclouds.compute.poll-status.max-period";
> 
> 
> On Thu, Nov 20, 2014 at 12:42 AM, Yaron Rosenbaum
> <ya...@gmail.com> wrote:
>> Background:
>> 
>> I am using jClouds to create and maintain a cluster. My cluster uses spot instances.
>> 
>> As I understand it, jClouds is polling AWS to see whether the requested nodes have been created.
>> This polling, however, happens too frequently for AWS - which blocks these requests returning an error.
>> jClouds misinterprets this error as a failure to create, but leaves the spot request - which is eventually fulfilled.
>> The created nodes are not configured by jClouds, and are left orphaned.
>> 
>> In my case - this endlessly creates more and more nodes.
>> ————————
>> 
>> 1) Is it possible to specify polling interval for new Spot instance requests ? How ?
>> 2) Is it possible to ignore certain errors ?
>> 
>> This is a blocker for me, so any help would be appreciated.
>> 
>> 
>> (Y)
>> 


Re: #767 - Creating multiple spot instances fails. Status polling too frequent?

Posted by Adrian Cole <ad...@gmail.com>.
Hi, Yaron.

I believe you are looking to override these two from
ComputeServiceProperties. Use ContextBuilder.overrides (or set java
system properties) to do so!

Hope this helps,
-A

   /**
    * Initial period between the ComputeService's node polls.
Subsequent periods increase exponentially
    * (based on the backoff factor) and become constant when the
maximum period is reached.
    * The unit is milliseconds.
    */
   public static final String POLL_INITIAL_PERIOD =
"jclouds.compute.poll-status.initial-period";

   /**
    * Once the exponentially increasing period between ComputeService's node
    * polls has reached this maximum period, it remains at this value.
    * The unit is milliseconds.
    */
   public static final String POLL_MAX_PERIOD =
"jclouds.compute.poll-status.max-period";


On Thu, Nov 20, 2014 at 12:42 AM, Yaron Rosenbaum
<ya...@gmail.com> wrote:
> Background:
>
> I am using jClouds to create and maintain a cluster. My cluster uses spot instances.
>
> As I understand it, jClouds is polling AWS to see whether the requested nodes have been created.
> This polling, however, happens too frequently for AWS - which blocks these requests returning an error.
> jClouds misinterprets this error as a failure to create, but leaves the spot request - which is eventually fulfilled.
> The created nodes are not configured by jClouds, and are left orphaned.
>
> In my case - this endlessly creates more and more nodes.
> ————————
>
> 1) Is it possible to specify polling interval for new Spot instance requests ? How ?
> 2) Is it possible to ignore certain errors ?
>
> This is a blocker for me, so any help would be appreciated.
>
>
> (Y)
>