Retry inventory ActiveRecord transaction failure
Previous to this commit, if the ActiveRecord transaction for saving
facts failed do to MySQL deadlock, for example, the transaction would
fail printing a message to the user. This primarily occurred during a
PE agent installation if multiple agent's were being creating
simultaneously.
This commit adds the ability to retry if a
ActiveRecord::StatementInvalid exception is thrown. To accomplish this,
this commit ports Cloud Provisioner's
Puppet::CloudPack::Utils#retry_action method to Puppet core under
Puppet::Util::RetryAction#retry_action.