#405 Unable to schema upgrade koji hub 1.10 -> 1.11
Closed: Dropped by tkopecek. Opened by scottmon.

Updated my koji hub server with all the latest rpms released from Redhat. We're at RHEL 6.9.

Now trying to run this provided schema upgrade sql statement.

psql koji koji


How do you verify schema upgrades were successful after the provided SQL statement is run?

SSLError SSL3_Get_Server_Certificate: certificate verify failed - is seen in my koji hub gui after I run this above

There were two fixes to that upgrade script after the the official release:

commit aa20e03e8d3cc5138ca22bc526e25273b6bac0d0
Author: Matt Jia <mjia@redhat.com>
Date:   Wed Feb 1 10:21:49 2017 +1000
    fix a syntax error introduced by commit 6f4c576
commit 659acb69543b1b1a6eff67fbd7e6b211608673ca
Author: Tomas Kopecek <tkopecek@redhat.com>
Date:   Thu Jan 12 10:42:13 2017 +0100
    fix default values for buildroot.container_type

You could pull those in or just pull the current script from HEAD.

The upgrade scripts are always wrapped in begin..commit, so if they fail, no part of the update is applied.

Error: relation "content_generator" already exists

Your error indicates that you are not starting with the 1.10 schema. Perhaps you had updated to a prerelease version of koji between 1.10 and 1.11?

My current koji-hub installed rpm version is 1.10.1-3.el6

Trying to perform this schema update after upgrading the above package to 1.11.0-1

Is there a link to the most up to date 1.10 to 1.11 sql statement?

I've tried this up to date .sql statement which I imagine has the above 2 mentioned commits in it but still fails

https://github.com/koji-project/koji/blob/master/docs/schema-upgrade-1.10-1.11.sql

This is the only commit I see to the sql statement I'm trying to use

UPDATE buildroot SET container_type = 'chroot' WHERE container_type IS NULL AND container_arch IS NOT NULL;

Which corrected

UPDATE TABLE buildroot SET container_type = 'chroot' WHERE container_type IS NULL AND container_arch IS NOT NULL;

What else am I missing?

In the long dev cycle between 1.10.1 and 1.11.0, there were two intermediate schema updates. schema-update-cgen.sql and schema-update-cgen2.sql. These were not official updates because they weren't part of a release, but some of the EPEL builds came from git snapshots instead of official releases. The final schema upgrade script is essentially those two scripts put together.

If you're using this EPEL build [1], then you probably have the equivalent of schema-update-cgen.sql already applied, but not the cgen2 one, so you might try applying schema-update-cgen2.sql.

[1] https://koji.fedoraproject.org/koji/buildinfo?buildID=740652

Did the last bit help?

Neither of these helped

schema-update-cgen.sql or schema-update-cgen2.sql

Could you use pg_dump --schema-only on your db and attach the results? This will show where your schema is at.

E.g. pg_dump --schema-only -U koji koji >schema.dump

System is on an isolated network. Will be hard to get the attachment here. Let me run the schema dump and see what I can do.

@scottmon any update, or should we close this one?

Metadata Update from @tkopecek:
- Custom field Size adjusted to None
- Issue close_status updated to: Dropped
- Issue status updated to: Closed (was: Open)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/405

Please continue any further discussion there.

Metadata