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

bugfix: judge enablement of libnetwork resolver by network mode #2364

Merged
merged 1 commit into from
Oct 26, 2018

Conversation

mathspanda
Copy link
Contributor

Signed-off-by: mathspanda [email protected]

Ⅰ. Describe what this PR did

The PR is to judge whether enabling embedded dns server by network mode.
If network mode is user-defined, container uses embedded dns server.
If not, container uses resolv.conf file on host directly.

Ⅱ. Does this pull request fix one issue?

Issue #2362

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

None

Ⅳ. Describe how to verify it

# content of resolv.conf file is the same with one on host
pouch run busybox cat /etc/resolv.conf
# content of resolv.conf file contains "nameserver 127.0.0.11"
pouch run --net ns1 busybox cat /etc/resolv.conf

Ⅴ. Special notes for reviews

None

@codecov
Copy link

codecov bot commented Oct 26, 2018

Codecov Report

Merging #2364 into master will increase coverage by 0.23%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2364      +/-   ##
==========================================
+ Coverage   67.85%   68.09%   +0.23%     
==========================================
  Files         265      265              
  Lines       18211    18210       -1     
==========================================
+ Hits        12357    12400      +43     
+ Misses       4421     4393      -28     
+ Partials     1433     1417      -16
Flag Coverage Δ
#criv1alpha1test 31.67% <77.77%> (+0.11%) ⬆️
#criv1alpha2test 35.48% <77.77%> (-0.09%) ⬇️
#integrationtest 39.48% <100%> (-0.01%) ⬇️
#nodee2etest 33.19% <77.77%> (+0.38%) ⬆️
#unittest 25.31% <0%> (ø) ⬆️
Impacted Files Coverage Δ
daemon/mgr/network_utils.go 37.2% <100%> (+9.3%) ⬆️
daemon/mgr/container.go 59.17% <100%> (+0.17%) ⬆️
apis/server/utils.go 71.15% <0%> (-3.85%) ⬇️
daemon/mgr/spec_linux.go 74.77% <0%> (-0.61%) ⬇️
cri/v1alpha1/cri.go 61.03% <0%> (+0.32%) ⬆️
ctrd/container.go 59.28% <0%> (+0.47%) ⬆️
daemon/mgr/network.go 69.61% <0%> (+0.47%) ⬆️
cri/v1alpha2/cri_utils.go 90.85% <0%> (+0.57%) ⬆️
daemon/mgr/container_utils.go 84.04% <0%> (+0.61%) ⬆️
... and 9 more

@pouchrobot pouchrobot added areas/network kind/bug This is bug report for project size/L labels Oct 26, 2018
@mathspanda
Copy link
Contributor Author

@rudyfly PTAL.

@allencloud
Copy link
Collaborator

Could you add me as a friend on wechat for further discussion. my account is shlallen. @mathspanda

@rudyfly
Copy link
Collaborator

rudyfly commented Oct 26, 2018

@mathspanda Thank you for your contributions, LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Oct 26, 2018
@allencloud allencloud merged commit 6de45fe into AliyunContainerService:master Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/network kind/bug This is bug report for project LGTM one maintainer or community participant agrees to merge the pull reuqest. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants