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

Corrections #27

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Corrections #27

wants to merge 5 commits into from

Conversation

cjeanneret
Copy link

I ran the following in order to ensure I didn't break any unit-test:

bundle install
bundle exec rake spec

Result was fine, thus if unit-tests are complete, it shouldn't break anything. I was using rvm with ruby 2.1.5 installed.

Effects for those modification:

  • run without any error for a "normal" installation
  • main functionalities are working otb after first puppet run
  • a better order for resources inside the module

@raoulbhatia
Copy link
Contributor

Thanks for updating your pull request.

I did not manage to take an in-depth look at your pull request, however

  • Please also consider support for squeeze as there is a squeeze LTS effort
  • Please also consider the Ubuntu flavors, at least the supported 10.04 LTS, 12.04 LTS, 14.04 LTS and 14.10 releases

Maybe some kind of case statement, e.g. (pseudo code)

$install_lense = false
case $::lsbdistcodename {
squeeze|squeeze-lts|wheezy: $install_lense= true;
trusty|precise|utopic|...: $install_lense = true;
default:
$install_lense = false;
}

if $install_lense == true {
 .... install ...
}

Also, the traivs ci build should pass :)

Thanks!
Raoul

@cjeanneret
Copy link
Author

oh gosh, didn't see you're still with the deprecated puppet-2.7… will rvm-ize it in order to get something more likely to fail.

@cjeanneret
Copy link
Author

weird, unable to reproduce the error… how may I test it?

@mjhas
Copy link
Owner

mjhas commented Nov 25, 2014

can you rebase your pull request. Travis CI build should work again now.

@cjeanneret
Copy link
Author

hmm, what's the "ensure_packages"? doesn't seem to be documented in puppetlabs reference, and it doesn't look like the module depends on other external module. As I get a conflict on init.pp, I don't want to break anything…

Cédric Jeanneret added 5 commits November 26, 2014 07:05
After several tests, it seems there are many problems with dependencies,
especially when we're wanting to get the whole stuff set in one row.

The "exec dovecot" resource wasn't of any use, really. In additions,
some files were to be created *before* the package is installed, and
this made puppet crash with "no such file or directory" error.

The modifications allow to get a smooth, one-shot installation, with the
whole dependencies in the right order:
- packages
- then configurations
- then service
@cjeanneret
Copy link
Author

Unable to reproduce Travis failure… Here's how I test:

$ rvm use --create [email protected]
$ gem install --version "~> 2.7.0" puppet
$ bundle exec rake spec

Output:

Checking connectivity... done.
/home/cjeanneret/.rvm/rubies/ruby-1.8.7-p374/bin/ruby -S rspec spec/classes/dovecot_postgres_spec.rb spec/classes/dovecot_spec.rb spec/defines/dovecotcfmulti_spec.rb spec/defines/dovecotcfsingle_spec.rb --color
module_path:/home/cjeanneret/puppets/puppet-dovecot/spec/fixtures/modules
manifest_dir:/home/cjeanneret/puppets/puppet-dovecot/spec/fixtures/manifests
augeas_fixtures:/home/cjeanneret/puppets/puppet-dovecot/spec/fixtures/augeas
...........

Finished in 3.61 seconds
11 examples, 0 failures

I'm a bit annoyed right now, if I cannot reproduce Travis failures, I don't know how to fix them :(.

@mjhas
Copy link
Owner

mjhas commented Nov 26, 2014

you should be able to execute everything if you just call

./travis_build.sh $PATH

I am also not sure if the updated lenses (.aug files) work on the older distros. Noting that travis-ci use a really old version of ubuntu (older than wheezy probably)

@cjeanneret
Copy link
Author

dovecot::postgres
  should contain Package[dovecot-pgsql]
  should contain Package[dovecot-pgsql]
  should contain File[/etc/dovecot/dovecot-sql.conf.ext] with content matching /^connect = host=localhost dbname=name user=username password=password$/

dovecot
  should contain Package[dovecot-imapd]
  should contain Service[dovecot]

dovecot::config::dovecotcfmulti
  should have an augeas resource
  Augeas[dovecot /etc/dovecot/dovecot.conf multi]
    foo should exist with value foo and bar should not exist

dovecot::config::dovecotcfsingle
  should have an augeas resource
  Augeas[dovecot /etc/dovecot/dovecot.conf foo]
    foo should exist with value foo

dovecot::config::dovecotcfsingle
  should have an augeas resource
  Augeas[dovecot /etc/dovecot/dovecot.conf bar]
    bar should not exist with value foo

Finished in 3.91 seconds
11 examples, 0 failures

But as I'm on Debian Sid… -.- I think I'll let this PR down and use my own fork… the current version I propose runs on Jessie for sure. Which is my goal.

gildegoma added a commit to gildegoma/fogmail that referenced this pull request Dec 1, 2014
1) Fetch EthACKdotOrg/dovecot for via HTTPS to avoid authenticity errors
with some github.com ip addresses:

```
Cloning into 'puppet/modules/dovecot'...
The authenticity of host 'github.com (192.30.252.128)' can't be
established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? ^C
fogmail (master)$ Clone of '[email protected]:EthACKdotOrg/dovecot.git'
into submodule path 'puppet/modules/dovecot' failed
```

2) Fix referred commit for EthACKdotOrg/dovecot (previous commit was
probably squashed when feature branch was rebased for
mjhas/dovecot#27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants