Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 4.5.3
-
None
-
Puppet Agent 4.5.3
-
-
Coremunity
-
Platform Core KANBAN
-
Enhancement
-
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],
|
}
|
}
|