blt04 / puppet-rvm

A puppet module for installing and using RVM (Ruby Version Manager)
Other
242 stars 280 forks source link

add a workaround for duplicate class definitions #42

Closed kronn closed 12 years ago

kronn commented 12 years ago

As the automatic dependency resolution did not work properly, I needed to include the pre- and post-dependencies into my manifests.

The resulting "duplicate definition" error needs a safeguard, which I added.

I don't know how to solve the underlying issue of the broken dependency resolution.

I use puppet 2.7.1 and cucumber-puppet 0.3.8. The failure occured in my tests...

blt04 commented 12 years ago

Interesting. Could you post the relavent portions of your manifest files? I haven't seen this problem before. I'd much rather address the underlying problems with dependency resolution.

kronn commented 12 years ago

I can try to make a minimal example with this issue.

I remember warnings about require being not supported in older clients (which I ignored, because all agents and the master are puppet 2.7.1). this warning included something about loading the code but not adding a dependency. In an earlier commit of puppet-rvm, everything worked fine. After updating (because rvm changed it's installation method) the passenger-dependencies were not installed.

the manifests I have are very layered:

the node which has/should have the webserver installed, has class { 'actual_app::webserver': ... }

the actual_app/webserver.pp calls class { 'rails::webserver': ...}

rails/webserver.pp contains class { 'rvm::passenger::apache': ... }

All machines involved are running Ubuntu 11.10 (which also explains the version of puppet I use).

kronn commented 12 years ago

One more interesting thing: While running the cucumber test, I get the following warning:

warning: Scope(Class[Rvm::Dependencies]): 
The 'require' function is only compatible with clients at 0.25 and above; 
including class but not adding dependency

according to the docs, the dependecy should be added in puppet 2.7.1 (which I use).

Any idea how to tackle this one?

kronn commented 12 years ago

I am closing this one and reopen one with only this commit.

Bad me for not using topic-branches in the first place.