tiglabs / containerdns Goto Github PK
View Code? Open in Web Editor NEWa fast DNS for Kubernetes clusters
License: MIT License
a fast DNS for Kubernetes clusters
License: MIT License
; BGP 发布的VIP
kni-vip = 10.17.9.100
项目README中给出的kni-vip地址是什么意思呢?
没有修改的话,在
dns_tcp_process_init(g_dns_cfg->netdev.kni_vip);
调用处出错,提示:
KNI: pci: 04:00:00 8086:10c9
.........................done
Starting core 3 conf: rx=0, tx=1
Starting core 5 conf: rx=1, tx=2
Starting core 7 conf: rx=2, tx=3
bind: Cannot assign requested address
请教一下...
你好:
目前构建containerdns依赖的api有点老,还有etcd等,etcd的github地址已经变更了,dns的代码里面引的包还是老包,能否可以根据目前的相关库,更新一版代码?
多谢!
在CentOS 7.5下编译make build构建KDNS时,需要作如下小的调整:
经过上述3步,KDNS构建OK。
[root@DPDK bin]# ./dpdk-devbind.py --bind=igb_uio kdns
Unknown device: kdns. Please specify device in "bus:slot.func" format
[root@DPDK bin]# ./dpdk-devbind.py --bind=igb_uio 06:00.1
0000:06:00.1 already bound to driver igb_uio, skipping
[root@DPDK bin]# ./dpdk-devbind.py --bind=igb_uio 06:00.2
[root@DPDK bin]#
dpdk-devbind.py --bind=igb_uio 06:00.1 的格式才正确,最后一个参数是PCIE网卡的bus:slot.func
我这里使用了一台机器10.1.61.129来部署containerdns,服务器系统为centos7.2
/etc/containerdns/containerdns.conf配置如下:
[Dns]
dns-domains = wh01 #wh01为我这里使用的域名
dns-addr = 0.0.0.0:53
ex-nameservers = "10.1.61.120:53"
#inDomainServers = [email protected]:53%[email protected]:53
inDomainServers =""
cacheSize = 1000000
ip-monitor-path = /containerdns/monitor/status/
[Log]
log-dir = /export/log/containerdns
log-level = 0
log-to-stdio = true
[Etcd]
etcd-servers = http://127.0.0.1:2379 #使用本地的etcd
etcd-certfile = ""
etcd-keyfile = ""
etcd-cafile = ""
[Fun]
random-one = false
hone-one = false
[Stats]
statsServer = 127.0.0.1:9600
statsServerAuthToken = @containerdns.com
启动如下:
[root@op-yanwei containerdns]# /usr/local/containerdns/bin/containerdns &> /export/log/containerdns/containerdns.log &
[1] 9646
[root@op-yanwei containerdns]# tail -f /export/log/containerdns/containerdns.log
I1114 14:20:32.845193 9646 main.go:289] domainWatchIdx =4349958 dir =/containerdns/wh01/
I1114 14:20:32.845208 9646 iphealthcheck.go:24] SyncSkydnsHostStatus start get
I1114 14:20:32.845420 9646 dns-server.go:238] WatchForDomain idx : 4349959
I1114 14:20:32.846403 9646 iphealthcheck.go:27] SyncSkydnsHostStatus start out
I1114 14:20:32.846428 9646 iphealthcheck.go:47] len of ip monitirs =0
I1114 14:20:32.846440 9646 main.go:295] ipWatchIdx =4349958 dir =/containerdns/monitor/status/
I1114 14:20:32.846491 9646 dns-server.go:337] ready for queries on [wh01.] for tcp://0.0.0.0:53
I1114 14:20:32.846506 9646 dns-server.go:343] ready for queries on [wh01.] for udp://0.0.0.0:53
I1114 14:20:32.846689 9646 iphealthcheck.go:136] WatchForHosts idx : 4349959
I1114 14:20:32.847567 9646 stats.go:276] statistics enabled on :127.0.0.1:9600
/etc/containerdns/containerdns-api.conf配置如下:
[General]
#这一行本来也是按照github上的示例配置,加上的,但加上了,就直接抛can't store data at section "General", variable "domain"异常,注释掉这一行,则正常
#domain=wh01
host = 10.1.61.129
etcd-server = http://127.0.0.1:2379
etcd-certfile = ""
etcd-keyfile = ""
etcd-cafile = ""
ip-monitor-path = /containerdns/monitor/status
log-dir = /export/log/containerdns
log-level = 4
log-to-stdio = TRUE
[Kube2DNS]
kube-domain = wh01.
kube-enable = YES
kube-config-file = /etc/containerdns/bootstrap.kubeconfig
#kube-enable=NO
[DNSApi]
api-enable = YES
api-domains = wh01.
api-address = 0.0.0.0:9003
containerdns-auth = abcdef123456789
配置文件中/etc/containerdns/bootstrap.kubeconfig配置如下:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURqRENDQW5TZ0F3SUJBZ0lVTFpHVG4wSWdCZS9iS1NXVTRSYlhSb0lxMm1Bd0RRWUpLb1pJaHZjTkFRRUwKQlFBd1RERUxNQWtHQTFVRUJoTUNRMDR4RGpBxxxxxxxxxxxxxxx
server: https://10.1.61.132:6443 #我测试k8s api地址
name: kubernetes
contexts:
- context:
cluster: kubernetes
user: kubelet-bootstrap
name: default
current-context: default
kind: Config
preferences: {}
users:
- name: kubelet-bootstrap
user:
token: xxxxxxxx
启动container-kubeapi:
/usr/local/containerdns/bin/containerdns-kubeapi &> /export/log/containerdns/containerdns.log &
日志如下(有部分删减):
I1114 14:24:11.917729 9893 server.go:1396] kubernetes serverce to dns enable
I1114 14:24:11.922077 9893 reflector.go:196] Starting reflector *api.Service (20s) from github.com/tigcode/containerdns/containerdns-kubeapi/server.go:658
I1114 14:24:11.922156 9893 reflector.go:234] Listing and watching *api.Service from github.com/tigcode/containerdns/containerdns-kubeapi/server.go:658
I1114 14:24:11.977879 9893 server.go:452] ignore the svc for cluster LB VIP is nil : mcf-stress
I1114 14:24:11.977917 9893 server.go:452] ignore the svc for cluster LB VIP is nil : pmt-stress
exporter
I1114 14:24:11.979666 9893 server.go:452] ignore the svc for cluster LB VIP is nil : passport-stress
I1114 14:24:11.979677 9893 server.go:452] ignore the svc for cluster LB VIP is nil : dyland-pre
I1114 14:24:11.979688 9893 server.go:452] ignore the svc for cluster LB VIP is nil : mission-test
I1114 14:24:11.979699 9893 server.go:452] ignore the svc for cluster LB VIP is nil : efs-dev
I1114 14:24:11.979710 9893 server.go:452] ignore the svc for cluster LB VIP is nil : redis-test1-stress
I1114 14:24:16.921893 9893 server.go:1428] containerdns dns api enable
I1114 14:24:16.922366 9893 reflector.go:196] Starting reflector *api.Endpoints (20s) from github.com/tigcode/containerdns/containerdns-kubeapi/server.go:758
I1114 14:24:16.922409 9893 reflector.go:234] Listing and watching *api.Endpoints from github.com/tigcode/containerdns/containerdns-kubeapi/server.go:758
F1114 14:24:16.922770 9893 api.go:1123] the addr is used:0.0.0.0:9003
I1114 14:24:13.501074 9748 reflector.go:273] github.com/tigcode/containerdns/containerdns-kubeapi/server.go:758: forcing resync
I1114 14:24:28.499279 9748 reflector.go:273] github.com/tigcode/containerdns/containerdns-kubeapi/server.go:658: forcing resync
I1114 14:24:28.500844 9748 server.go:611] ignore updateService this time
I1114 14:24:28.500854 9748 server.go:611] ignore updateService this time
I1114 14:24:33.496769 9748 server.go:1293] svcSyncLoop
I1114 14:24:33.496815 9748 server.go:1019] Begin syncKube2Skydns...
I1114 14:24:33.497096 9748 server.go:892] ignore the svc for cluster LB VIP is nil : default-http-backend
I1114 14:24:33.497190 9748 server.go:892] ignore the svc for cluster LB VIP is nil : heapster
I1114 14:24:33.497408 9748 server.go:892] ignore the svc for cluster LB VIP is nil : kubernetes-dashboard
I1114 14:24:33.497661 9748 server.go:892] ignore the svc for cluster LB VIP is nil : giftapi-stress
I1114 14:24:33.497817 9748 server.go:892] ignore the svc for cluster LB VIP is nil : webconf-stress
I1114 14:24:33.498089 9748 server.go:892] ignore the svc for cluster LB VIP is nil : kubernetes
I1114 14:24:33.498370 9748 server.go:892] ignore the svc for cluster LB VIP is nil : monitoring-influxdb
I1114 14:24:33.498413 9748 server.go:892] ignore the svc for cluster LB VIP is nil : kube-dns
I1114 14:24:33.498884 9748 server.go:892] ignore the svc for cluster LB VIP is nil : monitoring-grafana
I1114 14:24:33.499063 9748 server.go:892] ignore the svc for cluster LB VIP is nil : tiller-deploy
I1114 14:24:33.499340 9748 server.go:1357] Heartbeat reg key=/containerdns/apiHost/10.1.61.129 val ={"version":"1.3: [Nov 14 2017 10:02:04]","api-domains":["wh01."],"k8s-domain":"wh01.","monitor-path":"/containerdns/monitor/status/","lastTime":"2017-11-14T14:24:33.499283275+08:00"}
I1114 14:24:33.499535 9748 server.go:1300] svcSyncLoop
I1114 14:24:33.499545 9748 server.go:1161] Begin syncSkydnsHostStatus...
I1114 14:24:33.503405 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/female-dev/ee328ed3/ val ={"type":"A","source":"svc","host":"172.17.2.27","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503437 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-auth-dev/38256cce/ val ={"type":"A","source":"svc","host":"172.17.0.77","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503449 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/guess-stress/d8d3f2b8/ val ={"type":"A","source":"svc","host":"172.17.3.41","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503458 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/mgameservice-test/31370639/ val ={"type":"A","source":"svc","host":"172.17.2.50","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503466 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/social-stress/109246bf/ val ={"type":"A","source":"svc","host":"172.17.3.8","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503474 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/luaad-stress/bc0ffed/ val ={"type":"A","source":"svc","host":"172.17.3.39","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503482 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/venusadmin-pre-static/3121c57f/ val ={"type":"A","source":"svc","host":"172.17.2.70","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503490 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/monitor-dev/70798d38/ val ={"type":"A","source":"svc","host":"172.17.4.4","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503497 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/newoa-dev/4908b51b/ val ={"type":"A","source":"svc","host":"172.17.2.9","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503506 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-auth-live/b0c88127/ val ={"type":"A","source":"svc","host":"172.17.2.34","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503513 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/pay-dev/5feb931a/ val ={"type":"A","source":"svc","host":"172.17.0.114","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503554 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/luamember-stress/dd9d6635/ val ={"type":"A","source":"svc","host":"172.17.3.48","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503567 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/passportadmin-stress/cd512920/ val ={"type":"A","source":"svc","host":"172.17.3.16","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503576 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyland-lua-api-pre/33376a6/ val ={"type":"A","source":"svc","host":"172.17.2.39","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503583 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/kube-system/prometheus-node-exporter/a5ca71d1/ val ={"type":"A","source":"svc","host":"10.1.61.147","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503605 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-service-dev/ff0c52fb/ val ={"type":"A","source":"svc","host":"172.17.0.111","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503617 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/cloud-pre/95af42b1/ val ={"type":"A","source":"svc","host":"172.17.2.58","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503625 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/iopsrv-live/16df89e3/ val ={"type":"A","source":"svc","host":"172.17.2.45","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503632 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/pay-stress/8dc0288d/ val ={"type":"A","source":"svc","host":"172.17.3.26","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503640 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-live/9dc20ca6/ val ={"type":"A","source":"svc","host":"172.17.0.110","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503647 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/musicadmin-pre/f0d382c1/ val ={"type":"A","source":"svc","host":"172.17.0.78","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503655 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/payadmin-dev/667fa349/ val ={"type":"A","source":"svc","host":"172.17.0.70","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503662 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/payment-dev/647dbcfb/ val ={"type":"A","source":"svc","host":"172.17.2.38","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503670 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/noble-stress/51481487/ val ={"type":"A","source":"svc","host":"172.17.3.11","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503677 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/venus-pre/3a01e8d2/ val ={"type":"A","source":"svc","host":"172.17.2.53","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503684 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/barragevod-stress/7cc8b2e2/ val ={"type":"A","source":"svc","host":"172.17.3.10","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503692 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-dev/d2bb0bb1/ val ={"type":"A","source":"svc","host":"172.17.0.104","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503699 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/gift-stress/7443c104/ val ={"type":"A","source":"svc","host":"172.17.3.34","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503707 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/www-php-stress/941b0fdc/ val ={"type":"A","source":"svc","host":"172.17.3.23","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503714 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/musicadmin-live/517369e0/ val ={"type":"A","source":"svc","host":"172.17.0.75","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503737 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/m-stress/b9036ec1/ val ={"type":"A","source":"svc","host":"172.17.3.22","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503758 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/kube-system/prometheus-node-exporter/de2784c7/ val ={"type":"A","source":"svc","host":"10.1.61.138","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503767 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/venusadmin-live-static/a3698aa4/ val ={"type":"A","source":"svc","host":"172.17.2.6","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503775 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/venusadmin-live/7430c490/ val ={"type":"A","source":"svc","host":"172.17.0.109","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503781 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/venusadmin-dev/147ece2d/ val ={"type":"A","source":"svc","host":"172.17.2.76","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503798 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/kube-system/prometheus-node-exporter/cac7105c/ val ={"type":"A","source":"svc","host":"10.1.61.133","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503803 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/aresadmin-dev/459b51c5/ val ={"type":"A","source":"svc","host":"172.17.0.108","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503807 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/olympic-dev/280ace4d/ val ={"type":"A","source":"svc","host":"172.17.2.10","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503811 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/cloud-dev/c841bef5/ val ={"type":"A","source":"svc","host":"172.17.2.47","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503816 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dymanage-live/3532dbd4/ val ={"type":"A","source":"svc","host":"172.17.2.51","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503820 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/www-stress/927ddbe8/ val ={"type":"A","source":"svc","host":"172.17.3.52","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503824 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/payment-stress/934960e/ val ={"type":"A","source":"svc","host":"172.17.3.14","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503829 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/neworg-dev/22dfca1a/ val ={"type":"A","source":"svc","host":"172.17.2.48","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503833 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/payservice-dev/a61a01a4/ val ={"type":"A","source":"svc","host":"172.17.0.71","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503837 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/lualive-stress/13e9181b/ val ={"type":"A","source":"svc","host":"172.17.3.24","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503841 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/mcflua-stress/4c38f32b/ val ={"type":"A","source":"svc","host":"172.17.3.51","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503846 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyland-pre/7f133c6d/ val ={"type":"A","source":"svc","host":"172.17.0.113","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503850 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/female-pre/9cfc73c5/ val ={"type":"A","source":"svc","host":"172.17.0.67","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503854 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/mgame-package-remote-live/68d564b4/ val ={"type":"A","source":"svc","host":"172.17.2.20","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503859 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/mgameservice-dev/fb9a58f7/ val ={"type":"A","source":"svc","host":"172.17.2.52","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503867 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/venus-live/d212b849/ val ={"type":"A","source":"svc","host":"172.17.2.65","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503872 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/olympic-live/4d076784/ val ={"type":"A","source":"svc","host":"172.17.2.37","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503876 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/aresadmin-live/d78e9acf/ val ={"type":"A","source":"svc","host":"172.17.0.106","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503880 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/wsd-adm-dev/75ddf52d/ val ={"type":"A","source":"svc","host":"172.17.4.5","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503885 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-service-live/109553da/ val ={"type":"A","source":"svc","host":"172.17.2.71","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503889 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/ismnew-pre/cd6b9673/ val ={"type":"A","source":"svc","host":"172.17.2.56","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503893 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-usercenter-dev/6bdd4eea/ val ={"type":"A","source":"svc","host":"172.17.0.107","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503897 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/iopsrv-dev/15f45cbd/ val ={"type":"A","source":"svc","host":"172.17.0.100","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503901 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/mgame-package-remote-dev/c72f2ab2/ val ={"type":"A","source":"svc","host":"172.17.2.22","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503906 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/payapi-pre/4ec2f2e0/ val ={"type":"A","source":"svc","host":"172.17.2.2","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503910 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/iopsrv-pre/6abef1f5/ val ={"type":"A","source":"svc","host":"172.17.2.32","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503914 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/yumall-service-stress/de29248a/ val ={"type":"A","source":"svc","host":"172.17.3.54","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503919 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-auth-pre/e2bb7d8b/ val ={"type":"A","source":"svc","host":"172.17.0.102","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503923 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/olympic-pre/3f77d49c/ val ={"type":"A","source":"svc","host":"172.17.2.15","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503927 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/cloud-live/f66e65d8/ val ={"type":"A","source":"svc","host":"172.17.2.11","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503931 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/payservice-pre/f57e75a2/ val ={"type":"A","source":"svc","host":"172.17.0.73","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503936 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/oauth2-stress/a1a51f9f/ val ={"type":"A","source":"svc","host":"172.17.3.19","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503940 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/mobile-stress/aca24d18/ val ={"type":"A","source":"svc","host":"172.17.3.27","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503944 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyland-lua-api-live/a778ef40/ val ={"type":"A","source":"svc","host":"172.17.2.33","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503948 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/zhaopin-stress/2624c582/ val ={"type":"A","source":"svc","host":"172.17.3.36","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503955 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/ismnew-live/3724fb90/ val ={"type":"A","source":"svc","host":"172.17.2.55","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503959 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/monitor-live/21279fbf/ val ={"type":"A","source":"svc","host":"172.17.0.115","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503973 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/infovod-stress/5657d23a/ val ={"type":"A","source":"svc","host":"172.17.3.21","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503978 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dymanage-dev/fee86c02/ val ={"type":"A","source":"svc","host":"172.17.2.35","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503983 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/mcf-stress/9a0766ae/ val ={"type":"A","source":"svc","host":"172.17.3.32","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503991 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/cloudwww-pre/1c1e2e95/ val ={"type":"A","source":"svc","host":"172.17.2.61","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.503997 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/graphite/e4b4e27/ val ={"type":"A","source":"svc","host":"172.17.2.41","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504016 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/kube-system/prometheus-node-exporter/4a95189b/ val ={"type":"A","source":"svc","host":"10.1.61.134","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504026 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/payservice-live/df4b9847/ val ={"type":"A","source":"svc","host":"172.17.0.72","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504034 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/mlua-stress/91fb4b75/ val ={"type":"A","source":"svc","host":"172.17.3.31","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504042 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/athena-stress/818a2529/ val ={"type":"A","source":"svc","host":"172.17.3.2","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504051 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/payservice-stress/ceb548c0/ val ={"type":"A","source":"svc","host":"172.17.3.30","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504058 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/mgameservice-live/8806b106/ val ={"type":"A","source":"svc","host":"172.17.2.13","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504087 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/test/mission-test/2c90893b/ val ={"type":"A","source":"svc","host":"172.17.3.42","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504096 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/wsd-watcher-dev/6f1ed0fa/ val ={"type":"A","source":"svc","host":"172.17.2.17","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504105 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/ismnew-dev/4adead47/ val ={"type":"A","source":"svc","host":"172.17.2.67","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504113 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/mgameservice-stress/bc7dc6e4/ val ={"type":"A","source":"svc","host":"172.17.3.12","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504131 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/passportlua-stress/a77b8447/ val ={"type":"A","source":"svc","host":"172.17.3.28","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504140 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-usercenter-pre/e2a76b36/ val ={"type":"A","source":"svc","host":"172.17.0.103","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504149 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/musicadmin-dev/64bac52e/ val ={"type":"A","source":"svc","host":"172.17.0.99","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504164 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyland-dev/95c47f66/ val ={"type":"A","source":"svc","host":"172.17.2.75","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504172 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/passport-stress/68d4e089/ val ={"type":"A","source":"svc","host":"172.17.3.13","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504180 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/kube-system/prometheus-node-exporter/9ea488b3/ val ={"type":"A","source":"svc","host":"10.1.61.251","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504188 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/lottery-stress/4db9443/ val ={"type":"A","source":"svc","host":"172.17.3.15","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504196 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/venusadmin-pre/da972e48/ val ={"type":"A","source":"svc","host":"172.17.0.101","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504205 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dymanage-pre/dc9b2147/ val ={"type":"A","source":"svc","host":"172.17.2.5","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504213 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/kube-system/prometheus-node-exporter/fefa0ed0/ val ={"type":"A","source":"svc","host":"10.1.61.252","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504221 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/olympic-stress/f4b82ef5/ val ={"type":"A","source":"svc","host":"172.17.3.6","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504230 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/shorturladmin-live/b08b1995/ val ={"type":"A","source":"svc","host":"172.17.0.74","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504237 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/mgame-package-remote-pre/aa8a3484/ val ={"type":"A","source":"svc","host":"172.17.2.42","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504245 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/mgameservice-pre/7a68c61f/ val ={"type":"A","source":"svc","host":"172.17.2.16","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504253 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/venus-dev/6f1ed0fa/ val ={"type":"A","source":"svc","host":"172.17.2.17","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504337 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/payapi-live/50057618/ val ={"type":"A","source":"svc","host":"172.17.2.68","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.504345 9748 reflector.go:273] github.com/tigcode/containerdns/containerdns-kubeapi/server.go:758: forcing resync
I1114 14:24:33.504467 9748 etcd.go:217] ##### Update key=/containerdns/apiHost/10.1.61.129 val ={"version":"1.3: [Nov 14 2017 10:02:04]","api-domains":["wh01."],"k8s-domain":"wh01.","monitor-path":"/containerdns/monitor/status/","lastTime":"2017-11-14T14:24:33.499283275+08:00"} valPre ={"version":"1.3: [Nov 14 2017 10:02:04]","api-domains":["wh01."],"k8s-domain":"wh01.","monitor-path":"/containerdns/monitor/status/","lastTime":"2017-11-14T14:23:33.49960364+08:00"}
I1114 14:24:33.504352 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/female-live/1b48df55/ val ={"type":"A","source":"svc","host":"172.17.2.18","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505004 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/test/mission-test/de385aad/ val ={"type":"A","source":"svc","host":"172.17.3.40","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505016 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-service-pre/9280ec7f/ val ={"type":"A","source":"svc","host":"172.17.4.3","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505063 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/check-stress/31722c40/ val ={"type":"A","source":"svc","host":"172.17.3.7","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505073 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyland-lua-api-dev/938060de/ val ={"type":"A","source":"svc","host":"172.17.2.26","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505079 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/wsd-watcher-live/5513b529/ val ={"type":"A","source":"svc","host":"172.17.2.43","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505084 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/wsd-watcher-stress/72ecf0f8/ val ={"type":"A","source":"svc","host":"172.17.3.38","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505089 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/shopex-stress/fadb51ff/ val ={"type":"A","source":"svc","host":"172.17.3.46","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505093 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/payapi-dev/11ad16a4/ val ={"type":"A","source":"svc","host":"172.17.2.64","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505098 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/wsd-watcher-pre/fe30b546/ val ={"type":"A","source":"svc","host":"172.17.2.8","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505102 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/newapproval-dev/5c6b3902/ val ={"type":"A","source":"svc","host":"172.17.2.40","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505106 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/efs-dev/d04dda2e/ val ={"type":"A","source":"svc","host":"172.17.2.44","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505111 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/java/venusadmin-dev-static/1a291c81/ val ={"type":"A","source":"svc","host":"172.17.2.14","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505115 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/mission-stress/965b2a7a/ val ={"type":"A","source":"svc","host":"172.17.3.18","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505120 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-usercenter-live/e4ea9e03/ val ={"type":"A","source":"svc","host":"172.17.0.76","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505124 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/roomgame-stress/428538d5/ val ={"type":"A","source":"svc","host":"172.17.3.17","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505129 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/efs-live/6a1b66db/ val ={"type":"A","source":"svc","host":"172.17.2.12","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505133 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/aresadmin-pre/72cb0d2e/ val ={"type":"A","source":"svc","host":"172.17.2.31","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505137 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyland-live/e63f2d78/ val ={"type":"A","source":"svc","host":"172.17.0.112","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505142 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/efs-pre/d3bd387c/ val ={"type":"A","source":"svc","host":"172.17.2.73","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505146 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/php/dyadmin-pre/d8e53611/ val ={"type":"A","source":"svc","host":"172.17.2.29","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505150 9748 server.go:1040] svc in Kube:: key :/containerdns/wh01/svc/default/pmt-stress/e25a8980/ val ={"type":"A","source":"svc","host":"172.17.3.49","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505156 9748 server.go:1059] svc in Kube:: key :/containerdns/wh01/svc/default/graphite/_tcp/_carbon/e4b4e27/ val ={"type":"SRV","source":"svc","host":"e4b4e27.graphite.default.svc.wh01.","ttl":30,"port":2003,"priority":10,"weight":10}
I1114 14:24:33.505167 9748 server.go:1059] svc in Kube:: key :/containerdns/wh01/svc/default/graphite/_tcp/_graph-dash/e4b4e27/ val ={"type":"SRV","source":"svc","host":"e4b4e27.graphite.default.svc.wh01.","ttl":30,"port":80,"priority":10,"weight":10}
I1114 14:24:33.505175 9748 server.go:1059] svc in Kube:: key :/containerdns/wh01/svc/kube-system/prometheus-node-exporter/_tcp/_scrape/cac7105c/ val ={"type":"SRV","source":"svc","host":"cac7105c.prometheus-node-exporter.kube-system.svc.wh01.","ttl":30,"port":9100,"priority":10,"weight":10}
I1114 14:24:33.505188 9748 server.go:1059] svc in Kube:: key :/containerdns/wh01/svc/kube-system/prometheus-node-exporter/_tcp/_scrape/4a95189b/ val ={"type":"SRV","source":"svc","host":"4a95189b.prometheus-node-exporter.kube-system.svc.wh01.","ttl":30,"port":9100,"priority":10,"weight":10}
I1114 14:24:33.505196 9748 server.go:1059] svc in Kube:: key :/containerdns/wh01/svc/kube-system/prometheus-node-exporter/_tcp/_scrape/de2784c7/ val ={"type":"SRV","source":"svc","host":"de2784c7.prometheus-node-exporter.kube-system.svc.wh01.","ttl":30,"port":9100,"priority":10,"weight":10}
I1114 14:24:33.505204 9748 server.go:1059] svc in Kube:: key :/containerdns/wh01/svc/kube-system/prometheus-node-exporter/_tcp/_scrape/a5ca71d1/ val ={"type":"SRV","source":"svc","host":"a5ca71d1.prometheus-node-exporter.kube-system.svc.wh01.","ttl":30,"port":9100,"priority":10,"weight":10}
I1114 14:24:33.505536 9748 server.go:1078] svc in containerdns:: key :/containerdns/wh01/svc/default/check-stress/31722c40/ val ={"type":"A","source":"svc","host":"172.17.3.7","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505545 9748 server.go:1078] svc in containerdns:: key :/containerdns/wh01/svc/default/luaad-stress/bc0ffed/ val ={"type":"A","source":"svc","host":"172.17.3.39","ttl":30,"priority":10,"weight":10}
I1114 14:24:33.505974 9748 server.go:1078] svc in containerdns:: key :/containerdns/wh01/svc/php/musicadmin-pre/f0d382c1/ val ={"type":"A","source":"svc","host":"172.17.0.78","ttl":30,"priority":10,"weight":10}
我的理解是,通过日志应该可以看出已经成功从kubernetes拿到域名信息,但这个时候,我检查etcd,发现etcd下并没有出现/containerdns 相关的key,如下:
[root@op-yanwei containerdns]# etcdctl ls
[root@op-yanwei containerdns]#
etcd仍然是空的。
我将/etc/resolv.conf的解析修改到当前dns:
namserver 10.1.61.129
尝试解析:
[root@op-yanwei containerdns]# nslookup olympic-stress.default.svc.wh01
Server: 10.1.61.129
Address: 10.1.61.129#53
** server can't find olympic-stress.default.svc.wh01: NXDOMAIN
并没有拿到解析结果。
我通过containerdns-apicmd尝试查询抛出如下异常:
[root@op-yanwei containerdns]# /usr/local/containerdns/bin/containerdns-apicmd -token abcdef123456789 -addr 127.0.0.1:9003 -domain wh01 -list
domain : not found
[root@op-yanwei containerdns]# /usr/local/containerdns/bin/containerdns-apicmd -token abcdef123456789 -addr 127.0.0.1:9003 -domain wh01 -show wh01
domain :wh01 not found
我以为是组件还没安装完,那我先全部安装再尝试,再次配置dns-scanner,配置文件/etc/containerdns/containerdns-scanner.conf如下:
[General]
core = 0
enable-check = true
hostname = 10.1.61.129
log-dir = /export/log/containerdns
log-level = 100
heartbeat-interval = 30
[Check]
check-timeout = 2
check-interval = 10
scann-ports = 22, 80, 8080
enable-icmp = true
ping-timeout = 1000
ping-count = 2
[Etcd]
etcd-machine = http://127.0.0.1:2379
tls-key =
tls-pem =
ca-cert =
status-path = /containerdns/monitor/status
report-path = /containerdns/monitor/report
heart-path = /containerdns/monitor/heart
启动:
/usr/local/containerdns/bin/dns-scanner &>/export/log/containerdns/containerdns-scanner.log &
直接异常退出,检查日志如下:
[root@op-yanwei containerdns]# tail -100f /export/log/containerdns/containerdns-scanner.log
F1114 14:38:59.001981 10579 scanner.go:120] Read config file error, due towarnings:
can't store data at section "Check", variable "scann-ports"
can't store data at section "Check", variable "enable-icmp"
can't store data at section "Etcd", variable "etcd-machine"
can't store data at section "Etcd", variable "tls-key"
can't store data at section "Etcd", variable "tls-pem"
can't store data at section "Etcd", variable "ca-cert"
can't store data at section "Etcd", variable "report-path"
can't store data at section "Etcd", variable "heart-path"
goroutine 1 [running, locked to thread]:
github.com/tigcode/containerdns/vendor/github.com/golang/glog.stacks(0xc42013b800, 0xc4201ae000, 0x224, 0x276)
/home/go/src/github.com/tigcode/containerdns/vendor/github.com/golang/glog/glog.go:766 +0xcf
github.com/tigcode/containerdns/vendor/github.com/golang/glog.(*loggingT).output(0xc4dbe0, 0xc400000003, 0xc4200933f0, 0xbfec61, 0xa, 0x78, 0x0)
/home/go/src/github.com/tigcode/containerdns/vendor/github.com/golang/glog/glog.go:717 +0x322
github.com/tigcode/containerdns/vendor/github.com/golang/glog.(*loggingT).printDepth(0xc4dbe0, 0x3, 0x1, 0xc420167f18, 0x2, 0x2)
/home/go/src/github.com/tigcode/containerdns/vendor/github.com/golang/glog/glog.go:646 +0x12a
github.com/tigcode/containerdns/vendor/github.com/golang/glog.(*loggingT).print(0xc4dbe0, 0x3, 0xc420167f18, 0x2, 0x2)
/home/go/src/github.com/tigcode/containerdns/vendor/github.com/golang/glog/glog.go:637 +0x5a
github.com/tigcode/containerdns/vendor/github.com/golang/glog.Fatal(0xc420167f18, 0x2, 0x2)
/home/go/src/github.com/tigcode/containerdns/vendor/github.com/golang/glog/glog.go:1125 +0x53
main.init.0()
/home/go/src/github.com/tigcode/containerdns/dns-scanner/scanner.go:120 +0x30e
main.init()
<autogenerated>:1 +0x24a
containerdns-schedule.conf内容如下:
[General]
schedule-interval = 60
agent-downtime = 60
log-dir = /export/log/containerdns
log-level = 100
hostname = 10.1.61.129
force-lock-time = 1800
[Etcd]
etcd-machine = http://127.0.0.1:2379
status-path = /containerdns/monitor/status
report-path = /containerdns/monitor/report
heart-path = /containerdns/monitor/heart
lock-path = /containerdns/monitor/lock
containerdns-schedule启动:
[root@op-yanwei containerdns]# /usr/local/containerdns/bin/dns-schedule &> /export/log/containerdns/containerdns-shcedule.log &
同样异常退出,异常如下:
[root@op-yanwei containerdns]# tail -100f /export/log/containerdns/containerdns-scanner.log
F1114 14:38:59.001981 10579 scanner.go:120] Read config file error, due towarnings:
can't store data at section "Check", variable "scann-ports"
can't store data at section "Check", variable "enable-icmp"
can't store data at section "Etcd", variable "etcd-machine"
can't store data at section "Etcd", variable "tls-key"
can't store data at section "Etcd", variable "tls-pem"
can't store data at section "Etcd", variable "ca-cert"
can't store data at section "Etcd", variable "report-path"
can't store data at section "Etcd", variable "heart-path"
goroutine 1 [running, locked to thread]:
github.com/tigcode/containerdns/vendor/github.com/golang/glog.stacks(0xc42013b800, 0xc4201ae000, 0x224, 0x276)
/home/go/src/github.com/tigcode/containerdns/vendor/github.com/golang/glog/glog.go:766 +0xcf
github.com/tigcode/containerdns/vendor/github.com/golang/glog.(*loggingT).output(0xc4dbe0, 0xc400000003, 0xc4200933f0, 0xbfec61, 0xa, 0x78, 0x0)
/home/go/src/github.com/tigcode/containerdns/vendor/github.com/golang/glog/glog.go:717 +0x322
github.com/tigcode/containerdns/vendor/github.com/golang/glog.(*loggingT).printDepth(0xc4dbe0, 0x3, 0x1, 0xc420167f18, 0x2, 0x2)
/home/go/src/github.com/tigcode/containerdns/vendor/github.com/golang/glog/glog.go:646 +0x12a
github.com/tigcode/containerdns/vendor/github.com/golang/glog.(*loggingT).print(0xc4dbe0, 0x3, 0xc420167f18, 0x2, 0x2)
/home/go/src/github.com/tigcode/containerdns/vendor/github.com/golang/glog/glog.go:637 +0x5a
github.com/tigcode/containerdns/vendor/github.com/golang/glog.Fatal(0xc420167f18, 0x2, 0x2)
/home/go/src/github.com/tigcode/containerdns/vendor/github.com/golang/glog/glog.go:1125 +0x53
main.init.0()
/home/go/src/github.com/tigcode/containerdns/dns-scanner/scanner.go:120 +0x30e
main.init()
<autogenerated>:1 +0x24a
至此,containerdns的部署彻底失败!
我所有的配置文件及配置过程基本参考都来源于github上的文档及http://www.infoq.com/cn/articles/jd-618-container-dns-practise 这篇文档,很多配置荐其义不明,也是半配置单猜测半测试。。。
请帮忙看下到底是个什么情况 ?
KDNS的配置文件kdns.cfg中,EAL相关的内存设置没有说明
memory = 1024,1024
这个配置应该是指在NUMA架构下node0, node1 分别分配
1024个2MB的Hugepage大页内存的意思, 个人推测 ?
mem-channels = 4 这个配置项是什么意思呢?
请开发者说明一下,谢谢!
1、在编译containerdns-kubeapi的时候,抛出一大堆异常,后来经过反复测试,是需要依赖指定的kubernetes版本,通过kubernetes 1.5版本,完成编译后,结果到处都找不到编译完成后的containerdns-kubeapi的二进制包。。。
2、如果找到这个包的话,在最新的kubernetes 1.8版本中监视1.8的service,又是否会兼容?
+------+-----+-------------+
| SkyDNS |
+------+----++-------------+
^ |
| |
| |Port check + URL check
| |
+-------+-----------+ ------+---------+-------------+----------+
| Client | -------->| IP-1 | IP-2 || .......... | IP-N |
+-------+-----------+ ----------------+-------------+----------+
KDNS启动报错:
[error] : call bind err
使用默认的配置启动kubeapi有报错。
/dist/containerdns-kubeapi -config-file ./etc/containerdns-api.conf
./dist/containerdns-kubeapi flag redefined: log_dir
panic: ./dist/containerdns-kubeapi flag redefined: log_dir
goroutine 1 [running]:
flag.(*FlagSet).Var(0xc4200a0060, 0x1846520, 0xc42048af30, 0x171b570, 0x7, 0x1747a42, 0x2f)
/usr/local/go/src/flag/flag.go:810 +0x540
flag.(*FlagSet).StringVar(0xc4200a0060, 0xc42048af30, 0x171b570, 0x7, 0x0, 0x0, 0x1747a42, 0x2f)
/usr/local/go/src/flag/flag.go:713 +0x8b
flag.(*FlagSet).String(0xc4200a0060, 0x171b570, 0x7, 0x0, 0x0, 0x1747a42, 0x2f, 0xc42048af20)
/usr/local/go/src/flag/flag.go:726 +0x8b
flag.String(0x171b570, 0x7, 0x0, 0x0, 0x1747a42, 0x2f, 0xc4201b9c30)
/usr/local/go/src/flag/flag.go:733 +0x69
./kdns启动后 日志文件中提示:
[2019-01-28 10:48:36.879] [25441] [error] : now just one port supported
经查看源码, netdev,c源程序中:
/* Get number of ports found in scan */
nb_sys_ports = rte_eth_dev_count();
if (nb_sys_ports == 0){
log_msg(LOG_ERR, "No supported Ethernet device found\n");
exit(-1);
}
if (nb_sys_ports != 1){
log_msg(LOG_ERR, "now just one port supported\n");
exit(-1);
}
进入DPDK的usertools目录,运行dpdk-setup.sh查看 DPDK Driver与网口的bind绑定配置情况:
Option: 23
0000:06:00.1 'I350 Gigabit Network Connection 1521' drv=igb_uio unused=igb
0000:06:00.2 'I350 Gigabit Network Connection 1521' drv=igb_uio unused=igb
0000:06:00.0 'I350 Gigabit Network Connection 1521' if=eno1 drv=igb unused=igb_uio Active
0000:06:00.3 'I350 Gigabit Network Connection 1521' if=eno4 drv=igb unused=igb_uio
是不是只需要绑定一个网络接口才能正常启动kdns服务?
有没有官方群什么的?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.