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: edgex component creation cause registration errors and core-command crash #2029

Merged

Conversation

LavenderQAQ
Copy link
Member

What type of PR is this?

/kind bug
/sig iot

What this PR does / why we need it:

The default maxSurge value for k8s deployment is 25%, and when replicas is 1, maxSurge is 1 after rounding up. This results in the existence of 2 identical edgex components at the same time after a quick create + update operation, and edgex components use a registration mechanism. If a component preregisters and is terminated by workload, this causes the metadata component to scramble. This chaos manifests itself in the form of other components crashing all the time.

I updated auto-collector to directly inject the default maxSurge value of 0 into the config file and the issue was resolved.

Which issue(s) this PR fixes:

Fixes #2028

@LavenderQAQ LavenderQAQ added the backport release-v1.4 backport release-v1.4 label Apr 18, 2024
@LavenderQAQ LavenderQAQ requested a review from rambohe-ch April 18, 2024 12:01
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@LavenderQAQ LavenderQAQ added kind/bug kind/bug sig/iot sig/iot labels Apr 18, 2024
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.32%. Comparing base (08ab7e4) to head (10b6c6c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2029   +/-   ##
=======================================
  Coverage   55.32%   55.32%           
=======================================
  Files         183      183           
  Lines       17835    17835           
=======================================
  Hits         9867     9867           
  Misses       6942     6942           
  Partials     1026     1026           
Flag Coverage Δ
unittests 55.32% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rambohe-ch rambohe-ch added approved approved lgtm lgtm labels Apr 19, 2024
@rambohe-ch
Copy link
Member

/lgtm

@rambohe-ch rambohe-ch merged commit ee215e8 into openyurtio:master Apr 19, 2024
13 checks passed
@rambohe-ch
Copy link
Member

/backport release-v1.4

Copy link

Backport failed for release-v1.4, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin release-v1.4
git worktree add -d .worktree/backport-2029-to-release-v1.4 origin/release-v1.4
cd .worktree/backport-2029-to-release-v1.4
git checkout -b backport-2029-to-release-v1.4
ancref=$(git merge-base 430b047d2c8023cb9bb2ffac5402ec2e7bee69ae 10b6c6cd18a6da2a815a9b160cfa0814fbf88711)
git cherry-pick -x $ancref..10b6c6cd18a6da2a815a9b160cfa0814fbf88711

@rambohe-ch
Copy link
Member

/backport release-v1.4

Copy link

Backport failed for release-v1.4, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin release-v1.4
git worktree add -d .worktree/backport-2029-to-release-v1.4 origin/release-v1.4
cd .worktree/backport-2029-to-release-v1.4
git checkout -b backport-2029-to-release-v1.4
ancref=$(git merge-base 430b047d2c8023cb9bb2ffac5402ec2e7bee69ae 10b6c6cd18a6da2a815a9b160cfa0814fbf88711)
git cherry-pick -x $ancref..10b6c6cd18a6da2a815a9b160cfa0814fbf88711

@rambohe-ch rambohe-ch added backport release-v1.4 backport release-v1.4 and removed backport release-v1.4 backport release-v1.4 labels Apr 19, 2024
@rambohe-ch
Copy link
Member

/backport release-v1.4

Copy link

Backport failed for release-v1.4, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin release-v1.4
git worktree add -d .worktree/backport-2029-to-release-v1.4 origin/release-v1.4
cd .worktree/backport-2029-to-release-v1.4
git checkout -b backport-2029-to-release-v1.4
ancref=$(git merge-base 430b047d2c8023cb9bb2ffac5402ec2e7bee69ae 10b6c6cd18a6da2a815a9b160cfa0814fbf88711)
git cherry-pick -x $ancref..10b6c6cd18a6da2a815a9b160cfa0814fbf88711

@LavenderQAQ LavenderQAQ deleted the fix/edgex-component-fail-to-register branch April 19, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved backport release-v1.4 backport release-v1.4 kind/bug kind/bug lgtm lgtm sig/iot sig/iot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] EdgeX component creation cause registration errors and core-command crash
2 participants