Confusing 'success' message when apply_net fails.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
Low
|
Unassigned | ||
curtin (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Curtin produced a configusing 'success' message when failying to apply
a provided network configuration.
Curtin has been updated to ensure that if 'apply_net' commands fail
the return code is propagated up to the invocation and no longer
prints both a success and failure message when a failure occurs.
[Test Case]
* Install proposed curtin package and run the command
- # curtin apply_net -t target -c bad.yaml
PASS: Curtin does not emit successful message:
'Applied network configuration successfully'
FAIL: Curtin emits both
'Applied network configuration successfully' and
'failed to apply network config'
[Regression Potential]
* Users of apply_net cli command may have examined the output of the
command which is now modified, as well as the return code.
[Original Description]
When apply_net fails, the user both a fail message and a success message.. a bit confusing.
root@x1:~# curtin apply_net -t target -c bad.yaml
Applying network configuration
failed to apply network config
Traceback (most recent call last):
File "/usr/lib/
network_
File "/usr/lib/
ns = net.parse_
File "/usr/lib/
net_config = config.
File "/usr/lib/
return yaml.safe_
File "/usr/lib/
return load(stream, SafeLoader)
File "/usr/lib/
return loader.
File "/usr/lib/
node = self.get_
File "/usr/lib/
document = self.compose_
File "/usr/lib/
node = self.compose_
File "/usr/lib/
node = self.compose_
File "/usr/lib/
item_value = self.compose_
File "/usr/lib/
node = self.compose_
File "/usr/lib/
while not self.check_
File "/usr/lib/
self.
File "/usr/lib/
if self.check_
File "/usr/lib/
self.
File "/usr/lib/
self.
yaml.scanner.
found character '\t' that cannot start any token
in "<unicode string>", line 4, column 5:
^
Applied network configuration successfully
Note the emitting of messages
"failed to apply network config"
AND
"Applied network configuration successfully"
Really a minor issue.
Related branches
- Server Team CI bot: Approve (continuous-integration)
- curtin developers: Pending requested
-
Diff: 11 lines (+1/-0)1 file modifiedcurtin/commands/apply_net.py (+1/-0)
- Scott Moser: Pending requested
-
Diff: 14513 lines (+10324/-1893)94 files modifiedMakefile (+3/-1)
curtin/__init__.py (+4/-0)
curtin/block/__init__.py (+249/-61)
curtin/block/clear_holders.py (+387/-0)
curtin/block/lvm.py (+96/-0)
curtin/block/mdadm.py (+18/-5)
curtin/block/mkfs.py (+10/-5)
curtin/commands/apply_net.py (+156/-1)
curtin/commands/apt_config.py (+668/-0)
curtin/commands/block_info.py (+75/-0)
curtin/commands/block_meta.py (+134/-263)
curtin/commands/block_wipe.py (+1/-2)
curtin/commands/clear_holders.py (+48/-0)
curtin/commands/curthooks.py (+61/-235)
curtin/commands/main.py (+4/-3)
curtin/config.py (+2/-3)
curtin/gpg.py (+74/-0)
curtin/net/__init__.py (+67/-30)
curtin/net/network_state.py (+45/-1)
curtin/util.py (+278/-81)
debian/changelog (+32/-2)
doc/conf.py (+21/-4)
doc/devel/README-vmtest.txt (+0/-152)
doc/devel/README.txt (+0/-55)
doc/devel/clear_holders_doc.txt (+85/-0)
doc/index.rst (+6/-0)
doc/topics/apt_source.rst (+164/-0)
doc/topics/config.rst (+551/-0)
doc/topics/development.rst (+68/-0)
doc/topics/integration-testing.rst (+245/-0)
doc/topics/networking.rst (+522/-0)
doc/topics/overview.rst (+7/-7)
doc/topics/reporting.rst (+3/-3)
doc/topics/storage.rst (+894/-0)
examples/apt-source.yaml (+267/-0)
examples/network-ipv6-bond-vlan.yaml (+56/-0)
examples/tests/apt_config_command.yaml (+85/-0)
examples/tests/apt_source_custom.yaml (+97/-0)
examples/tests/apt_source_modify.yaml (+92/-0)
examples/tests/apt_source_modify_arches.yaml (+102/-0)
examples/tests/apt_source_modify_disable_suite.yaml (+92/-0)
examples/tests/apt_source_preserve.yaml (+98/-0)
examples/tests/apt_source_search.yaml (+97/-0)
examples/tests/basic.yaml (+5/-1)
examples/tests/basic_network_static_ipv6.yaml (+22/-0)
examples/tests/basic_scsi.yaml (+1/-1)
examples/tests/network_alias.yaml (+125/-0)
examples/tests/network_mtu.yaml (+88/-0)
examples/tests/network_source_ipv6.yaml (+31/-0)
examples/tests/test_old_apt_features.yaml (+11/-0)
examples/tests/test_old_apt_features_ports.yaml (+10/-0)
examples/tests/uefi_basic.yaml (+15/-0)
examples/tests/vlan_network_ipv6.yaml (+92/-0)
setup.py (+2/-2)
tests/unittests/helpers.py (+41/-0)
tests/unittests/test_apt_custom_sources_list.py (+170/-0)
tests/unittests/test_apt_source.py (+1032/-0)
tests/unittests/test_block.py (+210/-0)
tests/unittests/test_block_lvm.py (+94/-0)
tests/unittests/test_block_mdadm.py (+28/-23)
tests/unittests/test_block_mkfs.py (+2/-2)
tests/unittests/test_clear_holders.py (+329/-0)
tests/unittests/test_make_dname.py (+200/-0)
tests/unittests/test_net.py (+54/-13)
tests/unittests/test_util.py (+180/-2)
tests/vmtests/__init__.py (+38/-38)
tests/vmtests/helpers.py (+129/-166)
tests/vmtests/test_apt_config_cmd.py (+55/-0)
tests/vmtests/test_apt_source.py (+238/-0)
tests/vmtests/test_basic.py (+21/-41)
tests/vmtests/test_bcache_basic.py (+5/-8)
tests/vmtests/test_bonding.py (+0/-204)
tests/vmtests/test_lvm.py (+2/-1)
tests/vmtests/test_mdadm_bcache.py (+21/-17)
tests/vmtests/test_multipath.py (+5/-13)
tests/vmtests/test_network.py (+205/-348)
tests/vmtests/test_network_alias.py (+40/-0)
tests/vmtests/test_network_bonding.py (+63/-0)
tests/vmtests/test_network_enisource.py (+91/-0)
tests/vmtests/test_network_ipv6.py (+53/-0)
tests/vmtests/test_network_ipv6_enisource.py (+26/-0)
tests/vmtests/test_network_ipv6_static.py (+42/-0)
tests/vmtests/test_network_ipv6_vlan.py (+34/-0)
tests/vmtests/test_network_mtu.py (+155/-0)
tests/vmtests/test_network_static.py (+44/-0)
tests/vmtests/test_network_vlan.py (+77/-0)
tests/vmtests/test_nvme.py (+2/-3)
tests/vmtests/test_old_apt_features.py (+89/-0)
tests/vmtests/test_raid5_bcache.py (+5/-8)
tests/vmtests/test_uefi_basic.py (+16/-18)
tools/jenkins-runner (+33/-7)
tools/launch (+9/-48)
tools/xkvm (+90/-2)
tox.ini (+30/-13)
Changed in curtin: | |
importance: | Undecided → Low |
status: | New → In Progress |
description: | updated |
Changed in curtin (Ubuntu): | |
status: | New → Fix Released |
Changed in curtin (Ubuntu Xenial): | |
status: | New → Fix Committed |
Changed in curtin: | |
status: | In Progress → Fix Committed |
Hello Jon, or anyone else affected,
Accepted curtin into xenial-proposed. The package will build now and be available at https:/ /launchpad. net/ubuntu/ +source/ curtin/ 0.1.0~bzr425- 0ubuntu1~ 16.04.1 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed. In either case, details of your testing will help us make a better decision.
Further information regarding the verification process can be found at https:/ /wiki.ubuntu. com/QATeam/ PerformingSRUVe rification . Thank you in advance!