Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster Deletion #65

Open
rnc opened this issue Feb 9, 2023 · 2 comments
Open

Cluster Deletion #65

rnc opened this issue Feb 9, 2023 · 2 comments

Comments

@rnc
Copy link
Contributor

rnc commented Feb 9, 2023

I noticed this when accidentally running clean twice.

The trace looks like:

osia clean --cluster-name=nick
2023-02-09 14:37:27 install.py:151    INFO Found installer at installers/4.12.2
FATAL Failed while preparing to destroy cluster: open nick/metadata.json: no such file or directory 
2023-02-09 14:37:27 executor.py:102   ERROR Re-executing installer due to error (InstallerExecutionException(...), 'Failed execution of installer')
FATAL Failed while preparing to destroy cluster: open nick/metadata.json: no such file or directory 
2023-02-09 14:37:27 executor.py:102   ERROR Re-executing installer due to error (InstallerExecutionException(...), 'Failed execution of installer')
2023-02-09 14:37:27 storage.py:64     INFO Removing cluster directory from git repository nick
Traceback (most recent call last):
  File "/home/rnc/.virtualenvs/osia-_uzfVagR-py3.11/bin/osia", line 5, in <module>
    main_cli()

I think this is due to the perhaps slightly confusing try/catch in delete_cluster. If that try/catch is removed then i get

osia clean --cluster-name=nick2
2023-02-09 14:44:37 install.py:151    INFO Found installer at installers/4.12.2
FATAL Failed while preparing to destroy cluster: open nick2/metadata.json: no such file or directory 
Traceback (most recent call last):
  File "/home/rnc/.virtualenvs/osia-_uzfVagR-py3.11/bin/osia", line 5, in <module>
    main_cli()
  File "/home/rnc/Work/OpenStack/osia/osia/cli.py", line 211, in main_cli
    args.func(args)
  File "/home/rnc/Work/OpenStack/osia/osia/cli.py", line 130, in _exec_delete_cluster
    delete_cluster(conf['cluster_name'], conf['installer'])
  File "/home/rnc/Work/OpenStack/osia/osia/installer/executor.py", line 99, in delete_cluster
    execute_installer(installer, cluster_name, 'destroy')
  File "/home/rnc/Work/OpenStack/osia/osia/installer/executor.py", line 43, in execute_installer
    raise InstallerExecutionException("Failed execution of installer")
osia.installer.executor.InstallerExecutionException: (InstallerExecutionException(...), 'Failed execution of installer')

which seems a bit easier to understand.

@rnc
Copy link
Contributor Author

rnc commented Feb 10, 2023

Question - what is the for loop for (added in 7077f5a ) ?

@mijaros
Copy link
Contributor

mijaros commented Feb 10, 2023

@rnc the reason for the reattempt to execute delete is due to the instability of openshift-install especially in the openstack environment. It tends to happen, that the cluster removal fails and leaves behind some residue resources, the re-execution mitigates vast majority of these cases - yes it still can happen that the second attempt will fail, then the resulting terraform files are left intact, but it can solves the issue in many situations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants