-
Notifications
You must be signed in to change notification settings - Fork 167
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
No udisks2 device found for /dev/sdo1 #1357
Comments
I found a call to _wait_for_medium in write_image() so added that to write_files() too. Now I get this error:
|
I tried retrying when the partition device (/dev/sdo1) does not exist. Howver, I see see problems:
So it seems that udisks2 takes extra time to discover the device, event when it is present in the filesystem |
sjg20
added a commit
to sjg20/labgrid
that referenced
this issue
Apr 11, 2024
When switching an SDWire to 'host' mode, it may take time for the partition to appear. During that time the device (e.g. '/dev/sdo1') may not exist, so trying to cat e.g. '/sys/call/block/sdo1' fails. Handle this by returning a zero size in that case, as is done when the returned size is empty. Even when the block device is present, udisks2 may take a short time to make the device available. Handle this by retrying a few times, until things settle. Add the call to _wait_for_medium() in write_files() while we are here, to match what is done in write_image(). Also fix the parameter type for write_files() and mention the exception it may raise. Fixes: labgrid-project#1357 Signed-off-by: Simon Glass <[email protected]>
5 tasks
sjg20
added a commit
to sjg20/labgrid
that referenced
this issue
Apr 11, 2024
When switching an SDWire to 'host' mode, it may take time for the partition to appear. During that time the device (e.g. '/dev/sdo1') may not exist, so trying to cat e.g. '/sys/call/block/sdo1' fails. Handle this by returning a zero size in that case, as is done when the returned size is empty. Even when the block device is present, udisks2 may take a short time to make the device available. Handle this by retrying a few times, until things settle. Add the call to _wait_for_medium() in write_files() while we are here, to match what is done in write_image(). Also fix the parameter type for write_files() and mention the exception it may raise. Fixes: labgrid-project#1357 Signed-off-by: Simon Glass <[email protected]>
sjg20
added a commit
to sjg20/labgrid
that referenced
this issue
Apr 26, 2024
When switching an SDWire to 'host' mode, it may take time for the partition to appear. During that time the device (e.g. '/dev/sdo1') may not exist, so trying to cat e.g. '/sys/call/block/sdo1' fails. Handle this by returning a zero size in that case, as is done when the returned size is empty. Even when the block device is present, udisks2 may take a short time to make the device available. Handle this by retrying a few times, until things settle. Add the call to _wait_for_medium() in write_files() while we are here, to match what is done in write_image(). Also fix the parameter type for write_files() and mention the exception it may raise. Fixes: labgrid-project#1357 Signed-off-by: Simon Glass <[email protected]>
sjg20
added a commit
to sjg20/labgrid
that referenced
this issue
May 1, 2024
When switching an SDWire to 'host' mode, it may take time for the partition to appear. During that time the device (e.g. '/dev/sdo1') may not exist, so trying to cat e.g. '/sys/call/block/sdo1' fails. Handle this by returning a zero size in that case, as is done when the returned size is empty. Even when the block device is present, udisks2 may take a short time to make the device available. Handle this by retrying a few times, until things settle. Add the call to _wait_for_medium() in write_files() while we are here, to match what is done in write_image(). Also fix the parameter type for write_files() and mention the exception it may raise. Fixes: labgrid-project#1357 Signed-off-by: Simon Glass <[email protected]>
sjg20
added a commit
to sjg20/labgrid
that referenced
this issue
May 21, 2024
When switching an SDWire to 'host' mode, it may take time for the partition to appear. During that time the device (e.g. '/dev/sdo1') may not exist, so trying to cat e.g. '/sys/call/block/sdo1' fails. Handle this by returning a zero size in that case, as is done when the returned size is empty. Even when the block device is present, udisks2 may take a short time to make the device available. Handle this by retrying a few times, until things settle. Add the call to _wait_for_medium() in write_files() while we are here, to match what is done in write_image(). Also fix the parameter type for write_files() and mention the exception it may raise. Fixes: labgrid-project#1357 Signed-off-by: Simon Glass <[email protected]>
sjg20
added a commit
to sjg20/labgrid
that referenced
this issue
Jun 10, 2024
When switching an SDWire to 'host' mode, it may take time for the partition to appear. During that time the device (e.g. '/dev/sdo1') may not exist, so trying to cat e.g. '/sys/call/block/sdo1' fails. Handle this by returning a zero size in that case, as is done when the returned size is empty. Even when the block device is present, udisks2 may take a short time to make the device available. Handle this by retrying a few times, until things settle. Add the call to _wait_for_medium() in write_files() while we are here, to match what is done in write_image(). Also fix the parameter type for write_files() and mention the exception it may raise. Fixes: labgrid-project#1357 Signed-off-by: Simon Glass <[email protected]>
sjg20
added a commit
to sjg20/labgrid
that referenced
this issue
Jun 25, 2024
When switching an SDWire to 'host' mode, it may take time for the partition to appear. During that time the device (e.g. '/dev/sdo1') may not exist, so trying to cat e.g. '/sys/call/block/sdo1' fails. Handle this by returning a zero size in that case, as is done when the returned size is empty. Even when the block device is present, udisks2 may take a short time to make the device available. Handle this by retrying a few times, until things settle. Add the call to _wait_for_medium() in write_files() while we are here, to match what is done in write_image(). Also fix the parameter type for write_files() and mention the exception it may raise. Fixes: labgrid-project#1357 Signed-off-by: Simon Glass <[email protected]>
sjg20
added a commit
to sjg20/labgrid
that referenced
this issue
Jun 25, 2024
When switching an SDWire to 'host' mode, it may take time for the partition to appear. During that time the device (e.g. '/dev/sdo1') may not exist, so trying to cat e.g. '/sys/call/block/sdo1' fails. Handle this by returning a zero size in that case, as is done when the returned size is empty. Even when the block device is present, udisks2 may take a short time to make the device available. Handle this by retrying a few times, until things settle. Add the call to _wait_for_medium() in write_files() while we are here, to match what is done in write_image(). Also fix the parameter type for write_files() and mention the exception it may raise. Fixes: labgrid-project#1357 Signed-off-by: Simon Glass <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following along with video-tutorial number 4, I am trying to use the USBStorageDriver.write_files() with an SDwire mux and get the above error, on this line:
It works OK the second time I try, perhaps because the block device has appeared by then.
For my home-grown (labman) lab I have code that retries for up to 5 seconds for the device to appear. Perhaps we need something like that?
The text was updated successfully, but these errors were encountered: