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

Problem with [pre|post]run etckeeper #81

Closed
gomex opened this issue Sep 15, 2015 · 11 comments
Closed

Problem with [pre|post]run etckeeper #81

gomex opened this issue Sep 15, 2015 · 11 comments

Comments

@gomex
Copy link

gomex commented Sep 15, 2015

I got this error:

Could not run command from prerun_command: Execution of '/etc/puppet/etckeeper-commit-pre' returned 1
Could not run command from prerun_command: Execution of '/etc/puppet/etckeeper-commit-post' returned 1

My box has these files, but something in kitchen provision remove that file. How can I fix it?

@gomex gomex changed the title Problem with prerun etckeeper Problem with [pre|post]run etckeeper Sep 15, 2015
@ytsarev
Copy link

ytsarev commented Sep 15, 2015

@gomex login into instance with kitchen login , run these commands manually and try to figure out ?

@gomex
Copy link
Author

gomex commented Sep 15, 2015

@ytsarev I already did that. That files was removed from box after kitchen provision :(

@neillturner
Copy link
Owner

there are a few hits on google
https://groups.google.com/forum/#!topic/puppet-users/EtumyaMY_oM
http://stackoverflow.com/questions/10559724/puppet-accidently-deleted-etckeeper-commit-pre-and-etckeeper-commit-post-is-ther
https://www.packtpub.com/books/content/puppet-integrating-external-tools
https://bugs.launchpad.net/openstack-cisco/+bug/1191090

kitchen-puppet just install puppet in a couple of different ways.
it looks like you config these in the puppet.conf. is that true?
I expect it is a puppet or ubuntu issue or something in the way you want to install puppet.
If you can find out the issue we can alway add a parameter to kitchn-puppet to support it.
are you running puppet apply or the puppet agent with puppetmaster.
there are so copies of the file:
https://github.com/timcowlishaw/Puppet/blob/master/etckeeper-commit-pre
I think you just need to do some research to understand what these files are.

@ytsarev
Copy link

ytsarev commented Sep 15, 2015

I guess the core issue is just this /etc/puppet clean up https://github.com/neillturner/kitchen-puppet/blob/master/lib/kitchen/provisioner/puppet_apply.rb#L419

@ytsarev
Copy link

ytsarev commented Sep 15, 2015

oh, no, scratch that, it's for git_init only

@gomex
Copy link
Author

gomex commented Sep 15, 2015

@neillturner I have this config in my puppet.conf:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post

[master]

ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

@gomex
Copy link
Author

gomex commented Sep 15, 2015

My workaround was:

prerun_command=/etc/puppet/hieradata/etckeeper-commit-pre
postrun_command=/etc/puppet/hieradata/etckeeper-commit-post

hieradata folder is copied with "hiera_data_remote_path".

@gomex
Copy link
Author

gomex commented Sep 22, 2015

That workaround don't works in agent :( Because in the agent don't have hieradata.

Is there any other way to fix it?

@gomex
Copy link
Author

gomex commented Sep 22, 2015

This was fixed with #83 because now I can use jessie repository that put etckeeper files in correct place 👍 This problem will break in ubuntu packages. Is there any way to send that files to test machine?

@grubernaut
Copy link
Contributor

The spec/fixtures directory will be copied over to the test machine if that's what you're looking for

@neillturner
Copy link
Owner

closing this as we have merged #83

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

4 participants