You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Rajaratnam Rajkumar <rr...@gmail.com> on 2014/10/16 19:17:34 UTC

How to destroy an instance without node id?

Hi,

Is there any way to destroy a node without node id?

Here is what I am trying to do.

                                        String group = uniqueString();

             ComputeService computeService = iaasProvider
            .getComputeService();
            Template template = // some template

            // create and start a node
            Set<? extends NodeMetadata> nodes = computeService
            .createNodesInGroup(group, 1, template);

            node = nodes.iterator().next();

                                        if (null == node.getId()) {
                                             // destroy the node
                                        }

In some situations I am getting node id null. I want to terminate that
instance at that point.

Please let me know how can do it?

Thanks.

Re: How to destroy an instance without node id?

Posted by Andrew Phillips <an...@apache.org>.
> I am using EC2. Most of the time it works fine. But sometimes node id null.

Do you currently have a node in EC2 that exhibits this behaviour, or  
is this relatively frequent? Could you send a screenshot of what the  
EC2 console shows for a node like this?

Regards

ap

Re: How to destroy an instance without node id?

Posted by Rajaratnam Rajkumar <rr...@gmail.com>.
Hi Andrew,

On Thu, Oct 16, 2014 at 10:50 PM, Andrew Phillips <an...@apache.org>
wrote:

> Forwarding to user@...
>
> Hi Rajaratnam
>
>  In some situations I am getting node id null. I want to terminate that
>> instance at that point.
>>
>
> Could you give us some more details about which APIs/providers you're
> using? It would be interesting to know where the null IDs are coming
> from...that doesn't sound right...
>

I am using EC2. Most of the time it works fine. But sometimes node id null.


>
> Thanks
>
> ap
>
>
> Quoting Rajaratnam Rajkumar <rr...@gmail.com>:
>
>  Hi,
>>
>> Is there any way to destroy a node without node id?
>>
>> Here is what I am trying to do.
>>
>>                                         String group = uniqueString();
>>
>>              ComputeService computeService = iaasProvider
>>             .getComputeService();
>>             Template template = // some template
>>
>>             // create and start a node
>>             Set<? extends NodeMetadata> nodes = computeService
>>             .createNodesInGroup(group, 1, template);
>>
>>             node = nodes.iterator().next();
>>
>>                                         if (null == node.getId()) {
>>                                              // destroy the node
>>                                         }
>>
>> In some situations I am getting node id null. I want to terminate that
>> instance at that point.
>>
>> Please let me know how can do it?
>>
>> Thanks.
>>
>>
>
>
> --
> Andrew Phillips
> Apache jclouds
>

Re: How to destroy an instance without node id?

Posted by Andrew Phillips <an...@apache.org>.
Forwarding to user@...

Hi Rajaratnam

> In some situations I am getting node id null. I want to terminate that
> instance at that point.

Could you give us some more details about which APIs/providers you're  
using? It would be interesting to know where the null IDs are coming  
from...that doesn't sound right...

Thanks

ap

Quoting Rajaratnam Rajkumar <rr...@gmail.com>:

> Hi,
>
> Is there any way to destroy a node without node id?
>
> Here is what I am trying to do.
>
>                                         String group = uniqueString();
>
>              ComputeService computeService = iaasProvider
>             .getComputeService();
>             Template template = // some template
>
>             // create and start a node
>             Set<? extends NodeMetadata> nodes = computeService
>             .createNodesInGroup(group, 1, template);
>
>             node = nodes.iterator().next();
>
>                                         if (null == node.getId()) {
>                                              // destroy the node
>                                         }
>
> In some situations I am getting node id null. I want to terminate that
> instance at that point.
>
> Please let me know how can do it?
>
> Thanks.
>



-- 
Andrew Phillips
Apache jclouds

Re: How to destroy an instance without node id?

Posted by Rajaratnam Rajkumar <rr...@gmail.com>.
Hi,

Forgot to mention that I am using 1.8.0

And in what situations node id can be null?

On Thu, Oct 16, 2014 at 10:47 PM, Rajaratnam Rajkumar <rr...@gmail.com>
wrote:

> Hi,
>
> Is there any way to destroy a node without node id?
>
> Here is what I am trying to do.
>
>                                         String group = uniqueString();
>
>              ComputeService computeService = iaasProvider
>             .getComputeService();
>             Template template = // some template
>
>             // create and start a node
>             Set<? extends NodeMetadata> nodes = computeService
>             .createNodesInGroup(group, 1, template);
>
>             node = nodes.iterator().next();
>
>                                         if (null == node.getId()) {
>                                              // destroy the node
>                                         }
>
> In some situations I am getting node id null. I want to terminate that
> instance at that point.
>
> Please let me know how can do it?
>
> Thanks.
>