redhat-partner-solutions / crucible

Apache License 2.0
35 stars 59 forks source link

Don't create a new cluster in Assisted Installer if it already exists #289

Open gojeaqui opened 10 months ago

gojeaqui commented 10 months ago

Feature description

It is a common problem that not all prerequisites are fulfilled in clients and so the deploy_cluster.yml playbook fails at some step.

It would be nice if the playbook checked the Assisted Installer API to look for clusters with the same name as the one being installed from the inventory and to check the status.

Perhaps there could be a prompt asking the user if they want to erase the cluster and start again or continue the installation where it failed (I'm getting timeout failures because the image download speed is slow).

Since I didn't know much about Assisted Installer or Crucible at one point I had 20 clusters created in Assisted Installer because I had to execute the deploy_cluster.yml playbook many times.

Thanks

Required statements

nocturnalastro commented 10 months ago

The issue here is the effort it requires to check if all the variables are the same so that we can re-use this id is quite large. And some variables are required at creation.

We could perhaps make a helper playbook to go an tidy up any orphaned entries.

gojeaqui commented 10 months ago

Yes, but what about warning the user?

Checking if there exists a cluster with the same name and prompting the user to abort everything or to delete the cluster and start over?

I'm asking because when I started with all this I wasn't aware of how everything worked and ended up with 20 clusters in Assisted Installer until I discovered the UI.

nocturnalastro commented 10 months ago

The process shouldn't be interrupted if possible.

I'll have a think on how we can provide the info to the user without breaking the flow.

Thanks for the feedback :)

gojeaqui commented 10 months ago

No, thank you.

The playbooks are very useful.

But there should be a way to tell the user that the Assisted Installer UI is accesible, perhaps in the documentation is enough.

And also to warn about the creation of multiple clusters.

Thanks!

gojeaqui commented 10 months ago

The process shouldn't be interrupted if possible.

@nocturnalastro sorry to bother you with this, but I think this is an important thing enough to interrrupt the process so the users checks what is going on.

Just my 2 cents, best regards.