Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zookeeper::config manages datastore directory recursively - puppet takes 1700+ seconds to complete run #41

Closed
danielbenzvi opened this issue Jan 10, 2016 · 1 comment

Comments

@danielbenzvi
Copy link

Hello
We experience an issue where Puppet runs take over 1700 seconds on our zookeeper instances. We found out Puppet's state.yaml is over 500MB in size due to a file resource managing $datastore recursively in config.pp:

  file { $datastore:
    ensure  => directory,
    owner   => $user,
    group   => $group,
    mode    => '0644',
    recurse => true,
  }

Our state.yaml contains mostly ZooKeeper snapshots:

  File[/var/lib/zookeeper/version-2/snapshot.18730c54a5]:
    !ruby/sym checked: 2016-01-07 18:40:26.182027 -05:00
  File[/var/lib/zookeeper/version-2/log.17d2e5191f]:
    !ruby/sym checked: 2015-12-29 05:17:05.593017 -05:00
  File[/var/lib/zookeeper/version-2/snapshot.139d2c865a]:
    !ruby/sym checked: 2015-10-26 17:17:32.388460 -05:00
  File[/var/lib/zookeeper/version-2/snapshot.170f6fdcc1]:

Seems like Puppet keeps state.yaml entries forever, even if the file was already deleted: https://tickets.puppetlabs.com/browse/PUP-3647

Is there any specific reason for managing $datastore recursively?

@deric
Copy link
Owner

deric commented Jan 12, 2016

Right, I see, that's quite annoying. It should be ZooKeepers responsibility to create files with proper owner/group. So, I think we should remove this.

@deric deric closed this as completed in 419b6b9 Jan 12, 2016
cegeka-jenkins pushed a commit to cegeka/puppet-zookeeper that referenced this issue Sep 7, 2020
  - puppet run takes too long when directories contain many files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants