Bug #3084

Potential issue with exec and pson

Added by James Turnbull over 2 years ago. Updated about 2 years ago.

Status:Duplicate Start date:01/18/2010
Priority:Normal Due date:
Assignee:James Turnbull % Done:

0%

Category:exec
Target version:-
Affected Puppet version:0.25.0 Branch:
Keywords:
Votes: 0

Description

After upgrading to 0.25, the following error occurs:

    Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship target ” 

This turned out to be because of recipes using exec without naming the exec. Example


    exec { "cat /that/file":
              unless => "something",
              path => "/bin",
              refreshonly => false
            }

should be rewritten as


    exec { "cat that file":
              command => "cat /that/file",
              unless => "something",
              path => "/bin",
              refreshonly => false
            }

The error goes away after making the change and all is well. 

http://ramblings.narrabilis.com/wp/puppet-upgrade-problem-0-25-could-not-convert-from-pson/


Related issues

duplicates Puppet - Bug #2770: pson not properly serializing some resources Closed 11/02/2009

History

Updated by James Turnbull over 2 years ago

  • Status changed from Unreviewed to Needs More Information
  • Assignee set to James Turnbull

Updated by Markus Roberts over 2 years ago

I was unable to reproduce this; have posted a query on the linked blog.

Updated by Thomas Uphill over 2 years ago

Using puppet-0.25.3 I cannot reproduce the problem either. I re-instated my old configs and did not see the pson errors.

Again, I think wasn’t really a bug (I didn’t report it as such) it’s just sloppiness on my part for not naming all my exec’s, which is probably good practice should I wish to reference them later.

Updated by Peter Meier over 2 years ago

Thomas Uphill wrote:

Using puppet-0.25.3 I cannot reproduce the problem either. I re-instated my old configs and did not see the pson errors.

Again, I think wasn’t really a bug (I didn’t report it as such) it’s just sloppiness on my part for not naming all my exec’s, which is probably good practice should I wish to reference them later.

2770 ?

Updated by Markus Roberts over 2 years ago

  • Status changed from Needs More Information to Duplicate

Updated by Eric Eisenhart about 2 years ago

I updated my puppet master from 0.24.8 (EPEL package) to 0.25.4 (also EPEL). With a 0.24.8 client there are no problems, but with a 0.25.4 client I get: err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship target "Sshkey[]"

These are the only instances of sshkey in my manifests (simplified but still exhibits problem):

@@sshkey { 
   $fqdn:
      type => rsa,
      key  => $sshrsakey,
}
Sshkey <<| |>>

(obviously I have storeconfigs on)

Commenting out the Sshkey <<| |>> line (and leaving the @@sshkey block intact) eliminates the error. Commenting out the @@sshkey block and leaving the “Sshkey <<| |>>” in I still get the error (problem in my saved data?)

Updated by Eric Eisenhart about 2 years ago

Fixed; definitely appears that the problem is with untitled resources.

 select hosts.name from resources,hosts where resources.restype='Sshkey' and resources.title='' and resources.host_id = hosts.id;

Returned 9 entries. I ran “puppetstoredconfigsclean.rb” for all the hosts returned in that list, and then put my manifest back (@@sshkey and Sshkey <<| |>>) and everything worked again.

I’m assuming the more general fix would be to do that for everything returned from:

select hosts.name from resources,hosts where resources.title='' and resources.host_id = hosts.id;

To be sure, I ran “puppetd —test” on one of the hosts that was returned from that select statement and ran the select again and the untitled resource didn’t re-appear. I assume it was from an old bug in a manifest or maybe an even older version of puppet…

Also available in: Atom PDF