Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6562

Limit transaction.failed_dependencies? verbosity

    Details

    • Template:
    • Acceptance Criteria:
      Hide

      Implement 2) rearrange logic to only report the individual notices once.

      Show
      Implement 2) rearrange logic to only report the individual notices once.
    • Epic Link:
    • Team:
      Coremunity
    • Sprint:
      Platform Core KANBAN
    • Release Notes:
      Enhancement
    • Release Notes Summary:
      Hide
      Failed dependency resources will now only be reported once.
      Other resources that depend on the failed resource that has already been reported will not cause them to be reported again, but the user will still get the skip message for each skipped resource.
      Show
      Failed dependency resources will now only be reported once. Other resources that depend on the failed resource that has already been reported will not cause them to be reported again, but the user will still get the skip message for each skipped resource.

      Description

      In transaction.rb's failed_dependencies? function, the transaction logs each parent dependency that failed. This causes a significant issue in certain cases where there are a large number of items in the graph and participating in dependencies.

      In my case, we have a significant number of custom types/providers for managing database items. Below I put in a simple example. If there are 200 tables, and 200 objects, it generates 40000 notices if Exec['create foo objects'] fails.

      I can realize that I need to fix the Exec failure, but my intent of this actual issue is that the Puppet agent captures all 40000 notices in the report, in memory which then causes my systems to start swapping, which makes the puppet run take longer.

      So I see there are a couple options...
      1) expose suppress_report (from transaction.rb) variable as a configuration parameter. This would let me override this extremely verbose reporting for my organization, without breaking output of anyone else.
      2) rearrange logic to only report the individual notices once.
      3) better summarize dependent failures
      4) add a max_dependent_notices which would act like max_warnings

      Example:

      oracle_user{'foo':
        ensure=>present,
        password =>'bar'
      } ->
       
      exec{'create foo objects':
        command =>template('foo/objects.sql'),
        provider=>oracle,
      }
       
      oracle_user{'foo_reader':
         ensure=>present,
         password=>'bar_reader',
      }
       
      [table1,table2,table3,table4,....,tableN].each |String $table| {
         oracle_grant{"select ON ${table} TO foo_reader":
            ensure=>present,
            require=>[Exec['create foo objects'],Oracle_user['foo_reader'],],
            before=>[Service[foo],]
         }
      }
       
      service{foo:
         ensure=>running,
         enabled=>true,
      }
       
      [object1,object2,object3,object4,object5....,objectN].each |String $object| {
         object_manager{$object:
            ensure=>present,
            require=>Service[foo],
         }
      }
      

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                kris.bosland Kris Bosland
                Reporter:
                ruckc Curtis Ruck
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: