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

✨ Add a condition of clock sync. #296

Conversation

xuezhaojun
Copy link
Member

Summary

Add a condition to represent whether the clock of hub and agents are synced.

Related issue(s)

Fixes #

Signed-off-by: xuezhaojun <zxue@redhat.com>
@xuezhaojun
Copy link
Member Author

/assign @qiujian16

@@ -200,6 +200,8 @@ const (
// cluster is available, the kube-apiserver is healthy and the Klusterlet agent is
// running with the minimum deployment on this managed cluster
ManagedClusterConditionAvailable string = "ManagedClusterConditionAvailable"
// ManagedClusterConditionClockSynced means the clock between the hub and the agent is synced.
ManagedClusterConditionClockSynced string = "ManagedClusterConditionClockSynced"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could it be a reason under available condition?

Copy link
Member Author

@xuezhaojun xuezhaojun Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concern here is clock out-of-sync doesn't equal to Available = Unknown.

The trigger point of ClockSynced = False is that hub is 1 leaseDuration faster than the agent(the default gracePeriod is 5 * leaseDuration). At that point, the managed cluster is still available but we already want to get users attention and want to warn they to check on NTP status in their environment.

Making OutOfSync a reason of UnKnown is also a choice, but from user experience perspective, kind of feel there should be an independent condition to warn the user before things really go wrong and can't function.

@qiujian16
Copy link
Member

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 16, 2023
Copy link
Contributor

openshift-ci bot commented Nov 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 8bf9424 into open-cluster-management-io:main Nov 16, 2023
10 checks passed
@xuezhaojun xuezhaojun deleted the add-managedcluster-condition-NTP-error branch November 16, 2023 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants