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

CNF-14357: Add timeout for Cluster provisioning #218

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

Missxiaoguo
Copy link
Collaborator

  • Add ClusterProvisionStartedAt to record the start timestamp of cluster provisioning.
  • If cluster provisioning takes longer than the time configured in spec.timeout.clusterProvisioning, the ClusterProvisioned condition will be set to false with the reason TimedOut.
  • Only check policy configuration when cluster provisioning has started and has neither failed nor timed out.
  • Requeue every 5 minutes if cluster provisioning is still in progress or unknown.
  • Change the requeue interval to 5 minutes for policy configuration as well.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 25, 2024

@Missxiaoguo: This pull request references CNF-14357 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

  • Add ClusterProvisionStartedAt to record the start timestamp of cluster provisioning.
  • If cluster provisioning takes longer than the time configured in spec.timeout.clusterProvisioning, the ClusterProvisioned condition will be set to false with the reason TimedOut.
  • Only check policy configuration when cluster provisioning has started and has neither failed nor timed out.
  • Requeue every 5 minutes if cluster provisioning is still in progress or unknown.
  • Change the requeue interval to 5 minutes for policy configuration as well.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

// has started, and not failed or timedout (completed, in-progress or unknown)
if utils.IsClusterProvisionStarted(t.object) &&
!utils.IsClusterProvisionFailed(t.object) &&
!utils.IsClusterProvisionTimedOut(t.object) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be better to have these checks in their own function, isClusterReadyForConfig, since they're used exactly the same below. We would avoid issues in case just one place is mistakenly updated.

@irinamihai
Copy link
Collaborator

/approve

Copy link

openshift-ci bot commented Sep 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: irinamihai

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 27, 2024
@tliu2021
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 27, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 21df11f into openshift-kni:main Sep 27, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants