Closed naichuans closed 5 years ago
Thanks for this @naichuans.
My understanding is that:
Why do you do this, instead of handling the IOErrors locally (and failing the request) in https://github.com/xenserver/xscontainer/blob/master/src/xscontainer/remote_helper/ssh.py?
Thanks for this @naichuans.
My understanding is that:
- python's default handler of SIGPIPE just throws IOErrors.-
- With your change signal(SIGPIPE, SIG_IGN), python is not throwing IOErrors anymore, when SIPPIPE occurs. Is this correct?
Why do you do this, instead of handling the IOErrors locally (and failing the request) in https://github.com/xenserver/xscontainer/blob/master/src/xscontainer/remote_helper/ssh.py?
Hi, @robertbreker . You are right, I will ignore SIG_PIPE in the code. We can catch the IOErrors, but there is nothing we can do. It is more like a performance issue. Maybe we could add some error logs?
So if SIG_PIPE is ignored in the code (with this PR), are the IOErrors still thrown? I think we do need the IOerrors, so we log something and don't assume a request was submitted, when it wasn't due to SIG_PIPE.
Hi, @robertbreker, I'm afraid there is no IOError throw out during the test. We just received a SIG_PIPE and exit. Could we add a SIG_PIPE process function with some logs?
Hi, @robertbreker , any suggestion about that?
@robertbreker , sorry, maybe I misunderstood your meaning. How about catch the signal and throw out an IOError exception?
I think catching the signal and throwing out an IOError exception, would be the perfect solution.
During the dundeedockerlinux test, there are many SIG_PIPE throw out because pipe broken, which will cause xscontainer-monitor exit. Ignore the single to avoid the failure.