Ask Your Question
0

Puppet 3.8.7 takes a long time to store state

asked 2017-01-25 11:27:27 -0500

Sebastian gravatar image

Puppet 3.8.7 from the puppetlabs repositories on Ubuntu 14.04 takes very long to store state:

Debug: Storing state
Debug: Stored state in 59.73 seconds

What is that state? For what is it required? How do I disable storing state?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-01-25 12:06:47 -0500

DarylW gravatar image

updated 2017-01-25 12:09:14 -0500

I believe it is calculating the last_run_report.yaml and last_run_state.yaml files.. aka just a yaml dump of the statefile. 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/...

  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
edit flag offensive delete link more

Comments

Thanks a lot. Is there a way to disable it?

Sebastian gravatar imageSebastian ( 2017-01-26 05:01:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-01-25 11:27:27 -0500

Seen: 37 times

Last updated: Jan 25