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

request help: Set environment variable failed #5102

Closed
zhixiongdu027 opened this issue Sep 19, 2021 · 2 comments
Closed

request help: Set environment variable failed #5102

zhixiongdu027 opened this issue Sep 19, 2021 · 2 comments

Comments

@zhixiongdu027
Copy link
Contributor

zhixiongdu027 commented Sep 19, 2021

Issue description

In this pr: #4880

I had set environment variable

  • KUBERNETES_CLIENT_TOKEN
  • KUBERNETES_CLIENT_TOKEN_FILE

in test file BEGIN

and ,It's work fine but CI Centos7 / run ci on centos7

error message is


2021-09-19T05:51:56.3501884Z #   Failed test 'TEST 3: use specify parameters - pattern "[error]" should not match any line in error.log but matches line "2021/09/19 05:51:55 [error] 20603#20603: init_worker_by_lua error: /apisix/apisix/discovery/k8s.lua:698: not found environment variable KUBERNETES_CLIENT_TOKEN" (req 0)

2021-09-19T05:51:59.3124172Z #   Failed test 'TEST 5: use token_file - pattern "[error]" should not match any line in error.log but matches line "2021/09/19 05:51:57 [error] 20627#20627: init_worker_by_lua error: /apisix/apisix/discovery/k8s.lua:698: not found environment variable KUBERNETES_CLIENT_TOKEN_FILE" (req 0)

Someone can help ? TKS

Environment

  • apisix version (cmd: apisix version):
  • OS (cmd: uname -a):
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API):
  • apisix-dashboard version, if have:
  • the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
  • luarocks version, if the issue is about installation (cmd: luarocks --version):
@spacewander
Copy link
Member

The CentOS CI runs tests inside a docker. So it can't access the token file.
Maybe we can skip the test when it is running inside CentOS? We can do it like this:

plan(skip_all => "apisix-nginx-module not installed");

@zhixiongdu027
Copy link
Contributor Author

TKS.
I had update CenOS Ci Workflow and mount /tmp:/tmp into docker. It's work fine.

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

2 participants