From cff77f28be87f6951786f94a6acdcbbe5c148f1e Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Thu, 4 Oct 2018 16:45:04 -0400 Subject: [PATCH] Clarify log message to not look like a failure The result of checking if there's a known_host file we should clean up looks a lot like a failure in the logs. It's actually not a big deal. + rm /home/jenkins/.ssh/known_hosts rm: cannot remove /home/jenkins/.ssh/known_hosts: \ No such file or directory + echo 'No known_hosts file' No known_hosts file This is immediately followed by an obvious transition in the logs, enforcing the idea that this 'error' caused the transition. The linked Jira was raised about this, thinking it was an real error. Change-Id: I7baa6a112ecdfc44d3511accfe5624d7572ba713 Jira: INTPAK-201 Signed-off-by: Daniel Farrell --- jjb/packaging/packaging-macros.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jjb/packaging/packaging-macros.yaml b/jjb/packaging/packaging-macros.yaml index 568f94223..c573746a0 100644 --- a/jjb/packaging/packaging-macros.yaml +++ b/jjb/packaging/packaging-macros.yaml @@ -20,8 +20,9 @@ - shell: !include-raw: stop-odl.sh - shell: !include-raw: uninstall-rpm.sh - shell: | - # Remove old host key so future installs don't fail to SSH - rm /home/jenkins/.ssh/known_hosts || echo "No known_hosts file" + # Remove old host key (if exists) so future installs don't fail SSH + rm /home/jenkins/.ssh/known_hosts || \ + echo "No known_hosts file to clean up, which is fine" - builder: name: install-test-uninstall-deb @@ -43,5 +44,6 @@ - shell: !include-raw: stop-odl.sh - shell: !include-raw: uninstall-deb.sh - shell: | - # Remove old host key so future installs don't fail to SSH - rm /home/jenkins/.ssh/known_hosts || echo "No known_hosts file" + # Remove old host key (if exists) so future installs don't fail SSH + rm /home/jenkins/.ssh/known_hosts || \ + echo "No known_hosts file to clean up, which is fine" -- 2.36.6