lpcraft failed with internal error despite successful execution

Bug #1962774 reported by Dan Ryan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lpci
Fix Released
Low
Jürgen Gmach

Bug Description

Despite successfully completing the given build and creating the output folder structure, lpcraft returned a non-zero return code due to a CalledProcessError while running `lxc exec readlink -f -z --`. The output artifacts were not copied out of the container.

If logs are to be believed, this is caused by a race between the return from the incomplete `lxc exec` and the call to `lxc stop` - note the call to `lxc exec` at 14:31:42.345, the call to `lxc stop` at 14:31:42.533, and the error at 14:31:44.086:

2022-03-02 14:31:42.037 Executing in container: lxc --project lpcraft exec local:lpcraft-typing-1942712-focal-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin find /root/project -mindepth 1 '!' -type d -printf '%P\0'
2022-03-02 14:31:42.208 Executing in container: lxc --project lpcraft exec local:lpcraft-typing-1942712-focal-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin readlink -f -z --
2022-03-02 14:31:42.345 Executing in container: lxc --project lpcraft exec local:lpcraft-typing-1942712-focal-amd64 -- rm -rf /root/project
2022-03-02 14:31:42.461 Executing on host: lxc --project lpcraft config device show local:lpcraft-typing-1942712-focal-amd64
2022-03-02 14:31:42.533 Executing on host: lxc --project lpcraft stop local:lpcraft-typing-1942712-focal-amd64
2022-03-02 14:31:44.086 lpcraft internal error: CalledProcessError(1, ['lxc', '--project', 'lpcraft', 'exec', 'local:lpcraft-typing-1942712-focal-amd64', '--', 'env', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin', 'readlink', '-f', '-z', '--'])
2022-03-02 14:31:44.089 Traceback (most recent call last):
...<snipped>

Full log attached for details.

Related branches

Revision history for this message
Dan Ryan (techalchemy) wrote :
description: updated
Revision history for this message
Dan Ryan (techalchemy) wrote :

This bug appears to be a consequence of there being no files located in the expected output location. So it is not a race after all but perhaps just could use some helpful error text

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Thanks for reporting! I'll have a look into during this week's sprint.

Changed in lpcraft:
status: New → Triaged
importance: Undecided → Low
Jürgen Gmach (jugmac00)
Changed in lpcraft:
status: Triaged → Fix Committed
assignee: nobody → Jürgen Gmach (jugmac00)
Revision history for this message
Jürgen Gmach (jugmac00) wrote (last edit ):

I just released a new version 0.0.4 to the stable channel which shows a proper error message.

Please note that the presentation of error messages itself is not yet ideal. I have created an internal issue to improve this situation ( https://warthogs.atlassian.net/browse/LP-656 ).

Changed in lpcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.