Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent rsync failure when SSH host key authentication fails #475

Open
ajdlinux opened this issue Apr 11, 2019 · 0 comments
Open

Silent rsync failure when SSH host key authentication fails #475

ajdlinux opened this issue Apr 11, 2019 · 0 comments

Comments

@ajdlinux
Copy link
Contributor

ajdlinux commented Apr 11, 2019

When flashing skiboot, if the BMC's SSH host key has changed from whatever your ssh client has locally stored, rsync will silently fail, causing a failure later on when trying to access the skiboot LID that wasn't copied.

Failure looks like this:

Logs in: /home/ajd/code/op-test-framework/test-reports/test-run-20190409165123
2019-04-09 16:51:23,709:op-test:setUpLoggerFile:INFO:Preparing to set location of Log File to /home/ajd/code/op-test-framework/test-reports/test-run-20190409165123/20190409065123709665.main.log
2019-04-09 16:51:23,709:op-test:setUpLoggerFile:INFO:Log file: /home/ajd/code/op-test-framework/test-reports/test-run-20190409165123/20190409065123709665.main.log
2019-04-09 16:51:23,710:op-test:setUpLoggerDebugFile:INFO:Preparing to set location of Debug Log File to /home/ajd/code/op-test-framework/test-reports/test-run-20190409165123/20190409065123710042.debug.log
2019-04-09 16:51:23,710:op-test:setUpLoggerDebugFile:INFO:Debug Log file: /home/ajd/code/op-test-framework/test-reports/test-run-20190409165123/20190409065123710042.debug.log
2019-04-09 16:51:23,710:op-test:parse_args:INFO:TestCase Log files: /home/ajd/code/op-test-framework/test-reports/test-run-20190409165123/*
2019-04-09 16:51:23,710:op-test:parse_args:INFO:StreamHandler setup normal
runTest (testcases.OpTestFlash.FSPFWImageFLASH) ... skipped 'FSP In-band firmware Update test'
runTest (testcases.OpTestFlash.BmcImageFlash) ... skipped 'BMC image not provided, so skipping test'
runTest (testcases.OpTestFlash.PNORFLASH) ... skipped 'PNOR image not provided, so skipping test'
runTest (testcases.OpTestFlash.OpalLidsFLASH) ... 2019-04-09 16:51:29,353:op-test.common.OpTestSystem:run_POWERING_OFF:INFO:System is in standby/Soft-off state
command-line line 0: Unsupported option "afstokenpassing"^M
root@witherspoon:~# which bash && exec bash --norc --noprofile
PS1=\[console-expect\]#
which bash && exec bash --norc --noprofile
/bin/bash
root@witherspoon:~# PS1=\[console-expect\]#
[console-expect]#which stty && stty cols 300;which stty && stty rows 30
which stty && stty cols 300;which stty && stty rows 30
/bin/stty
/bin/stty
[console-expect]#export LANG=C
export LANG=C
[console-expect]#
[console-expect]#date
date
Tue Apr  9 06:51:35 UTC 2019
[console-expect]#lsprop /sys/firmware/devicetree/base/ibm,firmware-versions
lsprop /sys/firmware/devicetree/base/ibm,firmware-versions
bash: lsprop: command not found
[console-expect]#
date
which whoami && whoami
[console-expect]#date
Tue Apr  9 06:51:36 UTC 2019
[console-expect]#which whoami && whoami
/usr/bin/whoami
root
[console-expect]#echo $?
echo $?
0
[console-expect]#systemctl restart mboxd.service
systemctl restart mboxd.service
[console-expect]#echo $?
echo $?
0
[console-expect]#dd if=/dev/zero of=/dev/stdout bs=1M count=1 | tr '\000' '\377' > /tmp/ones
dd if=/dev/zero of=/dev/stdout bs=1M count=1 | tr '\000' '\377' > /tmp/ones
1+0 records in
1+0 records out
[console-expect]#echo $?
echo $?
0
[console-expect]#cat /tmp/skiboot.lid.xz.stb /tmp/ones > /tmp/padded
cat /tmp/skiboot.lid.xz.stb /tmp/ones > /tmp/padded
cat: can't open '/tmp/skiboot.lid.xz.stb': No such file or directory
[console-expect]#echo $?
echo $?
1
ERROR
======================================================================
ERROR: runTest (testcases.OpTestFlash.OpalLidsFLASH)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ajd/code/op-test-framework/testcases/OpTestFlash.py", line 529, in runTest
    self.cv_BMC.skiboot_img_flash_openbmc(os.path.basename(self.skiboot))
  File "/home/ajd/code/op-test-framework/common/OpTestOpenBMC.py", line 983, in skiboot_img_flash_openbmc
    self.bmc.run_command("cat /tmp/%s /tmp/ones > /tmp/padded" % lid_name)
  File "/home/ajd/code/op-test-framework/common/OpTestBMC.py", line 101, in run_command
    return self.ssh.run_command(command, timeout, retry)
  File "/home/ajd/code/op-test-framework/common/OpTestSSH.py", line 211, in run_command
    return self.util.run_command(self, command, timeout, retry)
  File "/home/ajd/code/op-test-framework/common/OpTestUtil.py", line 1366, in run_command
    raise cf
CommandFailed: Command 'cat /tmp/skiboot.lid.xz.stb /tmp/ones > /tmp/padded' exited with '1'.
Output
["cat: can't open '/tmp/skiboot.lid.xz.stb': No such file or directory"]
----------------------------------------------------------------------
Ran 4 tests in 23.024s
FAILED (errors=1, skipped=3)
2019-04-09 16:51:50,464:op-test:<module>:error:Skipping main tests as flashing failed
2019-04-09 16:51:50,740:op-test.common.OpTestUtil:dump_versions:INFO:Log Location: /home/ajd/code/op-test-framework/test-reports/test-run-20190409165123/*debug*
2019-04-09 16:51:50,741:op-test.common.OpTestUtil:dump_versions:INFO:
----------------------------------------------------------
OpTestSystem Firmware Versions Tested
(if flashed things like skiboot.lid, may not be accurate)
----------------------------------------------------------
Firmware Versions Unavailable
----------------------------------------------------------
----------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant