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

Add CollisionCount to StatefulSetStatus for collision avoidance #49909

Closed
liyinan926 opened this issue Jul 31, 2017 · 3 comments · Fixed by #50490
Closed

Add CollisionCount to StatefulSetStatus for collision avoidance #49909

liyinan926 opened this issue Jul 31, 2017 · 3 comments · Fixed by #50490
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/apps Categorizes an issue or PR as relevant to SIG Apps.

Comments

@liyinan926
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug

What happened:
The Deployment controller uses the field CollisionCount as a collision avoidance mechanism when it needs to create name for the newest ReplicaSet. Similarly, the DaemonSet controller uses CollisionCount as a collision avoidance mechanism when it needs to create name for the newest ControllerRevision. Like the DaemonSet controller, the StatefulSet controller also creates ControllerRevision, but does not use CollisionCount for collision avoidance.

What you expected to happen:
The field CollisionCount should be added to StatefulSetStatus and used for collision avoidance like how the DaemonSet controller uses the field when creating name for the newest ControllerRevision.

How to reproduce it (as minimally and precisely as possible):
N/A.

Anything else we need to know?:
N/A.

Environment: N/A

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration**:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 31, 2017
@k8s-github-robot
Copy link

@liyinan926
There are no sig labels on this issue. Please add a sig label by:

  1. mentioning a sig: @kubernetes/sig-<group-name>-<group-suffix>
    e.g., @kubernetes/sig-contributor-experience-<group-suffix> to notify the contributor experience sig, OR

  2. specifying the label manually: /sig <label>
    e.g., /sig scalability to apply the sig/scalability label

Note: Method 1 will trigger an email to the group. You can find the group list here and label list here.
The <group-suffix> in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jul 31, 2017
@liyinan926
Copy link
Contributor Author

/sig apps

@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Jul 31, 2017
@k8s-github-robot k8s-github-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jul 31, 2017
@liyinan926
Copy link
Contributor Author

/assign @liyinan926

liyinan926 added a commit to liyinan926/kubernetes that referenced this issue Aug 1, 2017
This is the first step towards fixing kubernetes#49909. The field will be used for collision avoidance when the StatefulSet controller creates name for the newest ControllerRevision, which will be done in a subsequent PR.
liyinan926 added a commit to liyinan926/kubernetes that referenced this issue Aug 2, 2017
This is the first step towards fixing kubernetes#49909. The field will be used for collision avoidance when the StatefulSet controller creates name for the newest ControllerRevision, which will be done in a subsequent PR.
k8s-github-robot pushed a commit that referenced this issue Aug 11, 2017
Automatic merge from submit-queue

Added field CollisionCount to StatefulSetStatus

**What this PR does / why we need it**:
This PR added a new field `CollisionCount` into `StatefulSetStatus`, similarly in terms of both name and semantics to the existing `CollisionCount` field in `DaemonSetStatus`.  The field will be used for collision avoidance when the `StatefulSet` controller creates name for the newest ControllerRevision, which will be done in another PR.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: #49909.

**Special notes for your reviewer**:
A second PR will include logic that actually uses the field for collision avoidance.

**Release note**:
```release-note
Added field CollisionCount to StatefulSetStatus in both apps/v1beta1 and apps/v1beta2
```
k8s-github-robot pushed a commit that referenced this issue Aug 18, 2017
Automatic merge from submit-queue

Use CollisionCount for collision avoidance in StatefulSet controller

**What this PR does / why we need it**:
This PR uses the newly added `CollisionCount` in `StatefulSetStatus` for name collision avoidance when the `StatefulSet` controller creates `ControllerRevision`s. The `CreateControllerRevision` method of the `ControllerHistory` interface was augmented to use a user-specified `collisionCount` instead of the internal probe that always starts with 0. The `StatefulSet` controller uses the `CreateControllerRevision` to create `ControllerRevision`s and when it calls it, it passes in the `CollisionCount` of the `StatefulSet` it manipulates. 
  
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49909.

**Special notes for your reviewer**:
/assign @kow3ns 

**Release note**:
```release-note
Use CollisionCount for collision avoidance when creating ControllerRevisions in StatefulSet controller
```
dims pushed a commit to dims/kubernetes that referenced this issue Feb 8, 2018
Automatic merge from submit-queue

Added field CollisionCount to StatefulSetStatus

**What this PR does / why we need it**:
This PR added a new field `CollisionCount` into `StatefulSetStatus`, similarly in terms of both name and semantics to the existing `CollisionCount` field in `DaemonSetStatus`.  The field will be used for collision avoidance when the `StatefulSet` controller creates name for the newest ControllerRevision, which will be done in another PR.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: kubernetes#49909.

**Special notes for your reviewer**:
A second PR will include logic that actually uses the field for collision avoidance.

**Release note**:
```release-note
Added field CollisionCount to StatefulSetStatus in both apps/v1beta1 and apps/v1beta2
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/apps Categorizes an issue or PR as relevant to SIG Apps.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants