legacy-jclouds icon indicating copy to clipboard operation
legacy-jclouds copied to clipboard

destroyNodesMatching still returns all nodes instead of terminated?

Open MosheElisha opened this issue 13 years ago • 5 comments

Hey,

I have noticed that in that in 1.5.0-alpha3 an additional notNull filter was added to the BaseComputeService.destroyNodesMatching method - and I assume it is in order to fix the bug in which the method returned all the nodes requested for termination (including nodes that were not terminated due to IllegalStateException).

Looking at the new code, I think that this:

doDestroyNode(from.getId());
return from;

Should be

return doDestroyNode(from.getId());

As from can't be null...

MosheElisha avatar Jul 31 '12 15:07 MosheElisha

from can't be null, but the returnVal of doDestroyNode can. The intent of this message was to return the last known running state, so that's why it is returning in this way. make sense?

jclouds avatar Dec 05 '12 07:12 jclouds

Oh. OK... so the @Nullable and the "destroyed" log message at the end are very confusing. I think returning only the ones that were actually terminated makes more sense to me and more usable.

MosheElisha avatar Dec 05 '12 08:12 MosheElisha

Risk of being forgotten. Can you open a github issue ?

jclouds avatar Dec 12 '12 18:12 jclouds

Sure but can you please tell me how? I thought this is a github issue... https://github.com/jclouds/jclouds/issues/766

MosheElisha avatar Dec 12 '12 20:12 MosheElisha

(Blush) whoops thought this was a pull request. Nevermind!

jclouds avatar Dec 12 '12 22:12 jclouds