On Tue, Jun 30, 2020 at 04:59:44PM +0000, Stephen Lawrence wrote:
Hi Milosz,
-----Original Message----- From: Milosz Wasilewski milosz.wasilewski@linaro.org Sent: 30 June 2020 09:03 To: Stephen Lawrence stephen.lawrence@renesas.com Cc: lava-users@lists.lavasoftware.org; gandersson@genivi.org Subject: Re: [Lava-users] fastboot in docker support
[snip]
Any ideas as to what could be causing the difference in behaviour?
Try adding this to your device dictionary:
{% device_info = [{'board_id': '00025269'}] %}
It should make the wait function happy and present the device to the container.
Thank you for the suggestion. Unfortunately it didn't fix it and so I am investigating further.
I had the following in my device-template (was waiting to get this reliably working before upstreaming): {% set fastboot_deploy_uboot_commands = fastboot_deploy_uboot_commands|default(['fastboot usb 24']) %} {% set fastboot_serial_number = fastboot_serial_number|default("0000000000") %} {% set adb_serial_number = adb_serial_number|default(fastboot_serial_number) %} {% set device_info = device_info|default([{'board_id': fastboot_serial_number}]) %}
That produced the following rendered DUT yaml: device_info: [{'board_id': '00025269'}] adb_serial_number: "00025269" fastboot_serial_number: "00025269"
Today I added device_info to the existing fastboot/adb serial numbers in the device dictionary: {% set fastboot_serial_number = '00025269' %} {% set adb_serial_number = '00025269' %} {% set device_info = [{'board_id': '00025269'}] %} then updated with lavacli.
I had seen this udev.py failure when first working with the new docker changes in 2020.02. Then the fix was to shared the udev database (/run/udev) into the container. So I was wondering if I had missed a change when migrating from 2020.02 to 2020.05 and that's a check I need to complete but it is weird that the WaitDeviceBoardID succeeds for the simple deploy case. So it does not appear to be a simple containerisation issue.
The current implementation shares the devices with the container via the docker run --device= option, and for that it needs the device to be available (hence the WaitDeviceBoardID). That works for simple test jobs but doesn't for more complex ones.
I'm finishing a set of patches right now that changes the implementation and solves this by not waiting forever, sharing any devices that are already available with the container upfront, and adding dynamic mappings so that devices are shared with the container on udev events when they appear.