Merge lp:~raharper/curtin/trunk.bcache-toctou-v2 into lp:~curtin-dev/curtin/trunk
Proposed by
Ryan Harper
Status: | Merged |
---|---|
Approved by: | Scott Moser |
Approved revision: | 542 |
Merged at revision: | 540 |
Proposed branch: | lp:~raharper/curtin/trunk.bcache-toctou-v2 |
Merge into: | lp:~curtin-dev/curtin/trunk |
Diff against target: |
65 lines (+16/-14) 2 files modified
curtin/block/clear_holders.py (+10/-8) tests/unittests/test_clear_holders.py (+6/-6) |
To merge this branch: | bzr merge lp:~raharper/curtin/trunk.bcache-toctou-v2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Scott Moser (community) | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Review via email: mp+333095@code.launchpad.net |
Description of the change
clear_holders: bcache log IO/OS exceptions but do not raise
While stopping bcache devices, curtin races with the kernel w.r.t how
quickly it removes the bcache device (and the sysfs tree related).
The result is that as curtin attempts to write "1" into the sysfs tree
of bcache device to stop it, the range of errors changes depending on
when we race with the kernel asynchronously removing the sysfs path.
Therefore we log the exception errno we got but do not re-raise. The
the calling process is watching whether the same sysfs path is being
removed; if the bcache device fails to go away then curtin will have a
log of the exceptions to debug.
To post a comment you must log in.
PASSED: Continuous integration, rev:542 /jenkins. ubuntu. com/server/ job/curtin- ci/672/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-amd64/ 672 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-arm64/ 672 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-ppc64el/ 672 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-s390x/ 672
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/curtin- ci/672/ rebuild
https:/