Bug 40550 - joinscript_run_in_container has wrong exit codes?
joinscript_run_in_container has wrong exit codes?
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P1 normal (vote)
: UCS 4.1-1-errata
Assigned To: Dirk Wiesenthal
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-01 12:55 CET by Florian Best
Modified: 2016-04-13 14:58 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-02-01 12:55:15 CET
# joinscript_run_in_container bash -c 'exit 1'
# echo $?
0
# joinscript_run_in_container foo
exec: "foo": executable file not found in $PATH
Cannot run exec command 32b67781fdd9d16dc94bf132f0d2a6ee24f1abedf87b95ee140dd84498a5e205 in container 07217b84dbcb5cdefac5f1fe18942248d9c01a9519d4ffb52622bc0ab0921e56: [8] System error: exec: "foo": executable file not found in $PATH
Error starting exec command in container 32b67781fdd9d16dc94bf132f0d2a6ee24f1abedf87b95ee140dd84498a5e205: Cannot run exec command 32b67781fdd9d16dc94bf132f0d2a6ee24f1abedf87b95ee140dd84498a5e205 in container 07217b84dbcb5cdefac5f1fe18942248d9c01a9519d4ffb52622bc0ab0921e56: [8] System error: exec: "foo": executable file not found in $PATH
# echo $?
0
Comment 1 Dirk Wiesenthal univentionstaff 2016-03-22 12:24:38 CET
This is very annoying when developing joinscripts
Comment 2 Dirk Wiesenthal univentionstaff 2016-03-26 22:56:09 CET
Is also an issue with joinscripts that have set -e.

univention-app shell "$APP" bash -c 'exit 0'
univention-app shell "$APP" bash -c 'exit 1'
joinscript_run_in_container bash -c 'exit 1'

univention-appcenter 5.0.20-34.145.201603262252
Comment 3 Florian Best univentionstaff 2016-04-06 09:26:50 CEST
OK: YAML
OK: Code
OK: fix

root@xen3:~# joinscript_run_in_container bash -c 'echo foo'; echo $?                                      
foo
0
root@xen3:~# joinscript_run_in_container bash -c 'exit 2'; echo $?                                        
2
root@xen3:~# univention-app shell "jenkins" bash -c 'exit 0'
root@xen3:~# echo $?
0
root@xen3:~# univention-app shell "jenkins" bash -c 'exit 1'; echo $?
1
root@xen3:~# univention-app shell "jenkins" bash -c 'exit 2'; echo $?
2
root@xen3:~# univention-app shell; echo $?
usage: univention-app shell [-h] app ...
univention-app shell: error: too few arguments
2
Comment 4 Janek Walkenhorst univentionstaff 2016-04-13 14:58:44 CEST
<http://errata.software-univention.de/ucs/4.1/146.html>