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

Logging policy configuration sent to APICast with incorrect syntax #1165

Closed
adeeyacoby10 opened this issue Feb 27, 2020 · 1 comment · Fixed by #1168
Closed

Logging policy configuration sent to APICast with incorrect syntax #1165

adeeyacoby10 opened this issue Feb 27, 2020 · 1 comment · Fixed by #1168

Comments

@adeeyacoby10
Copy link

adeeyacoby10 commented Feb 27, 2020

[provide a description of the issue]
Hi,
We are running our 2scale system on version 2.7,
When we try to add the logging policy to our APICast we see in the logging that:
Failed to load policy: logging version: builtin err: /opt/app-root/src/src/apicast/policy/logging/loggign.lua:59: bad argument #1 to 'ipairs' (table expected, got nil), client: [ip_address], server: _, request: , host: [host]
We checked the policy chain of the service and saw that the configuration of the logging policy contains the following field:

"condition": {
   "combine_op":"and"
}

In a working policy we see:

"condition": {
   "combine_op":"and",
   "operations":{}
}

In addition after manually removing the condition filed, the error does not happen any more.

Steps To Reproduce
  1. Add the logging policy
  2. Add JSON object config
  3. Enable JSON logs
@eloycoto
Copy link
Contributor

Hi,

I'm able to reproduce this issue, I'll have a look later today and I'll try to send a fix for 2.8 version that we'll release in the next couple of weeks.

Regards

eloycoto added a commit to eloycoto/APIcast that referenced this issue Feb 28, 2020
If the logging config is not correct,operations are not defined,the loop
will not work and it'll crash.

Fix 3scale#1165
Fix THREESCALE-4605

Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
eloycoto added a commit to eloycoto/APIcast that referenced this issue Mar 2, 2020
If the logging config is not correct,operations are not defined,the loop
will not work and it'll crash.

Fix 3scale#1165
Fix THREESCALE-4605

Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
eloycoto added a commit that referenced this issue Mar 2, 2020
If the logging config is not correct,operations are not defined,the loop
will not work and it'll crash.

Fix #1165
Fix THREESCALE-4605

Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
eloycoto added a commit to eloycoto/APIcast that referenced this issue Mar 7, 2020
If the logging config is not correct,operations are not defined,the loop
will not work and it'll crash.

Fix 3scale#1165
Fix THREESCALE-4605

Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
eloycoto added a commit to eloycoto/APIcast that referenced this issue Mar 7, 2020
If the logging config is not correct,operations are not defined,the loop
will not work and it'll crash.

Fix 3scale#1165
Fix THREESCALE-4605

Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
eloycoto added a commit that referenced this issue Mar 9, 2020
If the logging config is not correct,operations are not defined,the loop
will not work and it'll crash.

Fix #1165
Fix THREESCALE-4605

Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
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

Successfully merging a pull request may close this issue.

2 participants