node-triton icon indicating copy to clipboard operation
node-triton copied to clipboard

Want a way to list failed instances

Open melloc opened this issue 8 years ago • 3 comments

The sdc-listmachines command has the --tombstone flag. It would be nice if triton had a similar command for helping list failed instances.

melloc avatar Feb 19 '17 10:02 melloc

There is triton ls state=destroyed but with that isn't exactly the same. Agreed that triton should support this (and call it out more obviously in the triton ls --help docs.

I'd be more inclined to have something like triton ls state=all than an option called --tombstone, but I don't care that strongly if others disagree.

trentm avatar Feb 20 '17 20:02 trentm

Simply having triton ls state=failed seems way more intuitive, and providing parity with the UI to me.

daanemanz avatar Apr 11 '17 17:04 daanemanz

@daanemanz Agreed.

Some details (because I looked last time, forgot, then looked again):

  • the tombstone option (on sdc-listmachines and on CloudAPI ListMachines) lists instances with states "failed" and "deleted". (Note that "deleted" is cloudapi's name for state="destroyed". It is unfortunate that it translates this state name.)
  • triton ls currently does support triton ls state=destroyed. It does NOT currently support triton ls state=deleted, even though it shows "state=deleted" for those destroyed instances. This is CloudAPI ListMachines' fault.

Proposal:

  • Fix CloudAPI to support ListMachines?state=deleted to be look up destroyed instances. Also document (if it doesn't already) that Triton doesn't guarantee keeping records for all time for destroyed instances. I.e. this is "recent" destroyed instances.
  • Possibly update triton ls to translate triton ls state=deleted to ListMachines?state=destroyed if version sniffing shows that CloudAPI doesn't yet support the previous change.
  • Update CloudAPI to support ListMachines?state=failed to return failed instances. As with the first point, note that this is "recent" failed instances. I.e. no guarantee to keep details for all time on failed instances.
  • Once the above are in, deprecate (but don't yet remove) the ?tombstone query param on ListMachines.
  • Possibly update triton ls to use ListMachines?tombstone=true option to simular triton ls state=failed if version sniffing shows that CloudAPI doesn't yet support ?state=failed.

trentm avatar Apr 11 '17 17:04 trentm