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

dhparam generation fails #58

Closed
zloykaban opened this issue Mar 3, 2016 · 4 comments
Closed

dhparam generation fails #58

zloykaban opened this issue Mar 3, 2016 · 4 comments

Comments

@zloykaban
Copy link

How to reproduce:

  1. setup clear ubuntu 14.04 (for me docker was good enough)
  2. setup puppet, default version in 14.04 is 3.4.3, but seems this error can be reproduced on any puppet version
    apt-get install puppet
  3. install module
    puppet module install camptocamp-openssl
  4. run puppet apply
    puppet apply -e "dhparam { '/tmp/dhparam.pem': ensure => present, size => 2048 }" --modulepath=/etc/puppet/modules --verbose
  5. receive following message:
    Error: Parameter size failed on Dhparam[/tmp/dhparam.pem]: comparison of String with 0 failed at line 1 Wrapped exception: comparison of String with 0 failed
@bandwith
Copy link
Contributor

I've been attempting to write a spec to fail this... #64

For me, I'm running:
4.5.0-x86_64-linode65
debian 8.3
puppet 3.8.1
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]

@bandwith
Copy link
Contributor

root@debian:/tmp# puppet module install camptocamp-openssl
Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
(at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in issue_deprecation_warning') Notice: Preparing to install into /etc/puppet/modules ... Notice: Downloading from https://forgeapi.puppetlabs.com ... Notice: Installing -- do not interrupt ... /etc/puppet/modules └─┬ camptocamp-openssl (v1.7.0) └── puppetlabs-stdlib (v4.11.0) root@debian:/tmp# puppet apply -e "dhparam { '/tmp/dhparam.pem': ensure => present, size => 2048 }" --modulepath=/etc/puppet/modules --verbose Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:inissue_deprecation_warning')
Info: Loading facts
Info: Loading facts
Notice: Compiled catalog for host in environment production in 0.03 seconds
Error: Parameter size failed on Dhparam[/tmp/dhparam.pem]: comparison of String with 0 failed at line 1

@bandwith
Copy link
Contributor

found my problem...

root@host:# puppet module install camptocamp-openssl
Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
(at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in issue_deprecation_warning') Notice: Preparing to install into /etc/puppet/modules ... Notice: Downloading from https://forgeapi.puppetlabs.com ... Notice: Installing -- do not interrupt ... /etc/puppet/modules └─┬ camptocamp-openssl (v1.7.0) └── puppetlabs-stdlib (v4.11.0) root@host:~# puppet apply -e "dhparam { '/tmp/dhparam.pem': ensure => present, size => 2048, }" --modulepath=/etc/puppet/modules --verbose --debug --trace Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:inissue_deprecation_warning'; /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1126:in block in issue_deprecations'; /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1125:ineach'; /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1125:in issue_deprecations'; /usr/lib/ruby/vendor_ruby/puppet/settings.rb:347:ininitialize_app_defaults'; /usr/lib/ruby/vendor_ruby/puppet.rb:155:in do_initialize_settings_for_run_mode'; /usr/lib/ruby/vendor_ruby/puppet.rb:139:ininitialize_settings'; /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:87:in block in execute'; /usr/lib/ruby/vendor_ruby/puppet/util.rb:488:inexit_on_fail'; /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in execute'; /usr/bin/puppet:8:in

')
Debug: Runtime environment: puppet_version=3.8.1, ruby_version=2.1.5, run_mode=user, default_encoding=UTF-8
Debug: Loading external facts from /var/lib/puppet/facts.d
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/root_home.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/package_provider.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/service_provider.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/openssl/lib/facter/openssl_version.rb
Debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
Debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
Debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not exist
Debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info does not exist
Debug: Puppet::Type::Package::ProviderPkgin: file pkgin does not exist
Debug: Puppet::Type::Package::ProviderPorts: file /usr/local/sbin/portupgrade does not exist
Debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist
Debug: Puppet::Type::Package::ProviderYum: file yum does not exist
Debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
Debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox does not exist
Debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist
Debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
Debug: Puppet::Type::Package::ProviderPortupgrade: file /usr/local/sbin/portupgrade does not exist
Debug: Puppet::Type::Package::ProviderSun: file /usr/bin/pkginfo does not exist
Debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does not exist
Debug: Puppet::Type::Package::ProviderPacman: file /usr/bin/pacman does not exist
Debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does not exist
Debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not exist
Debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
Debug: Puppet::Type::Package::ProviderAptrpm: file rpm does not exist
Debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does not exist
Debug: Puppet::Type::Package::ProviderOpkg: file opkg does not exist
Debug: /Package[dummy]: Provider apt does not support features virtual_packages; not managing attribute allow_virtual
Debug: Puppet::Type::Service::ProviderUpstart: 0 confines (of 2) were true
Debug: Puppet::Type::Service::ProviderRedhat: file /sbin/chkconfig does not exist
Debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not exist
Debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist
Debug: Puppet::Type::Service::ProviderOpenrc: file /bin/rc-status does not exist
Debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not exist
Debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not exist
Notice: Compiled catalog for host in environment production in 0.03 seconds
Error: Parameter size failed on Dhparam[/tmp/dhparam.pem]: comparison of String with 0 failed at line 1
/etc/puppet/modules/openssl/lib/puppet/type/dhparam.rb:22:in <=' /etc/puppet/modules/openssl/lib/puppet/type/dhparam.rb:22:inblock (3 levels) in <top (required)>'
/usr/lib/ruby/vendor_ruby/puppet/parameter.rb:465:in validate' /usr/lib/ruby/vendor_ruby/puppet/parameter.rb:500:invalue='
/usr/lib/ruby/vendor_ruby/puppet/type.rb:654:in []=' /usr/lib/ruby/vendor_ruby/puppet/type.rb:2272:inblock in set_parameters'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:2266:in each' /usr/lib/ruby/vendor_ruby/puppet/type.rb:2266:inset_parameters'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:2222:in initialize' /usr/lib/ruby/vendor_ruby/puppet/resource.rb:349:innew'
/usr/lib/ruby/vendor_ruby/puppet/resource.rb:349:in to_ral' /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:524:inblock in to_catalog'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:516:in each' /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:516:into_catalog'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:408:in to_ral' /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:inblock in main'
/usr/lib/ruby/vendor_ruby/puppet/context.rb:64:in override' /usr/lib/ruby/vendor_ruby/puppet.rb:244:inoverride'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:198:in main' /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:159:inrun_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:381:in block (2 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/application.rb:507:inplugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:381:in block in run' /usr/lib/ruby/vendor_ruby/puppet/util.rb:488:inexit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:381:in run' /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:146:inrun'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:92:in execute' /usr/bin/puppet:8:in'
root@host:#

@raphink
Copy link
Member

raphink commented Jun 29, 2016

Fixed in #70

@raphink raphink closed this as completed Jun 29, 2016
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

3 participants