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

Block deletion of machines from "inventory of machines" if they are part of a cluster or delete them from the cluster as well #160

Closed
Martin-Weiss opened this issue Feb 1, 2024 · 5 comments · Fixed by #167
Assignees
Labels
enhancement New feature or request

Comments

@Martin-Weiss
Copy link

At the moment the process of deleting machines from "inventory of machines" once they are part of a cluster does not remove them from the cluster. At least not properly.

Deleting machines on the cluster side of things deletes them on the machine side of things..

So this is not very consistent and should be improved.

Either deletion on both sides should work or if supported only on one side - the other side should block the user.

@Martin-Weiss
Copy link
Author

I would even like the option to remove a machine from one cluster and then add it to another cluster. So not sure why we remove the inventory completely when we delete the machine from a cluster..

@aalves08
Copy link
Contributor

@davidcassany can we delete "inventory of machines" from a cluster from the UI or should we just block the deletion of the "inventory of machines" resource on the UI?

@aalves08 aalves08 added the enhancement New feature or request label Feb 14, 2024
@aalves08 aalves08 self-assigned this Feb 14, 2024
@anmazzotti
Copy link

I think it's better to just block the deletion of machine inventories from the UI.
However this can also be problematic, especially when manually fixing unexpected conditions.

The documentation for the Reset already points out the Rancher default UI.
The specific Elemental UI is not used for this scenario: https://elemental.docs.rancher.com/reset#machine-reset

@aalves08
Copy link
Contributor

As per Slack conversation, was agreed on the following:
the delete button can be disabled only for machine inventories that have a "AdoptionReady" true condition

Last Transition Time:  2024-02-23T11:52:43Z
Message:               Successfully adopted
Reason:                SuccessfullyAdopted
Status:                True
Type:                  AdoptionReady

@juadk
Copy link
Collaborator

juadk commented Mar 19, 2024

Tested successfully with elemental ui extension 1.3.1-rc2:

  • With AdoptionReady set to False:
    - lastTransitionTime: '2024-03-19T08:42:00Z'
      message: Waiting to be adopted
      reason: WaitingToBeAdopted
      status: 'False'
      type: AdoptionReady
Screenshot 2024-03-19 at 09 46 57

The machine inventory above can be deleted.

  • With AdoptionReady to True:
    - lastTransitionTime: '2024-03-19T08:49:31Z'
      message: Successfully adopted
      reason: SuccessfullyAdopted
      status: 'True'
      type: AdoptionReady
Screenshot 2024-03-19 at 09 49 55

The machine inventory above cannot be deleted as expected.

@juadk juadk closed this as completed Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants