paunch succeeds if a container's volumes fail validation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Emilien Macchi |
Bug Description
If a container's requested volumes fail validation in paunch (they don't exist on the host filesystem, or aren't readable, etc), paunch still exits 0 even though the container was not started. This causes the deployment to continue running and then typically fail in an unknown way at a later step since all the needed containers don't exist.
Example output where everything was reported as "ok" by ansible:
2019-12-05 22:14:09,796 p=375841 u=centos | TASK [Start containers for step 2 using paunch] *******
2019-12-05 22:14:09,796 p=375841 u=centos | Thursday 05 December 2019 22:14:09 +0000 (0:00:01.117) 0:17:18.803 *****
2019-12-05 22:14:10,482 p=375841 u=centos | ok: [compute-19]
2019-12-05 22:14:12,245 p=375841 u=centos | TASK [Debug output for task: Start containers for step 2] *******
2019-12-05 22:14:12,245 p=375841 u=centos | Thursday 05 December 2019 22:14:12 +0000 (0:00:02.449) 0:17:21.253 *****
2019-12-05 22:14:12,466 p=375841 u=centos | ok: [compute-19] => {
"failed_
"outputs.
}
You don't even get any stdout/stderr from paunch telling you the error because paunch is only returning stdout/stderr from the container, not paunch's own logging.
But, if we look in the paunch log on the managed host (compute-19), we see:
2019-12-05 22:26:37.609 28170 ERROR paunch [ ] /var/log/
Changed in tripleo: | |
assignee: | James Slagle (james-slagle) → Emilien Macchi (emilienm) |
This fix here would be for paunch to exit 1 when the validation fails. There's no reason to continue the deployment if all containers can't be started at each step.
We also need to make sure that paunch returns the error message in it's stdout/stderr, as opposed to just logging it locally on the managed host.