-
Notifications
You must be signed in to change notification settings - Fork 17
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
[WIP] Display descriptive error message when socket path too long #53
base: main
Are you sure you want to change the base?
Conversation
Thanks! Unfortunately, this causes problems with foreground mode ( |
Yeah, that's what I was afraid of. Maybe test-create the socket first? (I thought about checking the path - but, as you said, not portable and we'd have to be conservative (103? 92 max?), so there could be many false positives) |
Co-authored-by: Marius van den Beek <[email protected]>
be3b562
to
29562cb
Compare
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) | ||
bind_path = self.supervisord_sock_path | ||
try: | ||
os.unlink(bind_path) |
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.
It looks like this method is called any time the class is instantiated, so supervisord may be running and that would make this unsafe?
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.
you're right - this is a no-go.
This should fix galaxyproject/galaxy#13982
Note:
stderr=subprocess.PIPE
is necessary to get a non-empty return value fromPopen.communicate()
. I'm not sure whether that may affect anything else. A galaxy runtime error will still be logged correctly.