Piotr Kliczewski 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);
so why do we need this change.
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:             ) {
as you pointed about the order of closing has changed but from out and in 
perspective it is OK. 

My gut feeling is that it is related to connectivity issue. One thing I should 
add here that it the pipe is closed appears the host stays in installing state.
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