It's possible to have two "different" logs which equate to the same filesystem path, such as: +----------+----------------+------+-------------+---------------------+ | id | recipe_task_id | path | filename | start_time | +----------+----------------+------+-------------+---------------------+ | 61093855 | 7194525 | / | TESTOUT.log | 2012-08-01 08:17:34 | | 61095279 | 7194525 | | TESTOUT.log | 2012-08-01 08:38:09 | These are really both pointing at the same log file, and will appear in the web UI as two separate hyperlinks to the same URL. More seriously, it will confuse beaker-transfer which will end up trying to link the same file twice: 2012-10-11 00:05:49 [ERROR ] { 322} bkr.labcontroller.proxy:346 unable to hardlink /var/www/beaker/logs/tasks/7676703//TESTOUT.log to /var/www/beaker/logs/tmpMj2bFJ/2012/08/2855/285510/613630/7676703//TESTOUT.log, [Errno 17] File exists We should probably apply some better normalisation to path and filename on the server side before saving the rows, to avoid such duplicates.
On Gerrit: http://gerrit.beaker-project.org/1454
Verified with build 0.9.4-2.git.104.1433411. Reproduced by something like: s = xmlrpclib.ServerProxy('%s:8000/RPC2' % os.environ['LAB_CONTROLLER']) s.task_upload_file(task_id, '', 'RHBZ865265', len(task_log), task_log_md5, 0, task_log_enc) s.task_upload_file(task_id, '/', 'RHBZ865265', len(task_log), task_log_md5, 0, task_log_enc) s.result_upload_file(result_id, '', 'RHBZ865265RECIPE', len(recipe_log), recipe_log_md5, 0, recipe_log_enc) s.result_upload_file(result_id, '/', 'RHBZ865265RECIPE', len(recipe_log), recipe_log_md5, 0, recipe_log_enc) Before the fix, there are duplicate recipe/task logs with different but equivalent path. The patch fixes this issue by normalizing the "" path to "/", so there is no duplicate logs now.
This has now been released