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

Debug is broken #1501

Closed
mfeit-internet2 opened this issue Jan 9, 2025 · 0 comments
Closed

Debug is broken #1501

mfeit-internet2 opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels

Comments

@mfeit-internet2
Copy link
Member

@szymontrocha noted problems enabling and disabling debug which have been around for a bit.

Services

We no longer write a PID file and the debug command needs to get the PID from somewhere. Use this to find it (returns 0 if the process isn't running):

systemctl show --property MainPID --value pscheduler-ticker

API

This was also spotted in the logs; it looks like the debug endpoint doesn't import the module containing remote_address().

# tail pscheduler.log
2025-01-09T16:27:21.196170+01:00 perfsonar1 pscheduler-api[970945] ERROR        rv = self.dispatch_request()
2025-01-09T16:27:21.196433+01:00 perfsonar1 pscheduler-api[970945] ERROR             ^^^^^^^^^^^^^^^^^^^^^^^
2025-01-09T16:27:21.196704+01:00 perfsonar1 pscheduler-api[970945] ERROR      File "/usr/lib/python3/dist-packages/flask/app.py", line 1796, in dispatch_request
2025-01-09T16:27:21.196956+01:00 perfsonar1 pscheduler-api[970945] ERROR        return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2025-01-09T16:27:21.197208+01:00 perfsonar1 pscheduler-api[970945] ERROR               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-09T16:27:21.197471+01:00 perfsonar1 pscheduler-api[970945] ERROR      File "/usr/share/pscheduler/api-server/pschedulerapiserver/debug.py", line 49, in debug
2025-01-09T16:27:21.197729+01:00 perfsonar1 pscheduler-api[970945] ERROR        if not remote_address() in ['127.0.0.1', '::1']:
2025-01-09T16:27:21.198052+01:00 perfsonar1 pscheduler-api[970945] ERROR               ^^^^^^^^^^^^^^
2025-01-09T16:27:21.198318+01:00 perfsonar1 pscheduler-api[970945] ERROR    NameError: name 'remote_address' is not defined
2025-01-09T16:27:21.199208+01:00 perfsonar1 pscheduler-api[970945] ERROR    Internal error 127.0.0.1 PUT https://localhost/pscheduler/debug: Internal problem; see system logs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

1 participant