[WIP] Display descriptive error message when socket path too long#53
[WIP] Display descriptive error message when socket path too long#53jdavcs wants to merge 6 commits intogalaxyproject:mainfrom
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 <m.vandenbeek@gmail.com>
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.
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.
you're right - this is a no-go.
This should fix galaxyproject/galaxy#13982
Note:
stderr=subprocess.PIPEis 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.