Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 883887 - Duplicate definition of package causes server Fault
Summary: Duplicate definition of package causes server Fault
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.10
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: 0.16.1
Assignee: matt jia
QA Contact:
URL:
Whiteboard: Misc
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-05 14:00 UTC by Marian Ganisin
Modified: 2018-02-06 00:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-26 23:54:30 UTC


Attachments (Terms of Use)

Description Marian Ganisin 2012-12-05 14:00:38 UTC
Description of problem:

If I try submit job with duplicate packages defined, server returns Fault. Duplicate was added by accident, however server should not crack up.

Version-Release number of selected component (if applicable):
Version - 0.10.5

How reproducible:
Submit this:
<job>
    <whiteboard></whiteboard>
    <recipeSet>
        <recipe>
            <distroRequires>
                <and>
                    <distro_arch op="=" value="x86_64"/>
                    <distro_name op="=" value="RHEL-6.3"/>
                    <distro_variant op="=" value="Server"/>
                </and>
            </distroRequires>
            <hostRequires/>
            <packages>
                <package name="system-config-kdump"/>
                <package name="system-config-kdump"/>
            </packages>
            <task name="/distribution/install" role="STANDALONE"/>
        </recipe>
    </recipeSet>
</job>



Actual results:
Exception: <Fault 1: '<class \'sqlalchemy.exc.IntegrityError\'>:(IntegrityError) (1062, "Duplicate entry \'730496-103\' for key 1") \'INSERT INTO task_packages_custom_map (recipe_id, package_id) VALUES (%s, %s)\' ((730496L, 103L), (730496L, 103L))'>


Expected results:
Successful submit

Comment 1 Dan Callaghan 2012-12-05 22:04:03 UTC
Yet another case where we need to treat packages as a set instead of a list.

Comment 3 matt jia 2014-03-21 05:49:58 UTC
Patch is on gerrit:

http://gerrit.beaker-project.org/#/c/2944/

Cheers, Matt Jia

Comment 6 Dan Callaghan 2014-03-26 23:54:30 UTC
Beaker 0.16.1 has been released.


Note You need to log in before you can comment on or make changes to this bug.