Skip to content

Conversation

@smarterclayton
Copy link
Contributor

Identify what sort of change we are making to the cluster in order
to better handle the different states. Does not change status reporting
or the internal sync which will be in a follow up commit.

The three states are:

  • Initializing - we haven't yet completed a payload
  • Updating - we're moving between two payloads of different versions
  • Reconciling - we're level on a completed payload

The states will allow us to more efficiently reconcile, start faster,
and be safer during upgrades.

Extracted from #131

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 9, 2019
@smarterclayton
Copy link
Contributor Author

/assign @abhinavdahiya

Identify what sort of change we are making to the cluster in order
to better handle the different states. Does not change status reporting
or the internal sync which will be in a follow up commit.

The three states are:

* Initializing - we haven't yet completed a payload
* Updating - we're moving between two payloads of different versions
* Reconciling - we're level on a completed payload

The states will allow us to more efficiently reconcile, start faster,
and be safer during upgrades.
@smarterclayton
Copy link
Contributor Author

Made the resource builder aware of the mode without actually changing any of our logic.

Will allow different behavior based on whether we are reconciling,
installing, or upgrading.
return builder.Do(ctx)
}

func hasNeverReachedLevel(cv *configv1.ClusterVersion) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a stretch :P (sorry my brain just went there)
but, what if somebody overrides the desired more than 10 times, so there will be all partial and we will truncate to all partial because

if len(config.Status.History) > 10 {
config.Status.History = config.Status.History[:10]
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hrm, we should leave the last completed. We should never prune to no completed. Good catch, will change

Currently history pruning could lose the last completed entry. To
preserve the user's last successful outcome, always end the history
with a completed entry if one exists. This also prevents the
initializing state from being detected if the user triggers a lot
of failed history changes.
@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 13, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, smarterclayton

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,smarterclayton]

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

@openshift-merge-robot openshift-merge-robot merged commit 21a2039 into openshift:master Mar 13, 2019
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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants