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

将部分 configuration-snippet 配置固化为选项 #110

Open
annProg opened this issue Dec 26, 2019 · 1 comment
Open

将部分 configuration-snippet 配置固化为选项 #110

annProg opened this issue Dec 26, 2019 · 1 comment

Comments

@annProg
Copy link
Collaborator

annProg commented Dec 26, 2019

比如限流,limit_req_zone需要预先定义,如果限流时写错了名字,会导致ingress-nginx无法更新upstream,报错:

{"log":"E1226 10:32:58.844524       9 controller.go:189] Unexpected failure reloading the backend:\n","stream":"stderr","time":"2019-12-26T02:32:58.844575907Z"}
{"log":"\n","stream":"stderr","time":"2019-12-26T02:32:58.844584888Z"}
{"log":"-------------------------------------------------------------------------------\n","stream":"stderr","time":"2019-12-26T02:32:58.844589789Z"}
{"log":"Error: exit status 1\n","stream":"stderr","time":"2019-12-26T02:32:58.844594916Z"}
{"log":"nginx: the configuration file /tmp/nginx-cfg987373816 syntax is ok\n","stream":"stderr","time":"2019-12-26T02:32:58.844599805Z"}
{"log":"2019/12/26 10:32:58 [emerg] 23256#23256: zero size shared memory zone \"qps301\"\n","stream":"stderr","time":"2019-12-26T02:32:58.844604897Z"}
{"log":"nginx: [emerg] zero size shared memory zone \"qps301\"\n","stream":"stderr","time":"2019-12-26T02:32:58.844610252Z"}
{"log":"nginx: configuration file /tmp/nginx-cfg987373816 test failed\n","stream":"stderr","time":"2019-12-26T02:32:58.8446154Z"}
{"log":"\n","stream":"stderr","time":"2019-12-26T02:32:58.844637877Z"}

考虑将这种常用配置固化为选项(添加正则校验),在 cmdbApi 代码中生成 configuration-snippet

另外,需要有针对Ingress-nginx 报错的报警

@annProg
Copy link
Collaborator Author

annProg commented Dec 26, 2019

查看ingress-nginx 报错的方法

grep -A10 "E1226" xxx.log

# E日期
# -A10 是为了看到报错内容

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant