open-cluster-management-io / registration

hub / spoke registration controllers
Apache License 2.0
42 stars 58 forks source link

ensure a cluster lease is updated after the cluster is restored #280

Closed skeeey closed 1 year ago

skeeey commented 1 year ago

Signed-off-by: Wei Liu liuweixa@redhat.com

skeeey commented 1 year ago

/assign @qiujian16

qiujian16 commented 1 year ago

need more context on how will it resolve restore issue

skeeey commented 1 year ago

need more context on how will it resolve restore issue

There is a case,

  1. import a managed cluster on hub firstly
  2. stop the hub, and delete the managed cluster
  3. start the hub, and recreate the managed cluster (the hub can be another hub, and it have the same apiserver url and ca with the first hub)

The managed cluster available status will transition between true and unknown, this because, when we recreate the managed cluster, the lease update routine has already stopped (we deleted the managed cluster, the lease controller capture the not found error and stop the update routine), and the registration agent does not restart (the cluster bootstrap secret is not changed), so the update routine will not start again

qiujian16 commented 1 year ago

/approve /lgtm

openshift-ci[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, skeeey

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/open-cluster-management-io/registration/blob/main/OWNERS)~~ [qiujian16,skeeey] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment