Issue #9702 has been reported by Marco La Rosa.
----------------------------------------
Bug #9702: Issue with inventory PGError: ERROR: column "id" does not exist
https://projects.puppetlabs.com/issues/9702
Author: Marco La Rosa
Status: Unreviewed
Priority: Normal
Assignee:
Category:
Target version: 2.7.x
Affected Puppet version: 2.7.1
Keywords:
Branch:
Hi,
I'm having an issue geting inventory going on my puppetmaster.
The master works happily with storeconfigs (Squeeze, 2.7.1-1~bpo60+1) until I
enable "facts_terminus = inventory_active_record". Then I start seeing errors
on the client (same OS and version of puppet) like:
<pre>
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
PGError: ERROR: column "id" does not exist
LINE 1: ...', '2011-09-27 16:29:27.948893', 2, E'Bochs') RETURNING "id"
^
: INSERT INTO "inventory_facts" ("name", "created_at", "node_id", "value")
VALUES(E'productname', '2011-09-27 16:29:27.948893', 2, E'Bochs') RETURNING "id"
</pre>
The db (Squeeze, postgres 9.0 - from backports) table looks like:
<pre>
puppet=# \d+ inventory_facts;
Table "public.inventory_facts"
Column | Type | Modifiers | Storage | Description
------------+-----------------------------+-----------+----------+-------------
node_id | integer | not null | plain |
name | character varying(255) | not null | extended |
value | text | not null | extended |
created_at | timestamp without time zone | | plain |
Indexes:
"index_inventory_facts_on_node_id_and_name" UNIQUE, btree (node_id, name)
Has OIDs: no
</pre>
And the schema which I think defines all this (certainly the only one on the
server that fits) /usr/lib/ruby/1.8/puppet/rails/database/schema.rb has:
<pre>
create_table :inventory_facts, :id => false do |t|
t.column :node_id, :integer, :null => false
t.column :name, :string, :null => false
t.column :value, :text, :null => false
end
add_index :inventory_facts, [:node_id, :name], :unique => true
</pre>
So assuming the schema file is correct (matches the schema file at
https://github.com/lak/puppet/blob/master/lib/puppet/rails/database/schema.rb),
is this a bug in the client code? Should it be "RETURNING "node_id"
Thanks,
Marco
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.