864ae11509
This patch tries to add more detailed info by appending error output to exec_sudo print. In current implementation, only a simple static note `Exception: exec_sudo failed` is printed: ``` INFO diskimage_builder.block_device.utils [-] Calling [sudo sgdisk /tmp/dib_image.jZaDPxtX/image0.raw -n 1:0:+550M -t 1:EF00 -c 1:ESP -n 2:0:+8M -t 2:EF02 -c 2:BSP -n 3:0:+2077M -t 3:8300 -c 3:root] ERROR diskimage_builder.block_device.blockdevice [-] Create failed; rollback initiated // ... ... diskimage_builder.block_device.exception.BlockDeviceSetupException: exec_sudo failed ``` but the root reason is missing. We can’t get more error info to make sure what the real root reason even a simple problem like `command not found`, we have to reproduce locally and manually. After this patch, the error message like: ``` INFO diskimage_builder.block_device.utils [-] Calling [sudo sgdisk /tmp/dib_image.jZaDPxtX/image0.raw -n 1:0:+550M -t 1:EF00 -c 1:ESP -n 2:0:+8M -t 2:EF02 -c 2:BSP -n 3:0:+2077M -t 3:8300 -c 3:root] ERROR diskimage_builder.block_device.blockdevice [-] Create failed; rollback initiated // ... ... diskimage_builder.block_device.exception.BlockDeviceSetupException: exec_sudo failed: sudo: sgdisk: command not found ``` We can easily find the real problem and solve it. Closes-Bug: #2024980 Change-Id: I9efcd9cb6621e6403df6de14f122b1cf371bd800 |
||
---|---|---|
.. | ||
level0 | ||
level1 | ||
level2 | ||
level3 | ||
level4 | ||
tests | ||
__init__.py | ||
blockdevice.py | ||
cmd.py | ||
config.py | ||
exception.py | ||
plugin.py | ||
utils.py |