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

Consul - Error: Invalid parameter temp_dir(:temp_dir) #317

Closed
rroque80 opened this issue Feb 10, 2017 · 12 comments
Closed

Consul - Error: Invalid parameter temp_dir(:temp_dir) #317

rroque80 opened this issue Feb 10, 2017 · 12 comments

Comments

@rroque80
Copy link

Hello,
I am getting the below error message when trying to install the consul module (KyleAnderson-consul (v2.1.0) on a node:
"Error: Invalid parameter temp_dir(:temp_dir)"
"Error: /Stage[main]/Consul::Install/Archive[/opt/consul/archives/consul-0.7.0.zip]/ensure: change from absent to present failed: Invalid parameter temp_dir(:temp_dir)".

Both master and node is running puppet 4.8.0 and on CentOS7. The site.pp file has:
node 'consul' {
class { 'consul':
config_hash => {
'bootstrap_expect' => 1,
'data_dir' => '/opt/consul',
# 'archive_path' => '/opt/consul/archives/',
'log_level' => 'INFO',
'node_name' => 'consul',
'server' => true,
}
}
}
Defining archive_path didn't help. Also, I could not find the temp_dir in the source. Is there anything else to check?

@v6
Copy link

v6 commented Feb 10, 2017

// , I'm getting the same error, in Puppet 4.8. There is no temp_dir in the code, that I can see.

The closest thing I can find related to this is the archive_path in params.pp.

The temp_dir seems pretty specific... maybe I need to create a temp_dir fact?

@rroque80, may we see the output of uname -a on both the CEntOS 7 machines?

It looks like we're both including at least the variables in the class declaration in the node definition recommended by https://github.com/solarkennedy/puppet-consul/blob/master/README.md#usage

My question, at this point, is whether it's an error related to Consul, this module, or to Puppet in general?

@v6
Copy link

v6 commented Feb 10, 2017

// , (and how can I tell?)

@mmickan
Copy link

mmickan commented Feb 10, 2017

The error you're seeing is coming from the puppet/archive module (which this module uses). Looks like the temp_dir parameter was added to puppet/archive in v1.2.0 - what version of that module are you using? I can confirm that I'm not hitting this error, on CentOS 7, using puppet/archive v1.2.0.

@v6
Copy link

v6 commented Feb 10, 2017

// , @mmickan, is this the module you refer to:

https://forge.puppet.com/puppet/archive

@v6
Copy link

v6 commented Feb 10, 2017

// , I get the following in the output of $ sudo puppet module list:

$ sudo puppet module list
Warning: Missing dependency 'puppet-archive':
  'jsok-vault' (v1.1.3) requires 'puppet-archive' (>= 1.1.2 < 2.0.0)

I'll try installing it and see if that fixes the problem.

@rroque80
Copy link
Author

Output of uname -a:

  • puppetmaster: Linux puppet 3.10.0-229.el7.x86_64 Debian support #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
  • node: Linux consul 3.10.0-229.el7.x86_64 Debian support #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

The version of puppet/archive is v1.2.0.

Thank you for pointing me towards the puppet/archive module. I was able to get past that temp_dir issue by having to define temp_dir in the /etc/puppetlabs/code/environments/production/modules/archive/manifests/go.pp file, putting "$temp_dir = /tmp/," in the "define archive::go" section and "temp_dir => $temp_dir," in the "archive { $file_path:" section.

@v6
Copy link

v6 commented Feb 11, 2017

// , Is there any way around the puppet-archive dependency?

The puppet-archive module looks problematic for CEntOS 6:

voxpupuli/puppet-archive@48df20b#diff-4ac32a78649ca5bdd8e0ba38b7006a1eR6

CEntOS 6 ONLY has Ruby 1.8.7:
https://serverfault.com/questions/815398/r10k-on-centos-6-7-has-anyone-achieved-this-feat#comment1037158_815398

I ask, because it looks like the puppet-archive's archive resource only gets used at the following two places:

https://github.com/solarkennedy/puppet-consul/blob/605f5a705187f5783df20a67d0eb70b978a3ae09/manifests/install.pp#L36

https://github.com/solarkennedy/puppet-consul/blob/605f5a705187f5783df20a67d0eb70b978a3ae09/manifests/install.pp#L68

For example, could we use https://github.com/camptocamp/puppet-archive, which has not yet, apparently, dropped support for Ruby 1.8.7/CEntOS 6?

@EvanKrall
Copy link
Contributor

You can avoid the puppet-archive dependency if you use install_method => package or install_method => none.

It looks like the camptocamp version of archive takes different parameters than the voxpopuli version does (e.g. it takes $url instead of $source, doesn't take $extract or $extract_path, etc.), so it's unlikely to work as a drop-in replacement.

@v6
Copy link

v6 commented Feb 13, 2017

// , Looks like we have pretty slim pickings for premade CEntOS 6 RPMs for either Consul or Vault:

hashicorp/consul#61

https://duckduckgo.com/?q=hashicorp+consul

hashicorp/vault#589

https://duckduckgo.com/?q=hashicorp+vault+rpm

Given my recent experience within my current work environment, I entirely agree with @sethvargo that there are better things to work on than accommodating the BROKEN packaging systems of most Linux systems.

As it is currently mandatory that most of our current internal packaging systems are manual (D:), I think I shall have to go with the install_method => none option. This means I shall have to add the installation process to a separate install_consul module that runs before the consul module, depends on the consul module, or something.

@v6
Copy link

v6 commented Feb 13, 2017

// , By the way, this little incompatibility implicitly drops support for Puppet 3.6 on CEntOS 6 servers, which puppet-archive does not support.

@solarkennedy
Copy link
Contributor

Sorry, we don't support ancient versions of ruby.

I recommend upgrading past puppet 3 as it is EOL
https://groups.google.com/forum/#!msg/puppet-users/IdutL5FTW7w/oLgkO9rbAAAJ

And newer versions of puppet come with their own ruby.

@v6
Copy link

v6 commented Feb 23, 2017

// , Understood. I wouldn't support it if I was you, either.

@EvanKrall, it looks like your suggestion worked, by the way.

v6 referenced this issue in camptocamp/puppet-archive Feb 28, 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

No branches or pull requests

5 participants