Activity log for bug #1615780

Date Who What changed Old value New value Message
2016-08-22 18:45:36 Jon Grimm bug added bug
2016-08-22 19:39:35 Launchpad Janitor branch linked lp:~raharper/curtin/trunk.fix-lp1615780
2016-08-22 19:41:03 Ryan Harper curtin: importance Undecided Low
2016-08-22 19:41:03 Ryan Harper curtin: status New In Progress
2016-08-26 14:25:26 Launchpad Janitor branch linked lp:curtin
2016-09-29 18:56:00 Launchpad Janitor branch linked lp:~smoser/ubuntu/yakkety/curtin/pkg
2016-10-03 18:52:23 Launchpad Janitor branch linked lp:~raharper/ubuntu/xenial/curtin/pkg-sru-revno425
2016-10-03 22:08:26 Ryan Harper 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/python3/dist-packages/curtin/commands/apply_net.py", line 78, in apply_net_main network_config=state['network_config']) File "/usr/lib/python3/dist-packages/curtin/commands/apply_net.py", line 44, in apply_net ns = net.parse_net_config(network_config) File "/usr/lib/python3/dist-packages/curtin/net/__init__.py", line 283, in parse_net_config net_config = config.load_config(path) File "/usr/lib/python3/dist-packages/curtin/config.py", line 117, in load_config return yaml.safe_load(content) File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 94, in safe_load return load(stream, SafeLoader) File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 72, in load return loader.get_single_data() File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 35, in get_single_data node = self.get_single_node() File "/usr/lib/python3/dist-packages/yaml/composer.py", line 36, in get_single_node document = self.compose_document() File "/usr/lib/python3/dist-packages/yaml/composer.py", line 55, in compose_document node = self.compose_node(None, None) File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/lib/python3/dist-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/lib/python3/dist-packages/yaml/composer.py", line 127, in compose_mapping_node while not self.check_event(MappingEndEvent): File "/usr/lib/python3/dist-packages/yaml/parser.py", line 98, in check_event self.current_event = self.state() File "/usr/lib/python3/dist-packages/yaml/parser.py", line 428, in parse_block_mapping_key if self.check_token(KeyToken): File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 116, in check_token self.fetch_more_tokens() File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 257, in fetch_more_tokens self.get_mark()) yaml.scanner.ScannerError: while scanning for the next token found character '\t' that cannot start any token in "<unicode string>", line 4, column 5: config: ^ Applied network configuration successfully Note the emitting of messages "failed to apply network config" AND "Applied network configuration successfully" Really a minor issue. [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/python3/dist-packages/curtin/commands/apply_net.py", line 78, in apply_net_main     network_config=state['network_config'])   File "/usr/lib/python3/dist-packages/curtin/commands/apply_net.py", line 44, in apply_net     ns = net.parse_net_config(network_config)   File "/usr/lib/python3/dist-packages/curtin/net/__init__.py", line 283, in parse_net_config     net_config = config.load_config(path)   File "/usr/lib/python3/dist-packages/curtin/config.py", line 117, in load_config     return yaml.safe_load(content)   File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 94, in safe_load     return load(stream, SafeLoader)   File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 72, in load     return loader.get_single_data()   File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 35, in get_single_data     node = self.get_single_node()   File "/usr/lib/python3/dist-packages/yaml/composer.py", line 36, in get_single_node     document = self.compose_document()   File "/usr/lib/python3/dist-packages/yaml/composer.py", line 55, in compose_document     node = self.compose_node(None, None)   File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node     node = self.compose_mapping_node(anchor)   File "/usr/lib/python3/dist-packages/yaml/composer.py", line 133, in compose_mapping_node     item_value = self.compose_node(node, item_key)   File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node     node = self.compose_mapping_node(anchor)   File "/usr/lib/python3/dist-packages/yaml/composer.py", line 127, in compose_mapping_node     while not self.check_event(MappingEndEvent):   File "/usr/lib/python3/dist-packages/yaml/parser.py", line 98, in check_event     self.current_event = self.state()   File "/usr/lib/python3/dist-packages/yaml/parser.py", line 428, in parse_block_mapping_key     if self.check_token(KeyToken):   File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 116, in check_token     self.fetch_more_tokens()   File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 257, in fetch_more_tokens     self.get_mark()) yaml.scanner.ScannerError: while scanning for the next token found character '\t' that cannot start any token   in "<unicode string>", line 4, column 5:               config:         ^ Applied network configuration successfully Note the emitting of messages "failed to apply network config" AND "Applied network configuration successfully" Really a minor issue.
2016-10-05 15:40:34 Andy Whitcroft bug added subscriber Ubuntu Stable Release Updates Team
2016-10-05 15:40:40 Andy Whitcroft bug added subscriber SRU Verification
2016-10-05 15:40:45 Andy Whitcroft tags verification-needed
2016-10-05 15:48:06 Andy Whitcroft bug task added curtin (Ubuntu)
2016-10-05 15:48:19 Andy Whitcroft nominated for series Ubuntu Xenial
2016-10-05 15:48:19 Andy Whitcroft bug task added curtin (Ubuntu Xenial)
2016-10-05 15:50:54 Andy Whitcroft curtin (Ubuntu): status New Fix Released
2016-10-05 15:50:56 Andy Whitcroft curtin (Ubuntu Xenial): status New Fix Committed
2016-10-06 18:48:51 Jon Grimm tags verification-needed verification-done
2016-10-06 19:15:20 Jon Grimm curtin: status In Progress Fix Committed
2016-10-17 03:58:02 Launchpad Janitor curtin (Ubuntu Xenial): status Fix Committed Fix Released
2016-10-17 03:58:56 Martin Pitt removed subscriber Ubuntu Stable Release Updates Team
2017-12-15 22:10:51 Scott Moser curtin: status Fix Committed Fix Released