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

🐛 Controller: Return error when started more than once #1139

Merged

Conversation

alvaroaleman
Copy link
Member

@alvaroaleman alvaroaleman commented Aug 25, 2020

Starting the controller more than once is always wrong. Today, it will
result in:

  • Its active workqueue being re-created, resulting in a data race,
    breaking the guarantee of "there is at most one worker on a given
    queue key" and messed-up metrics
  • Starting double as many workers as configured

This PR changes that to instead return an error on all subsequent Start
attempts.

/assign @vincepri

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 25, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 25, 2020
Starting the controller more than once is always wrong. Today, it will
result in:
* Its active workqueue being re-created, resulting in a data race,
  breaking the guarantee of "there is at most one worker on a given
  queue key" and messed-up metrics
* Starting double as many workers as configured

This PR changes that to instead return an error on all subsequent Start
attempts.
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 25, 2020
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 26, 2020
@k8s-ci-robot
Copy link
Contributor

@vincepri: The provided milestone is not valid for this repository. Milestones in this repository: [Next, v0.5.x, v0.6.x, v0.7.x]

Use /milestone clear to clear the milestone.

In response to this:

/milestone v0.3.7

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.

@vincepri
Copy link
Member

/milestone v0.7.x

@k8s-ci-robot k8s-ci-robot added this to the v0.7.x milestone Aug 26, 2020
@k8s-ci-robot k8s-ci-robot merged commit 7dfe893 into kubernetes-sigs:master Aug 26, 2020
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", 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

3 participants