platform9 / cctl

Apache License 2.0
47 stars 8 forks source link

Upgrade can delete machine without creating a new one #93

Open dlipovetsky opened 6 years ago

dlipovetsky commented 6 years ago

Let's suppose the user runs cctl machine upgrade, and deleteMachine succeeds, but createMachine fails. That means the machine has been removed from the on-disk state, and cctl machine upgrade cannot be invoked again; cctl create machine must be invoked.

dlipovetsky commented 6 years ago

If we don't update state after delete, another invocation of machine upgrade will fail unless delete is idempotent. It isn't yet (e.g. drain/delete fail if the node isn't found).

dlipovetsky commented 6 years ago

@puneetguptanitj FYI

puneetguptanitj commented 6 years ago

Thanks Daniel, once we start persisting kubeconfig into cctl-state we might be able to make drain and delete idempotent as well. (As we would be able to execute it directly from the machine where we run cctl). Will update the ticket with findings soon.

puneetguptanitj commented 6 years ago

This can be better addressed through in place upgrade, that might allow us to not do drain and/or delete