Project

General

Profile

Feature #25439 ยป report.json

Ohad Levy, 11/20/2018 03:09 PM

 
{
"config_report": {
"metrics": {
"events": { "failure": 0, "success": 11, "total": 11 },
"changes": { "total": 11 },
"time": {
"anchor": 0.001182,
"config_retrieval": 3.20718121528625,
"cron": 0.000712,
"file": 1.721398,
"filebucket": 0.000207,
"mailalias": 0.000354,
"package": 0.012243,
"service": 0.752547,
"total": 5.74987821528625,
"user": 0.002958,
"yumrepo": 0.051096
},
"resources": {
"changed": 7,
"failed": 0,
"failed_to_restart": 0,
"out_of_sync": 7,
"restarted": 0,
"scheduled": 0,
"skipped": 6,
"total": 61
}
},
"host": "li01.sat.lab.tlv.example.com",
"reported_at": "2016-12-28 08:38:26 UTC",
"status": {
"applied": 11,
"restarted": 0,
"failed": 1,
"failed_restarts": 0,
"skipped": 6,
"pending": 0
},
"logs": [
{
"log": {
"level": "notice",
"sources": {
"source": "/File[/var/lib/puppet/lib/puppet/parser/functions/delete.rb]/content"
},
"messages": {
"message": "\n--- /var/lib/puppet/lib/puppet/parser/functions/delete.rb\t2014-08-12 07:01:03.000000000 +0100\n+++ /tmp/puppet-file20161128-12599-w12jpx-0\t2016-11-28 08:38:23.000000000 +0000\n@@ -17,27 +17,30 @@\n delete({'a'=>1,'b'=>2,'c'=>3}, 'b')\n Would return: {'a'=>1,'c'=>3}\n \n+ delete({'a'=>1,'b'=>2,'c'=>3}, ['b','c'])\n+ Would return: {'a'=>1}\n+\n delete('abracadabra', 'bra')\n Would return: 'acada'\n- EOS\n+ EOS\n ) do |arguments|\n \n if (arguments.size != 2) then\n raise(Puppet::ParseError, \"delete(): Wrong number of arguments \"+\n- \"given #{arguments.size} for 2.\")\n+ \"given #{arguments.size} for 2.\")\n end\n \n collection = arguments[0].dup\n- item = arguments[1]\n-\n- case collection\n- when Array, Hash\n- collection.delete item\n- when String\n- collection.gsub! item, ''\n- else\n- raise(TypeError, \"delete(): First argument must be an Array, \" +\n- \"String, or Hash. Given an argument of class #{collection.class}.\")\n+ Array(arguments[1]).each do |item|\n+ case collection\n+ when Array, Hash\n+ collection.delete item\n+ when String\n+ collection.gsub! item, ''\n+ else\n+ raise(TypeError, \"delete(): First argument must be an Array, \" +\n+ \"String, or Hash. Given an argument of class #{collection.class}.\")\n+ end\n end\n collection\n end\n"
}
}
},
{
"log": {
"level": "notice",
"sources": {
"source": "/File[/var/lib/puppet/lib/puppet/parser/functions/is_domain_name.rb]/content"
},
"messages": {
"message": "\n--- /var/lib/puppet/lib/puppet/parser/functions/is_domain_name.rb\t2014-08-12 07:01:05.000000000 +0100\n+++ /tmp/puppet-file20161128-12599-d8xr0u-0\t2016-11-28 08:38:23.000000000 +0000\n@@ -13,16 +13,16 @@\n \"given #{arguments.size} for 1\")\n end\n \n- domain = arguments[0]\n+ # Only allow string types\n+ return false unless arguments[0].is_a?(String)\n+\n+ domain = arguments[0].dup\n \n # Limits (rfc1035, 3.1)\n domain_max_length=255\n label_min_length=1\n label_max_length=63\n \n- # Only allow string types\n- return false unless domain.is_a?(String)\n-\n # Allow \".\", it is the top level domain\n return true if domain == '.'\n \n@@ -33,6 +33,10 @@\n return false if domain.empty?\n return false if domain.length > domain_max_length\n \n+ # The top level domain must be alphabetic if there are multiple labels.\n+ # See rfc1123, 2.1\n+ return false if domain.include? '.' and not /\\.[A-Za-z]+$/.match(domain)\n+\n # Check each label in the domain\n labels = domain.split('.')\n vlabels = labels.each do |label|\n"
}
}
},
{
"log": {
"level": "notice",
"sources": {
"source": "/File[/var/lib/puppet/lib/puppet/parser/functions/validate_absolute_path.rb]/content"
},
"messages": {
"message": "\n--- /var/lib/puppet/lib/puppet/parser/functions/validate_absolute_path.rb\t2014-03-16 15:31:08.000000000 +0000\n+++ /tmp/puppet-file20161128-12599-frq3f6-0\t2016-11-28 08:38:24.000000000 +0000\n@@ -5,15 +5,20 @@\n \n The following values will pass:\n \n- $my_path = \"C:/Program Files (x86)/Puppet Labs/Puppet\"\n+ $my_path = 'C:/Program Files (x86)/Puppet Labs/Puppet'\n validate_absolute_path($my_path)\n- $my_path2 = \"/var/lib/puppet\"\n+ $my_path2 = '/var/lib/puppet'\n validate_absolute_path($my_path2)\n-\n+ $my_path3 = ['C:/Program Files (x86)/Puppet Labs/Puppet','C:/Program Files/Puppet Labs/Puppet']\n+ validate_absolute_path($my_path3)\n+ $my_path4 = ['/var/lib/puppet','/usr/share/puppet']\n+ validate_absolute_path($my_path4)\n \n The following values will fail, causing compilation to abort:\n \n validate_absolute_path(true)\n+ validate_absolute_path('../var/lib/puppet')\n+ validate_absolute_path('var/lib/puppet')\n validate_absolute_path([ 'var/lib/puppet', '/var/foo' ])\n validate_absolute_path([ '/var/lib/puppet', 'var/foo' ])\n $undefined = undef\n@@ -28,28 +33,36 @@\n end\n \n args.each do |arg|\n- # This logic was borrowed from\n- # [lib/puppet/file_serving/base.rb](https://github.com/puppetlabs/puppet/blob/master/lib/puppet/file_serving/base.rb)\n-\n- # Puppet 2.7 and beyond will have Puppet::Util.absolute_path? Fall back to a back-ported implementation otherwise.\n- if Puppet::Util.respond_to?(:absolute_path?) then\n- unless Puppet::Util.absolute_path?(arg, :posix) or Puppet::Util.absolute_path?(arg, :windows)\n- raise Puppet::ParseError, (\"#{arg.inspect} is not an absolute path.\")\n+ # put arg to candidate var to be able to replace it\n+ candidates = arg\n+ # if arg is just a string with a path to test, convert it to an array\n+ # to avoid test code duplication\n+ unless arg.is_a?(Array) then\n+ candidates = Array.new(1,arg)\n+ end\n+ # iterate over all pathes within the candidates array\n+ candidates.each do |path|\n+ # This logic was borrowed from\n+ # [lib/puppet/file_serving/base.rb](https://github.com/puppetlabs/puppet/blob/master/lib/puppet/file_serving/base.rb)\n+ # Puppet 2.7 and beyond will have Puppet::Util.absolute_path? Fall back to a back-ported implementation otherwise.\n+ if Puppet::Util.respond_to?(:absolute_path?) then\n+ unless Puppet::Util.absolute_path?(path, :posix) or Puppet::Util.absolute_path?(path, :windows)\n+ raise Puppet::ParseError, (\"#{path.inspect} is not an absolute path.\")\n+ end\n+ else\n+ # This code back-ported from 2.7.x's lib/puppet/util.rb Puppet::Util.absolute_path?\n+ # Determine in a platform-specific way whether a path is absolute. This\n+ # defaults to the local platform if none is specified.\n+ # Escape once for the string literal, and once for the regex.\n+ slash = '[\\\\\\\\/]'\n+ name = '[^\\\\\\\\/]+'\n+ regexes = {\n+ :windows => %r!^(([A-Z]:#{slash})|(#{slash}#{slash}#{name}#{slash}#{name})|(#{slash}#{slash}\\?#{slash}#{name}))!i,\n+ :posix => %r!^/!,\n+ }\n+ rval = (!!(path =~ regexes[:posix])) || (!!(path =~ regexes[:windows]))\n+ rval or raise Puppet::ParseError, (\"#{path.inspect} is not an absolute path.\")\n end\n- else\n- # This code back-ported from 2.7.x's lib/puppet/util.rb Puppet::Util.absolute_path?\n- # Determine in a platform-specific way whether a path is absolute. This\n- # defaults to the local platform if none is specified.\n- # Escape once for the string literal, and once for the regex.\n- slash = '[\\\\\\\\/]'\n- name = '[^\\\\\\\\/]+'\n- regexes = {\n- :windows => %r!^(([A-Z]:#{slash})|(#{slash}#{slash}#{name}#{slash}#{name})|(#{slash}#{slash}\\?#{slash}#{name}))!i,\n- :posix => %r!^/!,\n- }\n-\n- rval = (!!(arg =~ regexes[:posix])) || (!!(arg =~ regexes[:windows]))\n- rval or raise Puppet::ParseError, (\"#{arg.inspect} is not an absolute path.\")\n end\n end\n end\n"
}
}
},
{
"log": {
"level": "info",
"sources": { "source": "Puppet" },
"messages": { "message": "test" }
}
}
],
"summary": "Failed"
}
}
    (1-1/1)