ScaleComputing / HyperCoreAnsibleCollection

Official Ansible collection for Scale Computing SC//HyperCore (HC3) v1 API
GNU General Public License v3.0
12 stars 8 forks source link

Cleanup unneeded condition #225

Closed justinc1 closed 1 year ago

justinc1 commented 1 year ago

The version_update_status_info uses undocumented API endpoint, it is hard to know what is returned. I believe we wanted to have ==COMPLETE, not ==COMPLETED.

I believe whole condition is there only to prevent starting second upgrade before the first one is finished - .update_status != "IN PROGRESS" is sufficient.

A corner case would be if .update_status == SOME_ERROR or similar. In this case != "IN PROGRESS" would still allow starting an upgrade. The ==COMPLETE is again not needed - better to remove it, it just adds to confusion.

justinc1 commented 1 year ago

A stupid question for @PolonaM - the update_status_version_info module should never return COMPLETED in .update_status field? It is not even relevant for this PR, but it would be a nightmare if we would sometimes have COMPLETE, and sometimes COMPLETED.

PolonaM commented 1 year ago

Yes, it should never be COMPLETED, at least from what I saw, It is always COMPLETE.