Description of problem: Tried to upgrade to Satellite 6.3 from Satellite 6.2.11. pulp database upgrade task fails with: E11000 duplicate key error index: pulp_database.units_yum_repo_metadata_file.$data_type_1_repo_id_1 dup key: { : "productid", : "Demo62-Dev-Combined-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Extras_RPMs_x86_64" } Running a query on the pulp_database, I found these duplicate entries: 2 productid;Demo62-Dev-Combined-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Extras_RPMs_x86_64 2 productid;Demo62-Dev-Small-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Extras_RPMs_x86_64 3 productid;Demo62-Library-Combined-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Extras_RPMs_x86_64 5 productid;Demo62-Library-Small-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Extras_RPMs_x86_64 2 productid;Demo62-QA-Small-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Extras_RPMs_x86_64 This aligns with my current Content View publish/promote configuration/history: * 2 Promotions of LE:Dev from CV:Combined * 2 Promotions of LE:Dev from Small * 3 versions of CV:Combined * 5 versions of CV:Small * 2 Promotions of LE:QA from CV:Small Version-Release number of selected component (if applicable): Satellite 6.2.11 How reproducible: Steps to Reproduce: 1. Create a CV 2. Publish at least 2 versions of it 3. Promote at least 1 environment of it (other than Library) Actual results: satellite-installer has a fatal error due to pulp migration task attempting to overlay a unique key on the pulp database. Expected results: satellite-installer does not error after pulp migration adds the unique key to the pulp database. Additional info:
Thanks Billy, please provide sosreport from the failure for further analysis
Billy, could you provide the full output from pulp-manage-db? Also there should be a traceback either on the console or in the system log related to this. That would be very helpful to see as well.
Thanks Tanya, Sorry about the delay in getting to this BZ regarding why we drop the collections: if you try to publish a repository (such as when publishing a cv), if there's a distribution in the repo that isn't actually on the filesystem, pulp will error. I added a pulp-manage-db step to the reset pulp data steps: https://github.com/RedHatSatellite/satellite-clone/pull/256 Thanks again for looking into this!
Moving to POST, since satellite-clone PR has been merged.
This should be present in 1.2.0
Verified that pulp-manage-db is now called during clone in 1.2: 2017-12-15 12:09:11,035 p=19443 u=root | TASK [satellite-clone : migrate pulp db] ****************************************************************************** ... journal verifying sudo call: Dec 15 12:09:11 ibm-x3250m4-05.lab.eng.rdu2.redhat.com sudo[26588]: root : TTY=pts/0 ; PWD=/usr/share/satellite-clone ; USER=apache ; COMMAND=/bin/pulp-manage-db
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0033