upgrading puppedb, wrong schema number

420 views
Skip to first unread message

Fabrice Bacchella

unread,
Feb 24, 2016, 5:40:39 AM2/24/16
to puppet...@googlegroups.com
I'm running puppetdb on ScientificLinux 6.7 (a RHEL clone).

I upgraded from puppetdb-3.1.0 to puppetdb-3.2.2, but know I'm getting in the log :

2016-02-24 11:22:58,585 ERROR [p.t.internal] Error during service start!!!
java.lang.IllegalStateException: Your PuppetDB database contains a schema migration numbered 40, but this version of PuppetDB does not recognize that version.
at puppetlabs.puppetdb.scf.migrate$migrate_BANG_.invoke(migrate.clj:1601) ~[na:na]
at puppetlabs.puppetdb.cli.services$initialize_schema.invoke(services.clj:202) ~[na:na]
at puppetlabs.puppetdb.cli.services$init_with_db.invoke(services.clj:220) ~[na:na]

I'm using postgresql for the backend.

Any hint about the migration number 40 ?

Ken Barber

unread,
Feb 24, 2016, 5:51:55 AM2/24/16
to Puppet Users
Migration number 40 is for version 3.2.3, not version 3.2.2. Looks
like someone has previously installed version 3.2.3 and pointed it at
your database.

See:

https://github.com/puppetlabs/puppetdb/blob/3.2.3/src/puppetlabs/puppetdb/scf/migrate.clj#L1553
versus
https://github.com/puppetlabs/puppetdb/blob/3.2.2/src/puppetlabs/puppetdb/scf/migrate.clj#L1534

So ... why not just use 3.2.3 anyway? Since it looks like the
migration has taken place, and its the latest release.

ken.
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5FF56C65-9335-41EC-A81E-EFA27E4BA3A4%40orange.fr.
> For more options, visit https://groups.google.com/d/optout.

Fabrice Bacchella

unread,
Feb 24, 2016, 6:37:40 AM2/24/16
to puppet...@googlegroups.com
puppetdb 3.2.3 is not marked as an available update.

# yum install puppetdb-3.2.3
...
No package puppetdb-3.2.3 available.

# yum repolist -v puppetlabs-pc1
...
Repo-updated : Thu Feb 4 22:15:20 2016
Repo-pkgs : 49

And indeed :
# find ...mirrors/puppetlabs/6/PC1/x86_64 -name '*.rpm' | wc -l
51

2 rpm are missing, did someone forgot a createrepo ? Running it on my local mirror solved the problem.

No one installed puppetdb 3.2.3, I don't know where this 40 is coming from.
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAE4bNTkQ7ygsrRQ3amwXv_WKBd1SAckQc%2BGUbhMunC3uysDrVQ%40mail.gmail.com.

Ken Barber

unread,
Feb 24, 2016, 6:56:38 AM2/24/16
to Puppet Users
Oh hey, this package debacle is totally true. Confirmed it myself for EL6:

https://gist.github.com/kbarber/b0551d9aaffe2302a8dc

I've raised a bug on this with our release team, thanks.

As far as why there is a 40? I can't come up with another logical
explanation except for, at one point 3.2.3 was installed. We didn't
add a schema migration 40 anywhere else. Unless someone else added it,
or something else added it. If you don't think it was an accidental
package update, I'd double check the integrity of your database,
rather - if the package didn't do it, then I wouldn't trust the schema
to be in a good state.

In particular, check these function indexes were created using the
proper encoding, else performance is going to be slow:

https://github.com/puppetlabs/puppetdb/blob/3.2.3/src/puppetlabs/puppetdb/scf/migrate.clj#L1492-L1507

ken.

On Wed, Feb 24, 2016 at 11:37 AM, Fabrice Bacchella
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/DA3BD2D6-15C0-4132-B42A-A44A66E1E9C8%40orange.fr.
Reply all
Reply to author
Forward
0 new messages