dgolja / golja-gnupg

Puppet module for managing GnuPG package and public keys
Apache License 2.0
13 stars 46 forks source link

undefined method `exitstatus' #13

Open Tokynet opened 9 years ago

Tokynet commented 9 years ago

I'm trying to use the maestrodev rvm module which has this module as a dependency. I have declared the following class into my profile to make sure there was nothing wonky on the call from rvm module:

include ::gnupg

gnupg_key { 'hkp_server_D39DC0E3': ensure => present, key_id => 'D39DC0E3', user => 'root', key_server => 'hkp://keys.gnupg.net', key_type => public, }

From puppet run with debug enabled:

Debug: Executing 'gpg --list-keys --with-colons D39DC0E3' Error: /Stage[main]/Profiles::cool_app/Gnupg_key[hkp_server_D39DC0E3]: Could not evaluate: undefined method `exitstatus' for #String:0x00000005111ae8

When I run the command above manually on the instance this is what I get: gpg --list-keys --with-colons D39DC0E3 tru::1:1434731668:0:3:1:5 gpg: error reading key: No public key

dgolja commented 9 years ago

What version of puppet are you using ?

Tokynet commented 9 years ago

pe-puppet-server-3.3.3.1-1.pe

christopher-b commented 9 years ago

I'm seeing the same problem on v3.6.3

dgolja commented 9 years ago

tnx for the feedback. Any more data what O.S., etc so I can try to recreate it ?

christopher-b commented 9 years ago

Actually, I think I found the problem. My master is on v3.6.2, but one of my clients is still on v3.2. It looks like Puppet::Util::Execution.execute returned a string rather than a Puppet::Util::Execution::ProcessOutput until v3.4: https://tickets.puppetlabs.com/browse/PUP-2306

I'll upgrade the client to see if that helps.