Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgis support #280

Merged
merged 2 commits into from
Apr 2, 2014
Merged

postgis support #280

merged 2 commits into from
Apr 2, 2014

Conversation

kitchen
Copy link
Contributor

@kitchen kitchen commented Oct 17, 2013

there's still a decent amount of work to be done on this:

  1. the package naming and such for OSes other than ubuntu needs to be checked. I only run ubuntu so I haven't checked it against other things. I'm willing to do this, but I will need more time to do it as I need to grab vagrant boxes and whatnot.
  2. the tests don't currently cover what happens when you specify the postgis version. I've tested it locally and it does what I expect, but not in any automated fashion, especially because ubuntu only supplies one version of postgis, and using manage_package_repo is currently broken as reported in manage_package_repo param causes pain #276

If someone wants to help me finish this for other OSes that would be great, or just let me know if I should do that and add some more commits or what.

Thanks!

@kbarber-jenkins-bot
Copy link

Can one of the admins verify this patch?

@kbarber
Copy link
Contributor

kbarber commented Oct 23, 2013

test this please

@kbarber-jenkins2
Copy link

Test FAILed.
Refer to this link for build results: http://box.bob.sh:8080/job/puppetlabs-postgresql/363/

@kbarber
Copy link
Contributor

kbarber commented Oct 23, 2013

retest this please

@kbarber-jenkins2
Copy link

Test FAILed.
Refer to this link for build results: http://box.bob.sh:8080/job/puppetlabs-postgresql/364/

@kbarber
Copy link
Contributor

kbarber commented Oct 23, 2013

@kitchen ^^ looks like a valid enough failure.

@kitchen
Copy link
Contributor Author

kitchen commented Oct 24, 2013

I didn't add and sort of testing for postfix anyways, I'll have a look at it.

-Jeremy

Insert PGP signature here.

On Oct 23, 2013, at 5:49 AM, Ken Barber notifications@github.com wrote:

@kitchen ^^ looks like a valid enough failure.


Reply to this email directly or view it on GitHub.

@kitchen
Copy link
Contributor Author

kitchen commented Oct 24, 2013

Looks like it's just that there aren't package names and versions and such for postgis for non-ubuntu. I kinda expected that, actually :)

I'll try setting up some vagrant boxes and get these figured out soon!

@kbarber
Copy link
Contributor

kbarber commented Oct 24, 2013

For your ref:

http://pkgs.org/search/?keyword=postgis

You're going to need to be careful here actually. The problem I foresee is that the version of PostgreSQL may not entirely relate to the version of Postgis ... at least my gut tells me there is going to be problems with this part of the code :-). Anyway use that link ^^ as a ref for what the distros use.

My other wonder - does upstream package postgis? (ie. apt|yum.postgresql.org) ... if that is the case manage_package_repo may create a different effect. Something to be careful about - and probably worth testing.

@kitchen
Copy link
Contributor Author

kitchen commented Oct 24, 2013

yea, I actually already have support for that in the module, there's a separate postgis_version. pg 8.4 and 9.0 only have postgis 2.0, 9.1 and 9.2 both have 2.0 and 2.1, 9.3 only has 2.1. So I set the default based on that. Ubuntu, at least, does provide postgis in its own repos and the package naming pattern is the same? I dunno, pretty sure I handled that in the module :)

I'll poke around at it this weekend probably and get support for all the other OSes the module supports, or at least as much as I can!

@ekohl
Copy link
Collaborator

ekohl commented Oct 30, 2013

Upstream provides yum repositories apt repositories. On EL the package name is postgis_PGVERSION (version 1) or postgis2_PGVERSION (version 2) where PGVERSION is the postgresql version without a dot. So postgis2_93 for 9.3 or postgis2_91 for 9.1. Postgis is not in EL6 base.

@kitchen
Copy link
Contributor Author

kitchen commented Jan 27, 2014

this should be ready to roll now!

@igalic
Copy link
Contributor

igalic commented Jan 28, 2014

I would squash down a couple of those commits for a cleaner history.

@mcanevet
Copy link
Contributor

@kitchen could you please squash down the commits to move on this PR ?

@kitchen
Copy link
Contributor Author

kitchen commented Jan 29, 2014

squashed!

@mcanevet
Copy link
Contributor

mcanevet commented Feb 9, 2014

@igalic what prevent this PR to be merged ?

@igalic
Copy link
Contributor

igalic commented Feb 10, 2014

@mcanevet someone to press the merge button, I presume.

@mcanevet
Copy link
Contributor

@igalic ok I didn't know you don't have the rights to do it.
@kbarber could you review this please ?

@igalic
Copy link
Contributor

igalic commented Feb 10, 2014

I think it's been reviewed and commented on and fixed and everything, it's essentially ready for merge, except, it needs a rebase:

% git add upstream git@github.com/puppetlabs:puppetlabs-postgresql
% git remote update
% git rebase upstreamm/master

@mcanevet
Copy link
Contributor

@kitchen could you please rebase ?

@mcanevet
Copy link
Contributor

@kitchen do you want me to take over the development of this feature and submit my own PR ?

@kitchen
Copy link
Contributor Author

kitchen commented Mar 21, 2014

Oh, I thought it was good to go a while back. What's lacking?

-Jeremy

Insert PGP signature here.

On Mar 21, 2014, at 7:06 AM, Mickaël Canévet notifications@github.com wrote:

@kitchen do you want me to take over the development of this feature and submit my own PR ?


Reply to this email directly or view it on GitHub.

@igalic
Copy link
Contributor

igalic commented Mar 21, 2014

@kitchen a rebase, for one.

@kitchen
Copy link
Contributor Author

kitchen commented Mar 21, 2014

oops, I didn't see @mcanevet's request to rebase. I'll do that here in a bit, sorry!

@kitchen
Copy link
Contributor Author

kitchen commented Mar 22, 2014

rebased!

@igalic
Copy link
Contributor

igalic commented Mar 24, 2014

\o/

@apenney merge plz ;)

@apenney
Copy link

apenney commented Mar 27, 2014

I would love to merge this but we just have one thing to do - convert the spec/system to spec/acceptance test. If you can do that (it's very similar, just a few changes to using apply_manifest() instead, I can merge this.

@kitchen
Copy link
Contributor Author

kitchen commented Mar 31, 2014

done, thanks @saimonn

@igalic
Copy link
Contributor

igalic commented Mar 31, 2014

@kitchen can you please rebase that again?

kitchen and others added 2 commits March 31, 2014 21:40
rhel support added by @mcanevet, but the branch has been squashed.
thanks!
@kitchen
Copy link
Contributor Author

kitchen commented Mar 31, 2014

done

@mcanevet
Copy link
Contributor

mcanevet commented Apr 1, 2014

@apenney can you merge it now please ?

@igalic
Copy link
Contributor

igalic commented Apr 2, 2014

we need an @apenney clone.

apenney pushed a commit that referenced this pull request Apr 2, 2014
@apenney apenney merged commit 0adbcfb into puppetlabs:master Apr 2, 2014
@apenney
Copy link

apenney commented Apr 2, 2014

robo-apenney saves the day.

@kitchen
Copy link
Contributor Author

kitchen commented Apr 2, 2014

yay! thanks!

@thunderkeys
Copy link
Contributor

After this patch was merged into master, the beaker tests now fail for me .. is this happening for anyone else?

gemedet:~ bma$ cat pre-postgis-test.txt
removing temporory ssh-config files per-vagrant box
Destroying vagrant boxes
==> centos-64-x64: Forcing shutdown of VM...
==> centos-64-x64: Destroying VM and associated drives...

Finished in 34 minutes 48 seconds
41 examples, 0 failures
gemedet:~ bma$ cat post-postgis-test.txt
Destroying vagrant boxes
==> centos-64-x64: Forcing shutdown of VM...
==> centos-64-x64: Destroying VM and associated drives...

Failures:

  1. postgresql::server::postgis: test loading class with no parameters
    Failure/Error: apply_manifest(pp, :catch_failures => true)
    Beaker::Host::CommandFailure:
    Host 'centos-64-x64' exited with 6 running:
    env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.n3wELP
    Last 10 lines of output were:
    Error: /Stage[main]/Postgresql::Server::Service/Postgresql::Validate_db_connection[validate_service_is_running]/Exec[validate postgres connection for /postgres]: Failed to call refresh: echo 'Unable to connect to defined database using: /usr/bin/psql --tuples-only --quiet --dbname postgres ' && false returned 1 instead of one of [0]
    Error: /Stage[main]/Postgresql::Server::Service/Postgresql::Validate_db_connection[validate_service_is_running]/Exec[validate postgres connection for /postgres]: echo 'Unable to connect to defined database using: /usr/bin/psql --tuples-only --quiet --dbname postgres ' && false returned 1 instead of one of [0]
    Notice: /Stage[main]/Postgresql::Server::Service/Anchor[postgresql::server::service::end]: Dependency Package[postgresql-postgis] has failures: true
    Warning: /Stage[main]/Postgresql::Server::Service/Anchor[postgresql::server::service::end]: Skipping because of failed dependencies
    Notice: /Stage[main]/Postgresql::Server::Service/Anchor[postgresql::server::service::end]: Triggered 'refresh' from 1 events
    Notice: /Stage[main]/Postgresql::Server::Postgis/Anchor[postgresql::server::postgis::end]: Dependency Package[postgresql-postgis] has failures: true
    Warning: /Stage[main]/Postgresql::Server::Postgis/Anchor[postgresql::server::postgis::end]: Skipping because of failed dependencies
    Notice: /Stage[main]/Postgresql::Server/Anchor[postgresql::server::end]: Dependency Package[postgresql-postgis] has failures: true
    Warning: /Stage[main]/Postgresql::Server/Anchor[postgresql::server::end]: Skipping because of failed dependencies
    Notice: Finished catalog run in 108.99 seconds

    ./spec/acceptance/postgis_spec.rb:25:in `block (2 levels) in <top (required)>'

Finished in 31 minutes 44 seconds
42 examples, 1 failure

Failed examples:

rspec ./spec/acceptance/postgis_spec.rb:19 # postgresql::server::postgis: test loading class with no parameters

@igalic
Copy link
Contributor

igalic commented Apr 4, 2014

I'm getting two failures,

Destroying vagrant boxes
[centos-64-x64] Forcing shutdown of VM...                                                                                                                                                         
[centos-64-x64] Destroying VM and associated drives...                                                                                                                                            

Failures:

  1) postgresql::server::postgis: test loading class with no parameters
     Failure/Error: apply_manifest(pp, :catch_failures => true)
     Beaker::Host::CommandFailure:
       Host 'centos-64-x64' exited with 6 running:
        env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" puppet apply  --verbose --detailed-exitcodes /tmp/apply_manifest.pp.KqjN22
       Last 10 lines of output were:
        Error: /Stage[main]/Postgresql::Server::Service/Postgresql::Validate_db_connection[validate_service_is_running]/Exec[validate postgres connection for /postgres]: Failed to call refresh: echo 'Unable to connect to defined database using: /usr/bin/psql --tuples-only --quiet --dbname postgres ' && false returned 1 instead of one of [0]
        Error: /Stage[main]/Postgresql::Server::Service/Postgresql::Validate_db_connection[validate_service_is_running]/Exec[validate postgres connection for /postgres]: echo 'Unable to connect to defined database using: /usr/bin/psql --tuples-only --quiet --dbname postgres ' && false returned 1 instead of one of [0]
        Notice: /Stage[main]/Postgresql::Server::Service/Anchor[postgresql::server::service::end]: Dependency Package[postgresql-postgis] has failures: true
        Warning: /Stage[main]/Postgresql::Server::Service/Anchor[postgresql::server::service::end]: Skipping because of failed dependencies
        Notice: /Stage[main]/Postgresql::Server::Service/Anchor[postgresql::server::service::end]: Triggered 'refresh' from 1 events
        Notice: /Stage[main]/Postgresql::Server::Postgis/Anchor[postgresql::server::postgis::end]: Dependency Package[postgresql-postgis] has failures: true
        Warning: /Stage[main]/Postgresql::Server::Postgis/Anchor[postgresql::server::postgis::end]: Skipping because of failed dependencies
        Notice: /Stage[main]/Postgresql::Server/Anchor[postgresql::server::end]: Dependency Package[postgresql-postgis] has failures: true
        Warning: /Stage[main]/Postgresql::Server/Anchor[postgresql::server::end]: Skipping because of failed dependencies
        Notice: Finished catalog run in 76.98 seconds
     # ./spec/acceptance/postgis_spec.rb:25:in `block (2 levels) in <top (required)>'

  2) postgresql::server::config_entry: should correctly set a quotes-required string
     Failure/Error: apply_manifest(pp, :catch_failures => true)
     Beaker::Host::CommandFailure:
       Host 'centos-64-x64' exited with 1 running:
        env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" puppet apply  --verbose --detailed-exitcodes /tmp/apply_manifest.pp.iXNr7T
       Last 10 lines of output were:
        Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
        Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
        Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
        Info: Loading facts in /etc/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb
        Info: Loading facts in /etc/puppet/modules/firewall/lib/facter/ip6tables_version.rb
        Info: Loading facts in /etc/puppet/modules/firewall/lib/facter/iptables_version.rb
        Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
        Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
        Error: Duplicate declaration: Postgresql::Server::Config_entry[listen_addresses] is already declared in file /etc/puppet/modules/postgresql/manifests/server/config.pp:99; cannot redeclare at /tmp/apply_manifest.pp.iXNr7T:5 on node centos-64-x64.chello.at
        Error: Duplicate declaration: Postgresql::Server::Config_entry[listen_addresses] is already declared in file /etc/puppet/modules/postgresql/manifests/server/config.pp:99; cannot redeclare at /tmp/apply_manifest.pp.iXNr7T:5 on node centos-64-x64.chello.at
     # ./spec/acceptance/server/config_entry_spec.rb:36:in `block (2 levels) in <top (required)>'

Finished in 64 minutes 12 seconds
43 examples, 2 failures

Failed examples:

rspec ./spec/acceptance/postgis_spec.rb:19 # postgresql::server::postgis: test loading class with no parameters
rspec ./spec/acceptance/server/config_entry_spec.rb:27 # postgresql::server::config_entry: should correctly set a quotes-required string

cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants