Hello AutoTest dev,
We have been trying to save performance counters created by the IoZone
test as key value pairs and are running into problems which may be
related to

https://github.com/autotest/autotest/issues/625

The error seems to be triggered by this code /usr/local/autotest/tko/dbutils.py 
:: insert_test()  lines 94 - 107

for i in test.iterations:
        for key, value in i.attr_keyval.iteritems():
            tko_models.IterationAttribute.objects.create(
                test=tko_test,
                attribute=key,
                iteration=i.index,
                value=value)

        for key, value in i.perf_keyval.iteritems():
            tko_models.IterationResult.objects.create(
                test=tko_test,
                iteration=i.index,
                attribute=key,
                value=value)

Since the tko_iteration_result table has a primary key test_idx which is used 
for writing all attribute value pairs for a given test with the same value for 
test_idx, the primary key constraint is violated.

We worked around the issue by removing the foreign key and primary constraints 
on the tko_iteration_result table and then adding a new compound primary key 
constraint comprising the (test_idx, attribute and iteration fields) and 
finally adding the foreign key constraint. We did this through mysql. However 
we would like to work with you to find a correct solution by possibly modifying 
the initial code which creates this table.

Looking at https://github.com/autotest/autotest/issues/625 , it seems that 
django south has limitations about using compound primary keys.
But we would like to have a discussion about coming up with the correct 
solution.

I have attached the .parse.log for this test.

Thanks,
Bhupesh

Attachment: parse.log.tar.gz
Description: GNU Zip compressed data

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to