openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

FFDC CLI script SCP exception #2157

Closed gkeishin closed 2 years ago

gkeishin commented 2 years ago

        ERROR: Fail scp /tmp/pldm_flight_recorder from remotehost <class 'scp.SCPException'> scp: /tmp/pldm_flight_recorder: No such file or directory

                Fail to copy from wsbmc002:/tmp/pldm_flight_recorder.

Traceback (most recent call last):
  File "collect_ffdc.py", line 119, in <module>
    cli_ffdc()
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "collect_ffdc.py", line 74, in cli_ffdc
    this_ffdc.collect_ffdc()
  File "/home/george/openbmc-test-automation/ffdc/ffdc_collector.py", line 292, in collect_ffdc
    self.generate_ffdc(verified_working_protocol)
  File "/home/george/openbmc-test-automation/ffdc/ffdc_collector.py", line 362, in generate_ffdc
    self.protocol_ssh(protocol, target_type, k)
  File "/home/george/openbmc-test-automation/ffdc/ffdc_collector.py", line 393, in protocol_ssh
    self.collect_and_copy_ffdc(self.ffdc_actions[target_type][sub_type])
  File "/home/george/openbmc-test-automation/ffdc/ffdc_collector.py", line 527, in collect_and_copy_ffdc
    self.scp_ffdc(self.ffdc_dir_path, self.ffdc_prefix, form_filename, list_of_files)
  File "/home/george/openbmc-test-automation/ffdc/ffdc_collector.py", line 684, in scp_ffdc
    scp_result = self.ssh_remoteclient.scp_file_from_remote(source_file_path, targ_file_path)
  File "/home/george/openbmc-test-automation/ffdc/lib/ssh_utility.py", line 150, in scp_file_from_remote
    self.scpclient.get(remote_file, local_file, recursive=True)
  File "/usr/local/lib/python3.8/dist-packages/scp.py", line 254, in get
    self.channel.exec_command(self.scp_command +
  File "/usr/local/lib/python3.8/dist-packages/paramiko/channel.py", line 72, in _check
    return func(self, *args, **kwds)
  File "/usr/local/lib/python3.8/dist-packages/paramiko/channel.py", line 257, in exec_command
    self._wait_for_event()
  File "/usr/local/lib/python3.8/dist-packages/paramiko/channel.py", line 1226, in _wait_for_event
    raise e
paramiko.ssh_exception.SSHException: Channel closed.
gkeishin commented 2 years ago

@peterp-ibm Can u add code to handle this exception in FFDC CLI script

gkeishin commented 2 years ago

Fixed https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-test-automation/+/51191