checkbox-certification-client cannot be started due to the location of whitelist

Bug #1282009 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
checkbox-satellite
Fix Released
High
Daniel Manrique

Bug Description

We've the new whitelist location of our binaries modified.
But for checkbox-certification-client with the stable ppa, an "OPTIONS" parameter in /etc/default/checkbox-certification-client which points to the old whitelist location will override the correct setting in checkbox-certification-client.

I can find the "checkbox-certification-client" file in "checkbox-certification/default", but the option is empty in it, so I guess it's modified in somewhere else that I can't find...

Po-Hsu Lin (cypressyew)
description: updated
Revision history for this message
Daniel Manrique (roadmr) wrote :

The default is encoded in the "binary" itself. checkbox-certification-client is a shell script, look at it with:

less `which checkbox-certification-client`

You'll see this line setting the default whitelist:

export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---log=$CHECKBOX_DATA/checkbox-certification.log --whitelist-file=$CHECKBOX_SHARE/data/whitelists/client-selftest.whitelist $OPTIONS}

To update this, modify the binaries (shell scripts) in lp:checkbox-certification, they're in bin/ directly.

I'll set the bug to triaged since we know what needs to happen.

Changed in checkbox:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Yes, it is.
But I think the $OPTION parameter will overrides whatever we set in $CHECKBOX_OPTIONS, because it's in the end of that export command.

Despite my checkbox-certification-client binary do have the correct whitelist location (in $CHECKBOX_SHARE, instead of $CHECKBOX_CERTIFICATION_SHARE), I still got:
ubuntu@201307-14037:~$ checkbox-certification-client
Failed to open file '/usr/share/checkbox-certification/data/client-cert.whitelist': No such file or directory

Obviously, it's still looking for the whitelist in $CHECKBOX_CERTIFICATION_SHARE
If you put an ECHO command to print $OPTIONS out in the binary file, you will see the whitelist still points to $CHECKBOX_CERTIFICATION_SHARE. Dig deep for that $OPTION parameter, I believe it's in:
ubuntu@201307-14037:/etc/default$ cat checkbox-certification-client
# Checkbox options
OPTIONS=--whitelist-file=/usr/share/checkbox-certification/data/client-cert.whitelist\

If I change this location (or even leave it empty, as we already assign the white list in the binary) and reboot, everything goes fine

Version information:
ubuntu@201307-14037:~$ dpkg -l | grep checkbox
ii checkbox 0.17.6~ubuntu12.04.1 System testing application
ii checkbox-certification 0.19~ubuntu12.04.1 Checkbox Certification Tests
ii checkbox-certification-client 0.19~ubuntu12.04.1 Client Certification
ii checkbox-certification-tools 0.19~ubuntu12.04.1 Checkbox Certification Tools
ii checkbox-qt 0.17.6~ubuntu12.04.1 QT4 interface for checkbox
ii python3-checkbox 0.17.6~ubuntu12.04.1 CheckBox python3 library

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Guess what, this is a checkbox-satellite bug! Been a long time :)

in-target sed -i -e 's|OPTIONS=|OPTIONS=--whitelist-file=/usr/share/checkbox-certification/data/client-cert.whitelist\\ |' /etc/default/checkbox-certification-client; \

This line is bad.

IMO we should remove this from the preseed - unless explicitly instructed otherwise (like for SRU) we should stick with the default of the checkbox-certification-client binary.

affects: checkbox → checkbox-satellite
Revision history for this message
Daniel Manrique (roadmr) wrote :

A fix is proposed now.

I fixed the location of the whitelists when using the whitelist parameter to launch_testrun (no longer in /usr/share/checkbox-certification/data), removed setting the client whitelist (per comment #3 we should go with the default), and did the same for server (again, default is server-selftest.whitelist), *except* for 14.04, for which we have a release-specific whitelist, so for that release I do set it specifically (again, pointing to the correct directory).

Changed in checkbox-satellite:
status: Triaged → In Progress
assignee: nobody → Daniel Manrique (roadmr)
Po-Hsu Lin (cypressyew)
Changed in checkbox-satellite:
status: In Progress → Fix Committed
Po-Hsu Lin (cypressyew)
Changed in checkbox-satellite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.