pandastrike / huxley

API and CLI for Docker Deployment
9 stars 1 forks source link

Question: How to Handle Failed Pending Commands #99

Closed freeformflow closed 9 years ago

freeformflow commented 9 years ago

@dyoder, how should we handle records within the pending collection when the command fails?

Currently, to keep things simple for Alpha 04, whenever the command is resolved (success or failure), the pending record is deleted. How would you like to present failed commands to the user?

Christoph has suggested a schema for pending records:

commands[hash] = {command: string, status: enum}

This has the benefit of storing only what we need while allowing the CLI to display in the Request [command] has status [status]. format. At what point do we delete pending records, or do we just maintain a history for the profile?

PandaWhisperer commented 9 years ago

Actually, my main concern is what happens when a pending action fails? What we discussed today, and what I therefore will be implementing, is that when a pending action reaches a final status, whether that's success or failure, we delete it. My concern is that this way the user has no way to find out whether it failed or succeeded, and if it failed, why.

This may be enough for the next alpha, but we probably want to provide a bit more visibility there in the future. Right now, a user would have to ssh into the cluster and manually call fleetctl.

dyoder commented 9 years ago

Pending just means it's in progress. We don't need to report success or failure.

For that, they can use the describe or ls commands.