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

fix yurtstaticset workerpod reset error #1526

Conversation

JameKeal
Copy link
Member

@JameKeal JameKeal commented Jun 7, 2023

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind bug

What this PR does / why we need it:

When user have more than one static pod want to upgrade, and the upgrade worker pod name has the same prefix in different yurtstaticset, when the upgradeinfo want to calculate information, it will confused.

So we need to add yurtstaticset name for worker pod to avoid this condition, and short for worker pod prefix to avoid the worker pod name is too long to make mistake

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

/assign @rambohe-ch

Does this PR introduce a user-facing change?


other Note

@openyurt-bot
Copy link
Collaborator

@JameKeal: GitHub didn't allow me to assign the following users: your_reviewer.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind bug

What this PR does / why we need it:

When user have more than one static pod want to upgrade, and the upgrade worker pod name has the same prefix in different yurtstaticset, when the upgradeinfo want to calculate information, it will confused.

So we need to add yurtstaticset name for worker pod to avoid this condition, and short for worker pod prefix to avoid the worker pod name is too long to make mistake

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

/assign @rambohe-ch

Does this PR introduce a user-facing change?


other Note

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.

@openyurt-bot openyurt-bot added kind/bug kind/bug size/S size/S 10-29 labels Jun 7, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jun 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.4% 0.4% Duplication

@JameKeal
Copy link
Member Author

JameKeal commented Jun 7, 2023

@xavier-hou PTAL

@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #1526 (dd7db46) into master (c0a1a4c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1526   +/-   ##
=======================================
  Coverage   50.42%   50.42%           
=======================================
  Files         132      132           
  Lines       15783    15784    +1     
=======================================
+ Hits         7958     7959    +1     
  Misses       7094     7094           
  Partials      731      731           
Flag Coverage Δ
unittests 50.42% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ntroller/yurtstaticset/upgradeinfo/upgrade_info.go 64.53% <100.00%> (+0.20%) ⬆️
...ntroller/yurtstaticset/yurtstaticset_controller.go 41.69% <100.00%> (ø)

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JameKeal, rambohe-ch

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

@openyurt-bot openyurt-bot added the approved approved label Jun 7, 2023
@rambohe-ch
Copy link
Member

@JameKeal I think that it is a good idea to add name of yss for upgrade-worker pod. agree +1

@rambohe-ch
Copy link
Member

/lgtm

@openyurt-bot openyurt-bot added the lgtm lgtm label Jun 7, 2023
@openyurt-bot openyurt-bot merged commit 40c097d into openyurtio:master Jun 7, 2023
13 checks passed
@JameKeal JameKeal deleted the fix-yurtstaticset-worker-pod-error-info branch June 7, 2023 08:28
JameKeal added a commit to JameKeal/openyurt that referenced this pull request Jun 9, 2023
@rambohe-ch rambohe-ch added the backport release-v1.3 backport release-v1.3 label Jun 21, 2023
@rambohe-ch
Copy link
Member

/backport release-v1.3

@github-actions
Copy link

Successfully created backport PR for release-v1.3:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved backport release-v1.3 backport release-v1.3 kind/bug kind/bug lgtm lgtm size/S size/S 10-29
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants