Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I believe it is calculating the lastrunreport.yaml and lastrunstate.yaml files.. aka just a yaml dump of the statefile

https://github.com/puppetlabs/puppet/blob/ebd96213cab43bb2a8071b7ac0206c3ed0be8e58/lib/puppet/util/storage.rb#L80-L88

  def self.store
    Puppet.debug "Storing state"

    Puppet.info "Creating state file #{Puppet[:statefile]}" unless Puppet::FileSystem.exist?(Puppet[:statefile])

    Puppet::Util.benchmark(:debug, "Stored state") do
      Puppet::Util::Yaml.dump(@@state, Puppet[:statefile])
    end
  end

I believe it is calculating the lastrunreport.yaml last_run_report.yaml and lastrunstate.yaml last_run_state.yaml files.. aka just a yaml dump of the statefile

https://github.com/puppetlabs/puppet/blob/ebd96213cab43bb2a8071b7ac0206c3ed0be8e58/lib/puppet/util/storage.rb#L80-L88

  def self.store
    Puppet.debug "Storing state"

    Puppet.info "Creating state file #{Puppet[:statefile]}" unless Puppet::FileSystem.exist?(Puppet[:statefile])

    Puppet::Util.benchmark(:debug, "Stored state") do
      Puppet::Util::Yaml.dump(@@state, Puppet[:statefile])
    end
  end

I believe it is calculating the last_run_report.yaml and last_run_state.yaml files.. aka just a yaml dump of the statefilestatefile. It takes a long time if you are managing a lot of resources. I know I've seen that time explode when I was managing a file directory with lots of children to set their perms with recurse => true.

https://github.com/puppetlabs/puppet/blob/ebd96213cab43bb2a8071b7ac0206c3ed0be8e58/lib/puppet/util/storage.rb#L80-L88

  def self.store
    Puppet.debug "Storing state"

    Puppet.info "Creating state file #{Puppet[:statefile]}" unless Puppet::FileSystem.exist?(Puppet[:statefile])

    Puppet::Util.benchmark(:debug, "Stored state") do
      Puppet::Util::Yaml.dump(@@state, Puppet[:statefile])
    end
  end