Git Product home page Git Product logo

hiera-psql's People

Contributors

arioch avatar dalen avatar mcourtois avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hiera-psql's Issues

Documentation no longer applies to this version

Thanks for writing this backend. I ran into some difficulty getting it to work and found the following got me in business:

  1. The instructions state incorrectly state that you should create your table using 'config' when the code is expecting 'data' in addition to providing the wrong columns and types when creating the table.
  2. The table structure shown isn't valid any longer now that you are expecting json in the value column. I found the correct table structure here: https://github.com/tioteath/hiera-psql
  3. It might be helpful to provide an example of an input statement too:
    insert into data values ('fqdn/foo.example.com','{"somevariable":"variablevalue"}');

no longer functions with puppetserver

This backend needs to be updated to use something similar to pg_jruby. I did some testing myself and was unable to get it functioning properly. This update is necessary for the hiera backend to function outside command line calls.

connection pool management issue

Hi,
we are using hiera-psql-0.1.0. we observed that puppet is not releasing connections from postgres DB, which is eventually causing postgrsql to reach max connections.

Thanks,
Saleem

Latest code does not seem to work on Puppet Enterprise 3.1

Hi Dalen,

We use your excellent hiera-psql module for our cloud project, it works perfectly with PE 3.0. Yesterday I upgraded to 3.1, and it looks like something went wrong, it does not work any more. Here is the issue.

Database:

hiera=> select * from config;
path | key | value
---------------------+---------+-----------------------------
dev/agent02 | testvar | "Test string from Postgres"
(1 row)

Test puppet code:

class test {
$testVariable = hiera('testvar',undef)
notify { "$testVariable": }
}

Command line hiera test on master:

[root@master manifests]# hiera testvar environment=dev fqdn=agent02
Test string from Postgres

Puppet run fails on agent:

[root@agent02 ~]# puppet agent -t
Info: Retrieving plugin
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/postgres_default_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/windows.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppetdb_server_status.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 757: unexpected token at '"Test string from Postgres"' at /etc/puppetlabs/puppet/environments/dev/modules/test/manifests/init.pp:2 on node agent02
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

If I put the Hiera property into a YAML file on the master it works:

[root@master dev]# hiera testvar environment=dev fqdn=agent02
Test string from YAML

[root@agent02 ~]# puppet agent -t
Info: Retrieving plugin
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/postgres_default_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/windows.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppetdb_server_status.rb
Info: Caching catalog for agent02
Info: Applying configuration version '1385726108'
Notice: Test string from YAML
Notice: /Stage[main]/Test/Notify[Test string from YAML]/message: defined 'message' as 'Test string from YAML'
Notice: Finished catalog run in 8.46 seconds

Could you please have a look on that?

Cheers,

Chris

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.