Skip to content

Conversation

@atiratree
Copy link
Member

@atiratree atiratree commented May 8, 2023

@atiratree
Copy link
Member Author

The CI passes even without operator PR being merged. In RCM logs we can that the leader election obtains an incorrect default lock - this could cause a race if an old instance of RCM would use the original openshift-route-controllers lock. We still have to wait for the operator PR as this race is not detected by CI. After that we should check the logs/events before merging this PR to ensure the correct lock is being used.

event.go:298] Event(v1.ObjectReference{Kind:"Lease", Namespace:"openshift-route-controller-manager", Name:"route-controller-manager", Name:"route-controller-manager-lock", UID:"9946ed27-bfae-4184-a7e3-8949241bc8f2", APIVersion:"coordination.k8s.io/v1", ResourceVersion:"23162", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' route-controller-78cd8495c7-kxr9d_5496b873-aff5-4ffa-a591-15f345bb12c7 became leader 

@atiratree
Copy link
Member Author

/test all
to consume changes from openshift/cluster-openshift-controller-manager-operator#288, then manually confirm (#22 (comment))

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 22, 2023

@atiratree: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@atiratree
Copy link
Member Author

correct lease is being picked up in the recent run

event.go:298] Event(v1.ObjectReference{Kind:"Lease", Namespace:"openshift-route-controller-manager", Name:"openshift-route-controllers", UID:"32ce9fd8-9a8b-4b65-8531-db4b48f908ec", APIVersion:"coordination.k8s.io/v1", ResourceVersion:"20139", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' route-controller-manager-867999cd9b-xjrxk_baa8fad5-3dbb-4b65-af4b-d0d848a092be became leader


type ControllerContext struct {
// TODO: Make this minimal config instead of passing entire controller manager config
type EnhancedControllerContext struct {
Copy link
Member

Choose a reason for hiding this comment

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

Why the rename from ControllerContext to EnhancedControllerContext? Is ControllerContext no longer a valid keyword?

Copy link
Member Author

@atiratree atiratree May 24, 2023

Choose a reason for hiding this comment

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

to distinguish it from the embedded controllercmd.ControllerContext - we will need the embedded one later refactoring when accessing for example the EventRecorder

)

// TODO make this an actual API server built on the genericapiserver
func RunControllerServer(servingInfo configv1.HTTPServingInfo, kubeExternal clientgoclientset.Interface) error {
Copy link
Member

Choose a reason for hiding this comment

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

RunControllerServer is no longer needed? Has it been ever used before?

Copy link
Member Author

Choose a reason for hiding this comment

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

it was run before, now it is responsibility of the library-go

}

// only serve if we have serving information.
if config.ServingInfo != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Has ServingInfo ever been set?

Copy link
Member Author

Choose a reason for hiding this comment

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

probably not from the outside, but we are calling SetRecommendedHTTPServingInfoDefaults which initializes it


config := obj.(*openshiftcontrolplanev1.OpenShiftControllerManagerConfig)
/// this isn't allowed to be nil when by itself.
// TODO remove this when the old path is gone.
Copy link
Member

Choose a reason for hiding this comment

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

Removing ServingInfo is probably related to this action?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is a legacy TODO, when the code was still in origin

@ingvagabund ingvagabund added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 24, 2023
@ingvagabund
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 24, 2023
@ingvagabund ingvagabund added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label May 24, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: atiratree, ingvagabund

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:

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

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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants