You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
The problem is, when we run this command on a unit unknown to our ~/.ssh/known_hosts, we get this garbage shoved in to the output:
2016-06-08 01:33:59 DEBUG FAILED (failures=1)
2016-06-08 01:33:59 DEBUG running java -version 2>&1
2016-06-08 01:33:59 DEBUG output from cmd: Warning: Permanently added '172.31.4.128' (ECDSA) to the list of known hosts.
2016-06-08 01:34:00 DEBUG Exit Code: 1
A good run would instead look like this:
2016-06-08 02:34:27 DEBUG OK
2016-06-08 02:34:27 DEBUG running java -version 2>&1
2016-06-08 02:34:27 DEBUG output from cmd: openjdk version "1.8.0_91"
2016-06-08 02:34:27 DEBUG OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14)
2016-06-08 02:34:27 DEBUG OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
2016-06-08 02:34:27 DEBUG Exit Code: 0
The fix should be simple enough... Adjust the cmd from this:
java -version 2>&1
to
java -version 2>&1 | grep version
Which would be good because it would scrub the output of any ssh warnings, and would ensure a version string comes back from "java -version". We only care that the grep comes back non-zero.
The text was updated successfully, but these errors were encountered:
On closer inspection, the warning should not have caused the command to return non-zero. There may be something else afoot here, though the stricter output grep shouldn't harm anything.
The test_java test isn't very smart:
https://github.com/juju-solutions/layer-openjdk/blob/master/tests/01-deploy.py#L26
The problem is, when we run this command on a unit unknown to our ~/.ssh/known_hosts, we get this garbage shoved in to the output:
A good run would instead look like this:
The fix should be simple enough... Adjust the cmd from this:
java -version 2>&1
to
java -version 2>&1 | grep version
Which would be good because it would scrub the output of any ssh warnings, and would ensure a version string comes back from "java -version". We only care that the
grep
comes back non-zero.The text was updated successfully, but these errors were encountered: