zun exec should return the same exit_code of the command
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zun |
Fix Released
|
Medium
|
hongbin |
Bug Description
$ zun create -i cirros -c "sleep 1000000" -n test
$ zun start test
$ zun --debug exec test -c "kkkkkk"
....
DEBUG (connectionpool
DEBUG (session:286) RESP: [200] Content-Length: 56 Content-Type: application/json; charset=UTF-8 X-Openstack-
RESP BODY: "exec: \"kkkkkk\": executable file not found in $PATH\n"
As showed above, the server return 200 even if the command didn't successfully executed. This is wrong. The server should return a 400 response in that case.
NOTE: the command exit code can be checked in Exec Inspect API: https:/
Changed in zun: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in zun: | |
assignee: | nobody → feng.shengqin@zte.com.cn (feng-shengqin) |
summary: |
- zun exec should fail when the command failed + zun exec should return the same exit_code of the command |
Changed in zun: | |
status: | In Progress → Fix Released |
@Feng, are you still working on it?