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

[opsrc] Fix OperatorSource reconciliation error #103

Merged
merged 1 commit into from Feb 12, 2019

Conversation

tkashem
Copy link
Collaborator

@tkashem tkashem commented Feb 5, 2019

OperatorSource reconciler fails in 'Configuring' phase if the
following conditions are true:

  • The CatalogSourceConfig object already exists.
  • It is already owned by the OperatorSource object.

The reconciler appends the OperatorSource object to the
OwnerReference list of the CatalogSourceConfig without checking
whether it is already owned by the same OperatorSource. This causes
the Update API to throw an error.

Solution: Remove the given OperatorSource object from the
OwnerReference list to ensure it is not specified more than once.

Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1672701.

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 5, 2019
@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 5, 2019
@tkashem tkashem force-pushed the csc-update branch 2 times, most recently from 46e2b52 to 33241f9 Compare February 5, 2019 19:13
@tkashem tkashem changed the title [WIP] [opsrc] Fix OperatorSource reconciliation error [opsrc] Fix OperatorSource reconciliation error Feb 5, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 5, 2019
@tkashem
Copy link
Collaborator Author

tkashem commented Feb 5, 2019

@kevinrizza @aravindhp take a look when you have time.

@@ -95,6 +95,8 @@ func (r *configuringReconciler) Reconcile(ctx context.Context, in *v1alpha1.Oper
}

cscExisting.EnsureGVK()
cscExisting.RemoveOwner(in.GetUID())
Copy link
Member

Choose a reason for hiding this comment

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

Please add a comment mentioning why you are removing the owner. Looks good to me otherwise.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@aravindhp done

Copy link
Member

@aravindhp aravindhp left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 5, 2019
Copy link
Member

@aravindhp aravindhp left a comment

Choose a reason for hiding this comment

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

@tkashem please link to the bugzilla in the commit and PR message.

@kevinrizza
Copy link
Member

/lgtm

@openshift-bot
Copy link
Contributor

/retest

1 similar comment
@openshift-merge-robot
Copy link
Contributor

/retest

@tkashem
Copy link
Collaborator Author

tkashem commented Feb 6, 2019

/approve

@tkashem
Copy link
Collaborator Author

tkashem commented Feb 6, 2019

/approve cancel

OperatorSource reconciler fails in 'Configuring' phase if the
following conditions are true:
 - The CatalogSourceConfig object already exists.
 - It is already owned by the OperatorSource object.

The reconciler appends the OperatorSource object to the
OwnerReference list of the CatalogSourceConfig without checking
whether it is already owned by the same OperatorSource. This causes
the Update API to throw an error.

Solution: Remove the given OperatorSource object from the
OwnerReference list to ensure it is not specified more than once

https://bugzilla.redhat.com/show_bug.cgi?id=1672701
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2019
@tkashem
Copy link
Collaborator Author

tkashem commented Feb 6, 2019

/approve

@tkashem
Copy link
Collaborator Author

tkashem commented Feb 6, 2019

@aravindhp @kevinrizza updated the commit with bugzilla link, can I have lgtm?

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tkashem

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

@aravindhp
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2019
@kevinrizza
Copy link
Member

/lgtm

@tkashem
Copy link
Collaborator Author

tkashem commented Feb 12, 2019

/test e2e-aws-operator

@tkashem
Copy link
Collaborator Author

tkashem commented Feb 12, 2019

/retest e2e-aws

@tkashem
Copy link
Collaborator Author

tkashem commented Feb 12, 2019

/test e2e-aws

@aravindhp aravindhp mentioned this pull request Feb 12, 2019
@tkashem
Copy link
Collaborator Author

tkashem commented Feb 12, 2019

/test e2e-aws

2 similar comments
@tkashem
Copy link
Collaborator Author

tkashem commented Feb 12, 2019

/test e2e-aws

@tkashem
Copy link
Collaborator Author

tkashem commented Feb 12, 2019

/test e2e-aws

@openshift-merge-robot openshift-merge-robot merged commit 58438d9 into operator-framework:master Feb 12, 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants