Alon Bar-Lev has posted comments on this change.

Change subject: utils: ssh: force close the pipe before the layered stream
......................................................................


Patch Set 1:

(2 comments)

....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ssh/SSHClient.java
Line 594:             final InputStream in = new DigestInputStream(
Line 595:                 new FileInputStream(file1),
Line 596:                 localDigest
Line 597:             );
Line 598:             final PipedInputStream pin = new 
PipedInputStream(STREAM_BUFFER_SIZE);
this is not where your bug was.
Line 599:             final OutputStream dummy = new 
ConstraintByteArrayOutputStream(CONSTRAINT_BUFFER_SIZE);
Line 600:             final ByteArrayOutputStream remoteDigest = new 
ConstraintByteArrayOutputStream(CONSTRAINT_BUFFER_SIZE);
Line 601:         ) {
Line 602:             try (final OutputStream pout = new 
PipedOutputStream(pin)) {


....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ssh/SSHDialog.java
Line 291:         ) {
Line 292:             try (
Line 293:                 final OutputStream poutStdin = new 
PipedOutputStream(pinStdin);
Line 294:                 final OutputStream poutStdout = new 
PipedOutputStream(pinStdout);
Line 295:             ) {
original order:

 stdin
 pipe stdin
 stdout
 pipe stdout
 stderr

new order:
 stdin
 stdout
 stderr
 pipe stdin
 pipe stdout

so order is the same, pipe are closed after layered in both cases.

stderr is not important for this sequence.

closing the stdin should not effect stdout as session will keep running without 
stdin, the connection will be closed if remote program ends.

so I still think you will be able to reproduce the issue in this implementation 
as well, and the problem is some where else.
Line 296:                 List<InputStream> stdinList;
Line 297:                 if (initial == null) {
Line 298:                     stdinList = new LinkedList<InputStream>();
Line 299:                 }


-- 
To view, visit http://gerrit.ovirt.org/21460
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I485f5ae57a963b6819fdc0f3832eaa403dc0c34d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to