canonical / testflinger

https://testflinger.readthedocs.io/en/latest/
GNU General Public License v3.0
11 stars 16 forks source link

It would be nice to have result output for the image boot check #249

Open vpa1977 opened 4 months ago

vpa1977 commented 4 months ago

The image boot check, e.g.[1] ignores the exception and the process output. It would be nice to get result in case of exception, as I am encountering a situation where the machine is booted and I can connect to it manually, but testflinger is failing the check.

[1] https://github.com/canonical/testflinger/blob/e4a17a4ceedb14d967df8f463a899d7e1d3659f6/device-connectors/src/testflinger_device_connectors/devices/cm3/cm3.py#L163

syncronize-issues-to-jira[bot] commented 4 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CERTTF-315.

This message was autogenerated

jocave commented 1 month ago

Adding the following input, in the case of a failed boot check the output looks like:

2024-07-02 17:06:59,014 limerick-zcu106001 INFO: DEVICE CONNECTOR: Checking if test image booted.
Traceback (most recent call last):
  File "/srv/testflinger-agent/limerick-zcu106001/env/bin/testflinger-device-connector", line 8, in <module>
    sys.exit(main())
  File "/srv/testflinger-agent/limerick-zcu106001/env/lib/python3.8/site-packages/testflinger_device_connectors/cmd.py", line 83, in main
    sys.exit(func(args))
  File "/srv/testflinger-agent/limerick-zcu106001/env/lib/python3.8/site-packages/testflinger_device_connectors/devices/__init__.py", line 321, in wrapper
    return func(*args, **kwargs)
  File "/srv/testflinger-agent/limerick-zcu106001/env/lib/python3.8/site-packages/testflinger_device_connectors/devices/muxpi/__init__.py", line 52, in provision
    raise e
  File "/srv/testflinger-agent/limerick-zcu106001/env/lib/python3.8/site-packages/testflinger_device_connectors/devices/muxpi/__init__.py", line 50, in provision
    device.provision()
  File "/srv/testflinger-agent/limerick-zcu106001/env/lib/python3.8/site-packages/testflinger_device_connectors/devices/muxpi/muxpi.py", line 240, in provision
    self.check_test_image_booted()
  File "/srv/testflinger-agent/limerick-zcu106001/env/lib/python3.8/site-packages/testflinger_device_connectors/devices/muxpi/muxpi.py", line 619, in check_test_image_booted
    raise ProvisioningError("Failed to boot test image!")
testflinger_device_connectors.devices.ProvisioningError: Failed to boot test image!

I think it would be better for the user for this traceback to be replaced with details of the what check is performed by the device connector being used, and as request by the OP human understandable details of the exception that occured.