Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.

Conversation

@stuggi
Copy link
Contributor

@stuggi stuggi commented Jul 29, 2020

As the nodesToDelete does not describe an end result of the CR,
this will be removed with this patch. To remove a specific node
or nodes the following process needs to be followed:

  1. annotate the machine/machines object corresponding to the node
    which should be removed
  2. lower the worker number of the CR of the machineset

@stuggi stuggi requested a review from luis5tb July 31, 2020 08:39
@stuggi stuggi force-pushed the remove_nodestodelete branch from 8b6405e to 9ac7498 Compare July 31, 2020 12:26
@stuggi
Copy link
Contributor Author

stuggi commented Jul 31, 2020

We might want to:

  • not delete any node before it gets annotated
  • remove the workers parameter from the CRD and
    • use the machineset to scale
    • watch machines for annotation and then start removal

@dprince
Copy link
Contributor

dprince commented Jul 31, 2020

lgtm on this commit. One related topic we might discuss is only deleting nodes that have been annotated. So essentially we'd force users to annotate any nodes created via this machineset in order to delete them as a safety feature.

@stuggi
Copy link
Contributor Author

stuggi commented Jul 31, 2020

@luis5tb what you think about this and my above comment?

@luis5tb
Copy link
Contributor

luis5tb commented Aug 10, 2020

@luis5tb what you think about this and my above comment?

Umm, I have mix feelings. On the one hand it is not a clear fit for the CRD, but on the other hand, the idea is that the user only need to know about the CRD, not about the machineset and even less about the machine objects. And, to some extend, the CRD spec and status describe the end result. The nodesToDelete on the spec describe what nodes should be tagged with that annotation, and the status which ones are actually tagged already. So it is similar to other config options I think.

Is there a reason to remove it?

@stuggi
Copy link
Contributor Author

stuggi commented Aug 28, 2020

@luis5tb what you think about this and my above comment?

Umm, I have mix feelings. On the one hand it is not a clear fit for the CRD, but on the other hand, the idea is that the user only need to know about the CRD, not about the machineset and even less about the machine objects. And, to some extend, the CRD spec and status describe the end result. The nodesToDelete on the spec describe what nodes should be tagged with that annotation, and the status which ones are actually tagged already. So it is similar to other config options I think.

Is there a reason to remove it?

The issue I see with the nodesToDelete is that as soon the delete is finished, the information in the CR is out of date.
Someone would need to edit the CR and clean the content of the nodesToDelete section as we don't want the operator
to edit its own cr.

Therefore in one of our CRD meetings (when you were on PTO) the result of discussion was that it might be better
to not use the CRD to manage the nodesToDelete and the user would need to annotate them before scaling down.

With this I thought about this again while creating this patch on if we should use the CR for scaling at all. Might it be
better/more native OCP like when we use the CRD just for configuration and for scaling using the machineset direct,
but the main thing is someone have to cleanup nodesToDelete section after a scale down which can be/will be confusing for
an end user.

As the nodesToDelete does not describe an end result of the CR,
this will be removed with this patch. To remove a specific node
or nodes the following process needs to be followed:
1. annotate the machine/machines object corresponding to the node
   which should be removed
2. lower the worker number of the CR of the machineset
@stuggi stuggi force-pushed the remove_nodestodelete branch from 9ac7498 to be1aa4b Compare September 8, 2020 13:04
@stuggi
Copy link
Contributor Author

stuggi commented Sep 8, 2020

rebased after sdk upgrade

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants