Bug #2837

Change in report formatting warning message to debug

Added by Peter Meier over 2 years ago. Updated about 2 years ago.

Status:Closed Start date:11/19/2009
Priority:Normal Due date:
Assignee:Markus Roberts % Done:

0%

Category:error reporting
Target version:0.25.5
Affected Puppet version:0.25.1 Branch:http://github.com/duritong/puppet/tree/ticket/0.25.x/2837
Keywords:pson
Votes: 3

Description

Using latest 0.25.x I know get

warning: Value of 'preferred_serialization_format' ('pson') is invalid, using default ('yaml')

it looks like this happens because for the pson supported? is missing?


Related issues

related to Puppet - Refactor #2842: Format debugging should be removed Closed 11/19/2009
related to Puppet - Bug #3666: Reports should support PSON serialization Accepted 11/19/2009
related to Puppet - Bug #2817: File resource with links=>follow creates a symlink Closed 11/13/2009
related to Puppet - Bug #4703: Could not intern from b64_zlib_yaml: allocator undefined ... Closed 09/03/2010

History

Updated by James Turnbull over 2 years ago

  • Status changed from Unreviewed to In Topic Branch Pending Review

If I add:

def supported?(klass)
    true
end 

to the pson format this works for me.

diff --git a/lib/puppet/network/formats.rb b/lib/puppet/network/formats.rb
index 010c235..82ef2c7 100644
--- a/lib/puppet/network/formats.rb
+++ b/lib/puppet/network/formats.rb
@@ -170,4 +170,8 @@ Puppet::Network::FormatHandler.create(:pson, :mime => "text/pson", :weight => 10
         end
         klass.from_pson(data)
     end
+
+    def supported?(klass)
+        true
+    end 
 end

Updated by Peter Meier over 2 years ago

I’m in process of sending a patch to the dev list

Updated by Peter Meier over 2 years ago

  • Branch set to http://github.com/duritong/puppet/tree/ticket/0.25.x/2837

Updated by Markus Roberts over 2 years ago

  • Status changed from In Topic Branch Pending Review to Needs More Information
  • Assignee set to Peter Meier

Pson isn’t supported on all classes (we have to write the routines by hand). Presently we’ve got'em for Catalogs, Resources, Relationships and Metadata. Do you know what it was trying to serialize when you got the message, or can you provide a simple example that reproduces it?

Updated by Peter Meier over 2 years ago

Pson isn’t supported on all classes (we have to write the routines by hand). Presently we’ve got'em for Catalogs, Resources, Relationships and Metadata. Do you know what it was trying to serialize when you got the message, or can you provide a simple example that reproduces it?

I got it on every client. But no way with @—trace@ and @—debug@ to get more than this warning.

Updated by Markus Roberts over 2 years ago

Could you provide a little context — a dozen or so lines of the output above and below the warning, say?

Updated by Peter Meier over 2 years ago

Markus Roberts wrote:

Could you provide a little context — a dozen or so lines of the output above and below the warning, say?

at the very end of a run:

# puppetd -t --debug --trace
[...]
debug: Service[iptables](provider=redhat): Executing 'ps -ef'
debug: Puppet::Type::Service::ProviderRedhat: Executing '/sbin/chkconfig iptables'
debug: Finishing transaction 23456253568580 with 4 changes
debug: Storing state
debug: Stored state in 0.65 seconds
debug: Format pson not supported for Puppet::Transaction::Report; has not implemented method 'from_pson'
debug: Format s not supported for Puppet::Transaction::Report; has not implemented method 'from_s'
warning: Value of 'preferred_serialization_format' ('pson') is invalid, using default ('marshal')
notice: Finished catalog run in 24.24 seconds

Updated by Peter Meier over 2 years ago

  • Assignee changed from Peter Meier to Markus Roberts

if I should provide more, please let me know.

Updated by Markus Roberts over 2 years ago

  • Subject changed from warning that pson is invalid to Reports should support PSON serialization
  • Status changed from Needs More Information to Accepted

Updated by Markus Roberts over 2 years ago

  • Target version set to 0.25.3

Updated by Markus Roberts over 2 years ago

  • Target version changed from 0.25.3 to 0.25.4

Updated by James Turnbull over 2 years ago

  • Target version changed from 0.25.4 to 0.25.5

Updated by Alan Barrett about 2 years ago

I get the following error with puppet 0.25.4:

warning: Value of 'preferred_serialization_format' (pson) is invalid for report, using default (yaml)

I have not deliberately configured any preferred_serialization_format, so I assume that some part of puppet chose to use “pson” by default. Does anybody know where that would have happened, and should I raise a separate issue about an unsupported value being chosen as a default?

Updated by Nigel Kersten about 2 years ago

Can we get this changed from a warning to a more appropriate debug level?

It really doesn’t seem desirable that a default configuration produces a warning.

Updated by Nigel Kersten about 2 years ago

Is this still targeted for 0.25.5?

Updated by James Turnbull about 2 years ago

  • Target version changed from 0.25.5 to 49

Updated by Dan Bode about 2 years ago

when is this going to be fixed? is there a work around?

Updated by Peter Meier about 2 years ago

Dan Bode wrote:

when is this going to be fixed? is there a work around?

It’s just a warning.

Updated by Nigel Kersten about 2 years ago

just a warning isn’t good enough.

puppetd 0.25.4 doesn’t support —detailed-exitcodes, so I’m sure I’m not the only one parsing puppetd output looking for warnings and errors.

What’s the justification for warning about this situation?

Updated by R.I. Pienaar about 2 years ago

being a warning means it gets printed on every run, even daemonized ones, even ones not in debug or verbose, yet its completely pointless since we cant do anything to make the warning go away.

It should be debug, or not there at all.

Updated by James Turnbull about 2 years ago

I’ve done an alternative fix that downgrades the warning to a debug:

http://github.com/jamtur01/puppet/tree/bug/0.25.x/2837

Updated by James Turnbull about 2 years ago

  • Subject changed from Reports should support PSON serialization to Change in report formatting warning message to debug
  • Category changed from serialization to error reporting
  • Status changed from Accepted to Closed
  • Target version changed from 49 to 0.25.5

Pushed change in message severity in commit:44f6d64876f60cbed27e79ba0c64377ebcb9a07e in branch 0.25.x.

Creating new ticket #3666 for PSON support in reports.

Also available in: Atom PDF