You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "markokocic (via GitHub)" <gi...@apache.org> on 2023/10/26 09:37:12 UTC
[PR] Add log message after apisix.yml config reload [apisix]
markokocic opened a new pull request, #10404:
URL: https://github.com/apache/apisix/pull/10404
Fixes #10402
Please review. Not sure why is the log message printed multiple times and how to avoid it.
### Checklist
- [x] I have explained the need for this PR and the problem it solves
- [ ] I have explained the changes or the new features added to this PR
- [ ] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "markokocic (via GitHub)" <gi...@apache.org>.
markokocic commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1785118283
> Some of our users change their configurations very frequently, like thousands of times in 1s
In `apisix.yml` in standalone mode? I doubt how is that supposed to work, given that APISIX reads the config file only once per second.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "markokocic (via GitHub)" <gi...@apache.org>.
markokocic commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1784669754
This additional log entry won't much increase the log size, since it's applied only when config file changes, which is not very frequent, depending on the usage scenario.
If we add it, the benefit would be that we can confirm when changes are applied successfully.
As for the log verbosity, I created a new ticket that is not related to this topic, but for log entry duplication in general. See #10414
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1786530264
What I mean is that even in standalone mode, configuration changes are frequent and should not be logged every time a configuration change is made without an error. This information is meaningless to most users. If you think this is necessary, you can keep this change yourself.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1840134508
> if ones needs that, they would use etcd or another config plane, not a static file.
Sounds reasonable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1784583055
I don't think it's very necessary, we don't have this log when use etcd too, the number of logs is also very lagre even the log is printed when you send a new configuration
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "AlinsRan (via GitHub)" <gi...@apache.org>.
AlinsRan commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1840136101
> @monkeyDluffy6017: running apisix in standalone mode in a kubernetes pod, getting `apisix.yaml` from a configMap, I would like to know when the pod has finished loading the configuration so I can start sending traffic through it. how do you suggest to accomplish this?
>
I agree with your point that static files usually do not change frequently.
We need to confirm whether the apisix.yaml configuration has been updated through logs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: add log after apisix.yml config reload in standalone mode [apisix]
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 merged PR #10404:
URL: https://github.com/apache/apisix/pull/10404
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1782223933
The error log will be flooded by you newly added message.
```
ngx.timer.every(1, read_apisix_yaml)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 closed pull request #10404: chore: add log message after apisix.yml config reload
URL: https://github.com/apache/apisix/pull/10404
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1784752119
Some of our users change their configurations very frequently, like thousands of times in 1s
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1788380541
I will close this pr, feel free to reopen it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "polaru (via GitHub)" <gi...@apache.org>.
polaru commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1839039121
I agree with @markokocic that when running apisix in standalone mode you don't get a lot of reloads; if ones needs that, they would use etcd or another config plane, not a static file.
@monkeyDluffy6017: running apisix in standalone mode in a kubernetes pod, getting `apisix.yaml` from a configMap, I would like to know when the pod has finished loading the configuration so I can start sending traffic through it. how do you suggest to accomplish this?
> If you think this is necessary, you can keep this change yourself.
@monkeyDluffy6017 what do you mean by this? fork apisix?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: add log message after apisix.yml config reload [apisix]
Posted by "markokocic (via GitHub)" <gi...@apache.org>.
markokocic commented on PR #10404:
URL: https://github.com/apache/apisix/pull/10404#issuecomment-1782497377
Hi @monkeyDluffy6017
read_apisix_yaml is indeed called every second, but there's already a guard in place to skip execution if file is not changed:
``` lua
local last_change_time = attributes.change
if apisix_yaml_ctime == last_change_time then
return
end
```
Log statement is added at the end of the method, after successful execution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org