unmount: disabled causes installation failure to exit silently
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| curtin |
High
|
Unassigned | ||
| curtin (Ubuntu) |
Medium
|
Unassigned |
Bug Description
from cmd_install:
finally:
if log_target_path:
if instcfg.
return
# unmount everything (including iscsi disks)
that 'return' means the function returns normally even in an error case. I think this needs to be changed into an if/else.
Related branches
- Server Team CI bot: Approve (continuous-integration) on 2018-04-18
- curtin developers: Pending requested 2018-04-18
-
Diff: 321 lines (+106/-41)12 files modifiedcurtin/block/clear_holders.py (+4/-3)
curtin/block/mdadm.py (+3/-4)
curtin/commands/curthooks.py (+1/-1)
curtin/commands/install.py (+22/-23)
debian/changelog (+11/-0)
examples/tests/lvm.yaml (+21/-0)
tests/unittests/test_clear_holders.py (+6/-6)
tests/unittests/test_commands_install.py (+28/-0)
tests/vmtests/__init__.py (+1/-1)
tests/vmtests/test_lvm.py (+1/-1)
tests/vmtests/test_network_vlan.py (+6/-0)
tests/vmtests/test_pollinate_useragent.py (+2/-2)
- Michael Hudson-Doyle: Pending requested 2018-04-16
-
Diff: 39 lines (+29/-0)1 file modifiedtests/unittests/test_commands_install.py (+29/-0)
- Ryan Harper: Approve on 2018-04-17
- Scott Moser: Needs Information on 2018-04-17
- Server Team CI bot: Approve (continuous-integration) on 2018-04-17
-
Diff: 94 lines (+50/-23)2 files modifiedcurtin/commands/install.py (+22/-23)
tests/unittests/test_commands_install.py (+28/-0)
Changed in curtin: | |
status: | New → In Progress |
Ryan Harper (raharper) wrote : | #1 |
Changed in curtin: | |
importance: | Undecided → High |
Scott Moser (smoser) wrote : | #2 |
An upstream commit landed for this bug.
To view that commit see the following URL:
https:/
Changed in curtin: | |
status: | In Progress → Fix Committed |
Changed in curtin (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
status: | Confirmed → In Progress |
Launchpad Janitor (janitor) wrote : | #3 |
This bug was fixed in the package curtin - 18.1-5-
---------------
curtin (18.1-5-
* New upstream snapshot.
- clear-holders: fix lvm name use when shutting down (LP: #1764602)
- install: prevent unmount: disabled from swallowing installation failures
(LP: #1764210)
- vmtest: bionic images no longer use the vlan package
- pycodestyle: Fix invalid escape sequences in string literals.
-- Ryan Harper <email address hidden> Wed, 18 Apr 2018 10:15:46 -0500
Changed in curtin (Ubuntu): | |
status: | In Progress → Fix Released |
This bug is believed to be fixed in curtin in version 18.2. If this is still a problem for you, please make a comment and set the state back to New
Thank you.
Changed in curtin: | |
status: | Fix Committed → Fix Released |
My reading of the python3 docs suggests that this analysis is correct. If we issue a return, then the saved exception is discarded.
If finally is present, it specifies a ‘cleanup’ handler. The try clause is executed, including any except and else clauses. If an exception occurs in any of the clauses and is not handled, the exception is temporarily saved. The finally clause is executed. If there is a saved exception it is re-raised at the end of the finally clause. If the finally clause raises another exception, the saved exception is set as the context of the new exception. If the finally clause executes a return or break statement, the saved exception is discarded:
>>>
>>> def f():
... try:
... 1/0
... finally:
... return 42
...
>>> f()
42
https:/ /docs.python. org/3/reference /compound_ stmts.html# try