Skip to content

Instantly share code, notes, and snippets.

@jlsherrill
Last active August 29, 2015 14:15
Show Gist options
  • Save jlsherrill/2fd34fa154538dff8ad4 to your computer and use it in GitHub Desktop.
Save jlsherrill/2fd34fa154538dff8ad4 to your computer and use it in GitHub Desktop.
Pulp fix for long titles (epel 7)

workaround for: https://bugzilla.redhat.com/show_bug.cgi?id=1175616

open this file:

/usr/lib/pulp/plugins/types/rpm_support.json

And remove the 'title' search index from the erratum type:

    {
        "id" : "erratum",
        "display_name" : "Erratum",
        "description" : "Erratum advisory information",
        "unit_key" :
                ["id"],
        "search_indexes" : [
            "id", "title", "version", "release", "type",
            "status", "updated", "issued", "severity", "references"
        ],
        "referenced_types" : ["rpm"]
    },

Notice 'title' is under 'search_indexes'

        "search_indexes" : [
            "id", "title", "version", "release", "type",
            "status", "updated", "issued", "severity", "references"
        ],

remove "title",:

        "search_indexes" : [
            "id", "version", "release", "type",
            "status", "updated", "issued", "severity", "references"
        ],

If you are doing an upgrade and hitting the error, run:

Then re-run katello-installer --upgrade

And you are done, you can stop!

If you have fully installed/upgraded and are hitting the error, continue:

# mongo pulp_database
> db.units_erratum.dropIndex("title_1")
> quit()

and then restart the katello services:

# katello-service restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment