-
Notifications
You must be signed in to change notification settings - Fork 492
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
NAS-129926 / 25.04 / Log when private methods are called via websocket connection #15160
base: master
Are you sure you want to change the base?
Conversation
Just in case Jenkins deletes my build:
No new/important failures, just the usual stuff (AD) |
middleware.log has entries like this
Those are called by our systemd units. There are ~900 calls in total, 300 of them being
The second is midcli, I can fix that. But the first... We use |
We can expand ConnectionOrigin object to include System-initiated calls to We should always log calls to private endpoints on unix socket if they originate from uid 33 (www-data) even if loginuid is unitialized. IIRC this is how proxied hexos calls will appear. |
08e7023
to
6ba57cd
Compare
6ba57cd
to
01ff5c8
Compare
01ff5c8
to
fa65cf8
Compare
@anodos325 @yocalebo with these patches in place, tests log contains only
and
I fixed the second one (it was The second was made by crontab (by a coincidence). Any idea wrt to how should we handle that? |
We could probably ignore if the process is cron (can get from procfs), though perhaps we should be scheduling within middlewared itself rather than cron? |
ppids = set() | ||
while True: | ||
try: | ||
with open(f"/proc/{pid}/status") as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a large file to read into memory and then do a regex search on. I also don't like this approach. I'd rather remove entries from middlewared.mako
(cron) and schedule them as @periodic
No description provided.