Presence of both no_proxy and NO_PROXY environment variables causes Checkbox to error when saving the output of the environment resource job.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
High
|
Unassigned |
Bug Description
Since the environment resource job has been introduced into Checkbox, the following exception has started appearing in the log:
2012-10-16 10:24:02,699 ERROR Error running event handler <string> MessageInfo.
Traceback (most recent call last):
File "/home/
results.
File "<string>", line 112, in message_file
File "/home/
File "/home/
File "/home/
Exception: Template <stream> has a duplicate field 'no_proxy' with a new value 'localhost,
After some debugging, what this conveys is that where Checkbox is trying to save the output of the environment resource job, it is encountering the anomaly that there is both a 'NO_PROXY' environment variable and a 'no_proxy' environment variable set. Why this is is currently unknown, but it's nothing to do with Checkbox. This causes the above validation error. The root cause of this in Checkbox is that the names of environment variables are getting converted to lower-case in the resource job, in order to keep consistency in the job files. It therefore see's 'no_proxy' twice.
Related branches
- Daniel Manrique (community): Approve
- Marc Tardif (community): Approve
-
Diff: 198 lines (+22/-19)5 files modifiedcheckbox/lib/template.py (+1/-1)
debian/changelog (+3/-0)
jobs/resource.txt.in (+1/-1)
jobs/suspend.txt.in (+9/-9)
jobs/wireless.txt.in (+8/-8)
Changed in checkbox: | |
status: | Triaged → Fix Committed |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |
There are a few possibilities to deal with this, some less desirable than others -
1.) Retain the casing. This will look bad in the job files, as the requires line will have to be written like:
environment.ROUTERS == 'multiple'
(of course the environment_info plugin could be changed to use lowercase names for the variables)
2.) The resource job could filter duplicates