Hi,
I'm following this guide :
http://jurjenbokma.com/ApprenticesNotes/wp_configure_foreman.html
The puppetmaster is configured with storeconfigs and foreman has been given
the same database. So puppet has already created a number of tables. It
seems that db:migrate failes on that. What's disturbing is that the layout
of the table that foreman tries to created differs from the layout puppet
has created :
Foreman:
CREATE TABLE "reports" ("id" serial primary key, "host_id" integer NOT
NULL, "log" text, "reported_at" timestamp, "created_at" timestamp NOT NULL,
"updated_at" timestamp NOT NULL)
Puppetmaster:
Table "public.reports"
Column | Type | Modifiers
···
-----------------------+--------------------------+----------- hash | character varying(40) | not null certname | text | puppet_version | character varying(40) | not null report_format | smallint | not null configuration_version | character varying(255) | not null start_time | timestamp with time zone | not null end_time | timestamp with time zone | not null receive_time | timestamp with time zone | not nullAlso, after this, puppetdb will no longer start with following error :
2013-05-29 13:37:28,054 INFO [main] [cli.services] PuppetDB version 1.3.1
2013-05-29 13:37:28,241 ERROR [main] [puppetlabs.utils] Uncaught exception
java.lang.IllegalStateException: Your PuppetDB database contains a schema
migration numbered 20090714132448, but this version of PuppetDB does not
recognize that version.
at
com.puppetlabs.puppetdb.scf.migrate$migrate_BANG_.invoke(migrate.clj:362)
at
com.puppetlabs.puppetdb.cli.services$main$fn__10275.invoke(services.clj:396)
at
clojure.java.jdbc.internal$with_connection_STAR.invoke(internal.clj:186)
at
com.puppetlabs.puppetdb.cli.services$_main.doInvoke(services.clj:394)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:601)
at com.puppetlabs.puppetdb.core$_main.doInvoke(core.clj:79)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at com.puppetlabs.puppetdb.core.main(Unknown Source)
2013-05-29 13:37:28,265 INFO [Thread-4] [cli.services] Shutdown request
received; puppetdb exiting.
Anyone have an idea on how to fix this ?
Thanks in advance,
Peter.
–
IK GA ERVOOR
Een zorgjob. Da’s werken met je hoofd, handen en hart.
DISCLAIMER :
De personeelsleden van het agentschap doen hun best om in e-mails
betrouwbare informatie te geven. Toch kan niemand rechten doen gelden op
basis van deze inhoud. Als in de e-mail een stellingname voorkomt, is
dat niet noodzakelijk het standpunt van het agentschap. Rechtsgeldige
beslissingen of officiele standpunten worden alleen per brief toegestuurd.