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: fix invalid memory limit #2876

Merged

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented May 29, 2019

Signed-off-by: yeya24 yb532204897@gmail.com

Ⅰ. Describe what this PR did

Fix a bug about invalid memory limit.
Here are the outputs of these two stats commands. For pouch, the memory limit is very high, we must constrain this value max to machine memory.

pouch stats 511d
CONTAINER ID   NAME     CPU %   MEM %   MEM USAGE / LIMIT   NET I/O       BLOCK I/O   PIDS
511d54d8e9ac   511d54   0.09%   0.00%   2.285MiB / 8EiB     51.5kB / 0B   0B / 0B     4
docker stats ec57
CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
ec57be63b4a7        eager_stonebraker   0.10%               2.199MiB / 7.682GiB   0.03%               41.3kB / 0B         0B / 0B             4

Ⅱ. Does this pull request fix one issue?

No

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Currently no.

Ⅳ. Describe how to verify it

pouch stats [container]

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented May 29, 2019

Codecov Report

Merging #2876 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2876      +/-   ##
==========================================
- Coverage   68.88%   68.85%   -0.03%     
==========================================
  Files         291      291              
  Lines       18249    18251       +2     
==========================================
- Hits        12571    12567       -4     
+ Misses       4228     4227       -1     
- Partials     1450     1457       +7
Flag Coverage Δ
#criv1alpha2_test 38.38% <0%> (+0.03%) ⬆️
#integration_test_0 36.2% <0%> (-0.04%) ⬇️
#integration_test_1 35.68% <0%> (ø) ⬆️
#integration_test_2 36.17% <100%> (ø) ⬆️
#integration_test_3 35.55% <100%> (-0.04%) ⬇️
#node_e2e_test 34.24% <0%> (+0.03%) ⬆️
#unittest 28.02% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
daemon/config/config.go 69.51% <ø> (ø) ⬆️
daemon/mgr/container_stats.go 71.34% <100%> (+0.32%) ⬆️
ctrd/watch.go 72.97% <0%> (-5.41%) ⬇️
cri/ocicni/netns.go 58.1% <0%> (-2.71%) ⬇️
cri/ocicni/cni_manager.go 59.25% <0%> (-1.86%) ⬇️
daemon/logger/jsonfile/utils.go 71.54% <0%> (-1.63%) ⬇️
ctrd/client.go 64.65% <0%> (-1.4%) ⬇️
ctrd/container.go 53.91% <0%> (-0.39%) ⬇️
cri/v1alpha2/cri.go 69.31% <0%> (+0.25%) ⬆️
pkg/streams/utils.go 89.28% <0%> (+7.14%) ⬆️

daemon/mgr/container.go Outdated Show resolved Hide resolved
@ZYecho ZYecho changed the title fix invalid memory limit fix: fix invalid memory limit Jun 3, 2019
@pouchrobot pouchrobot added kind/bug This is bug report for project size/S labels Jun 3, 2019
@yeya24 yeya24 force-pushed the fix/invalid-memory-limit branch from cf46141 to 5a7c233 Compare June 3, 2019 08:42
@ZYecho
Copy link
Contributor

ZYecho commented Jun 4, 2019

LGTM

Signed-off-by: yeya24 <yb532204897@gmail.com>
@allencloud
Copy link
Collaborator

Thanks a lot for your great work. Merging... @yeya24

@allencloud allencloud merged commit c956850 into AliyunContainerService:master Jun 9, 2019
@yeya24 yeya24 deleted the fix/invalid-memory-limit branch June 9, 2019 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is bug report for project size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants