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

nginx::params is deprecated as a public API #240

Closed
svengerlach opened this issue Jan 20, 2014 · 15 comments · Fixed by #283
Closed

nginx::params is deprecated as a public API #240

svengerlach opened this issue Jan 20, 2014 · 15 comments · Fixed by #283

Comments

@svengerlach
Copy link

Hi,

right now, I'm receiving the following warning:

Warning: Scope(Class[Nginx::Params]): nginx::params is deprecated as a public API of the nginx module and should no longer be directly included in the manifest.

I tested it with the following puppet versions:

  • 3.2.2
  • 3.4.2

I don't call nginx::params directly in my manifest. The only thing directly relating to the nginx module is the following:

class { 'nginx': }

The rest of my configuration is within hiera.

Any thoughts?

@thomaswelton
Copy link

Same here

@jfryman
Copy link
Contributor

jfryman commented Jan 23, 2014

@thomaswelton is your configuration within hiera as well?

@jfryman
Copy link
Contributor

jfryman commented Jan 23, 2014

@svengerlach that is bizarre. I'm going to see if I can reproduce this tomorrow and fix it up. What OS are you running?

@thomaswelton
Copy link

No right now I'm just using puppet to install nginx. All I have in my manifest is class { 'nginx': }
I don't have a hiera config file

@svengerlach
Copy link
Author

@jfryman I'm running Ubuntu 12.04

@hdanes
Copy link
Contributor

hdanes commented Jan 25, 2014

The issue is also reproducible on:

CentOS release 6.5 (Final) / puppet --version 3.4.2

The warning is fired in Params.pp

$caller_module_name => The name of your own module where nginx is included
$module_name => 'nginx'

Maybe this issue is caused by inheritance?

class nginx (
$worker_processes = $nginx::params::nx_worker_processes,
...
) inherits nginx::params {

@gitnik
Copy link

gitnik commented Feb 6, 2014

same error on ubuntu 13.10, puppet 3.2.4 and no hiera config file

@createdbypete
Copy link
Contributor

I've just submitted #252 to fix this.

@ymph
Copy link

ymph commented Feb 27, 2014

Hello,

Same error in Debian wheezy 7.4 + puppet 3.4.3.
The correction #252 from @createdbypete does not change anything.

Like @svengerlach I only make reference to

class { 'nginx': }

The call is inside a class module, therefore I guess the $caller_module_name is defined and the #252 change have no effect for me.

Am I doing it wrong ?

grooverdan pushed a commit to openquery/puppet-nginx that referenced this issue Mar 4, 2014
@knightsg
Copy link

I'm also having this issue, even with patch #252 in place as @ymph reported. This is on Ubuntu 12.04.2 with Puppet v3.4.3 and the latest copy of the module.

@drewr
Copy link

drewr commented Mar 26, 2014

I'm running into this as well. My scenario is like @hdanes describes. site.pp has class { "foo": }, and foo/init.pp has class { "nginx": ... }. Here $callar_module_name is foo and $module_name is nginx, which triggers the warning.

This seems like a sensible way to abstract nginx away. What's the original motivation for the warning? To prevent people from referring to nginx::params directly?

@createdbypete
Copy link
Contributor

@drewr I think the original intent was sound but unfortunately it seems to confuse people more than anything else. Perhaps this check should be removed completely in the next version @jfryman ?

@CpuID
Copy link

CpuID commented Mar 27, 2014

+1 definitely agree with @createdbypete on that.

@jfryman
Copy link
Contributor

jfryman commented Mar 27, 2014

I agree. The intent is good, but It's the item I've received the most feedback on (in and out-of-band). Since the refactor I planned keeps getting pushed to the backburner, I removed it and pushed v0.0.9 to the Forge. I'll revisit it down the road.

Thanks for the feedback, everyone.

@createdbypete
Copy link
Contributor

Thanks for all the hard work @jfryman it's appreciated.

cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this issue Oct 23, 2017
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 a pull request may close this issue.

10 participants