fluvio
fluvio copied to clipboard
Exit `fluvio cluster start` early when CLI know versions do not match
No amount of waiting will result in a cluster starting correctly, so I think instead of spinning, we can safely exit and give a useful error to the user.
2021-12-14T21:16:53.969537Z WARN install_fluvio{namespace="default"}:try_connect_to_sc{config=FluvioConfig { endpoint: "172.18.0.2:30003", use_spu_local_address: false, tls: Disabled } platform_version=Version { major: 0, minor: 9, patch: 16 }}: fluvio_cluster::start::common: Current Version 0.9.15 is not same as expected: 0.9.16
Possibly when we find this scenario, we might want to fluvio cluster delete
for the user? Perhaps this can be opt-in with a flag like --cleanup-cluster-on-error
or something along those lines.
Repro steps:
Developers are the ones mostly impacted by this behavior. You can repro by intentionally starting a cluster w/ a different version as the CLI.
In most cases, if you have the latest stable CLI, start the cluster like this:
RUST_LOG=debug fluvio cluster start --image-version latest
Made an attempt to fix this, but it turned out that the upgrade process relies on this mismatch failure not exit early. It can potentially take a a minute for updated pods to start and older pods to terminate.
Possibly might be able to exit early if we are specifically performing an install but wait when we're doing an upgrade.
Maybe --cleanup-cluster-on-error
should be the default
hello @tjtelan how is it going, can i take it
@0xkelvin Yes, please go ahead an take this if you are interested