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

Remove StorageClusterInitialization #789

Merged

Conversation

jarrpa
Copy link
Member

@jarrpa jarrpa commented Sep 28, 2020

We want finer control over which resources we reconcile and which we don't. This PR removes the need for a StorageClusterInitialization CR by implementing a set of string to control how a given type of resource is reconciled. The default is set to only reconcile if it doesn't exist, to maintain compatibility with current behavior on upgrade.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
@jarrpa jarrpa force-pushed the remove-initialization branch 2 times, most recently from be72df1 to e7b55fc Compare September 29, 2020 18:31
@jarrpa jarrpa closed this Sep 30, 2020
@jarrpa jarrpa reopened this Sep 30, 2020
Copy link
Contributor

@obnoxxx obnoxxx left a comment

Choose a reason for hiding this comment

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

General direction looks great.
First thing that caught my eye: ReconcileStratery ...

@@ -25,6 +25,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
)

// ReconcileStratery is a string representing how we want to reconcile
// (or not) a particular resource
type ReconcileStratery string
Copy link
Contributor

Choose a reason for hiding this comment

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

s/ReconcileStatery/ReconcileStrategy/ everywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

HAH! At least the typo was consistent ;D Fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, it built...

This commit removes the need for a StorageClusterInitialization CR by
replacing it with a set of strings to controll the reconciliation of
previously initialized CRs. This changes the behavior for reapplying the
initialization, requiring the admin to set each resource's strategy to
"manage", wait for reconciliation, then back to "" or "default".

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
@openshift-ci-robot
Copy link

@jarrpa: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/ocs-operator-e2e-aws e7b55fc link /test ocs-operator-e2e-aws
ci/prow/red-hat-storage-ocs-ci-e2e-aws c23a782 link /test red-hat-storage-ocs-ci-e2e-aws

Full PR test history. Your PR dashboard.

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 kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@obnoxxx obnoxxx left a comment

Choose a reason for hiding this comment

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

/lgtm

thanks for the update

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 2, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: obnoxxx

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 2, 2020
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit d085c46 into red-hat-storage:master Oct 2, 2020
@jarrpa
Copy link
Member Author

jarrpa commented Oct 6, 2020

/cherrypick release-4.6

@openshift-cherrypick-robot

@jarrpa: #789 failed to apply on top of branch "release-4.6":

Applying: Refactor ensureSnapshotClasses()
Applying: Remove StorageClusterInitialization
Using index info to reconstruct a base tree...
M	pkg/apis/ocs/v1/storagecluster_types.go
M	pkg/controller/storagecluster/cephblockpools_test.go
M	pkg/controller/storagecluster/cephfilesystem_test.go
M	pkg/controller/storagecluster/initialization_reconciler_test.go
M	pkg/controller/storagecluster/storagecluster_controller.go
M	pkg/controller/storagecluster/storagecluster_controller_test.go
Falling back to patching base and 3-way merge...
Removing pkg/controller/storagecluster/storageclusterinit.go
Auto-merging pkg/controller/storagecluster/storagecluster_controller_test.go
Auto-merging pkg/controller/storagecluster/storagecluster_controller.go
CONFLICT (content): Merge conflict in pkg/controller/storagecluster/storagecluster_controller.go
Auto-merging pkg/controller/storagecluster/initialization_reconciler_test.go
Auto-merging pkg/controller/storagecluster/cephfilesystem_test.go
CONFLICT (content): Merge conflict in pkg/controller/storagecluster/cephfilesystem_test.go
Auto-merging pkg/controller/storagecluster/cephblockpools_test.go
CONFLICT (content): Merge conflict in pkg/controller/storagecluster/cephblockpools_test.go
Removing pkg/apis/ocs/v1/storageclusterinitialization_types.go
Auto-merging pkg/apis/ocs/v1/storagecluster_types.go
CONFLICT (content): Merge conflict in pkg/apis/ocs/v1/storagecluster_types.go
Removing functests/storageclusterinitialization_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Remove StorageClusterInitialization
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-4.6

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 kubernetes/test-infra repository.

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.

None yet

6 participants