Comment 7 for bug 1065983

Revision history for this message
Jeff Lane  (bladernr) wrote :

Here's what happens when the job is parsed the first time around:
2013-04-25 16:13:02,497 DEBUG JEFF: PARSING RESULT networking/info:
2013-04-25 16:13:02,497 DEBUG {'description': 'Network Information', 'plugin': 'local', 'command': 'cat <<\'EOF\' | run_templates -s \'udev_resource | filter_templates -w "category=WIRELESS" -w "category=NETWORK" | awk "/path: / { print \\$2 }" | xargs -n 1 sh -c "for i in \\`ls /sys\\$0/net 2>/dev/null\\`; do echo \\$0 \\$i; done"\'\nplugin: manual\nname: networking/info_$2\nrequires: device.path == "$1"\ncommand: network_info $2\n_description:\n PURPOSE:\n This test will check the different NIC\n STEPS:\n 1. Please verify the following information for NIC $2\n INFO:\n $output\n VERIFICATION:\n Is this correct?\nEOF', 'requires': "device.category == 'NETWORK' or device.category == 'WIRELESS'", 'name': 'networking/info'}

The message sent to DescriptionParser is for the local run.

NOW, when that local job executes, this is the output of that command:
2013-04-25 16:13:07,686 DEBUG Calling <string> MessageInfo.messa
ge_result(pass, plugin: manual
name: networking/info_eth0
requires: device.path == "/devices/pci0000:00/0000:00:19.0"
command: network_info eth0
_description:
 PURPOSE:
     This test will check the different NIC
 STEPS:
     1. Please verify the following information for NIC eth0
 INFO:

 VERIFICATION:
     Is this correct?

Note that $output has been translated when the local job is executed. THAT's the root cause. Once that is done and DescriptionParser fires again, we see the obvious result:

2013-04-25 16:13:07,693 DEBUG JEFF: PARSING RESULT networking/info_eth0:
2013-04-25 16:13:07,693 DEBUG {'description': 'PURPOSE:\n This test will check the different NIC\nSTEPS:\n 1. Please verify the following information for NIC eth0\nINFO:\n\nVERIFICATION:\n Is this correct?', 'plugin': 'manual', 'command': 'network_info eth0', 'requires': 'device.path == "/devices/pci0000:00/0000:00:19.0"', 'name': 'networking/info_eth0'}

Since $output was converted to '' because it was empty at that point by the local job, the second time around, it simply does not exist, which is why checkbox is barfing.