-
Notifications
You must be signed in to change notification settings - Fork 355
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
Purging all environments when specifying more than one #52
Comments
I created a small workaround for this last week in my environment, but it's not good enough to be considered a patch. https://gist.github.com/Ancillas/6135084 Line 72 is what I commented out to stop r10k from purging. |
Been looking into this a bit... Looks like it's because both use the same "basedir", and so detect each others directories as being "stale"... So when the first purges it's stale stuff, it deletes those of the second, and then the second deletes those of the first. This seem to come out of a bad assumption made in https://github.com/adrienthebo/r10k/blob/master/lib/r10k/util/purgeable.rb#L21-L28, where assumes each "managed directory" is only used by a single source. ... I'm thinking that it may be necessary to:
Poking around the code (and being new to Ruby), I'm not sure where would be the place to make this change... Alternatively, could make the created environments be prefixed with the name used in yaml? So in the example above, we might end up metro_dev, metro_test, env_ir_dev and env_ir_test... Seems like this alternative might address #48 as well. ... I may take a shot at this... |
What does the file system look like if prefixes are used? Greg On Thursday, August 1, 2013, Adam wrote:
|
This has been addressed by Adam's fix. |
Bump the gem version in the component
We are currently having the following problem.
If we specify more than one git repo in our yaml file it will purge out the directories right after deploying them.
e.g.
...
[R10K::Task::Module::Sync - INFO] Deploying fedora into /etc/puppet/environments/metro/modules
[R10K::Task::Module::Sync - INFO] Deploying stackbase into /etc/puppet/environments/metro/modules
[R10K::Task::Deployment::PurgeEnvironments - INFO] Purging stale environments from /etc/puppet/environments
[R10K::Task::Deployment::PurgeEnvironments - INFO] Purging stale environments from /etc/puppet/environments
Here is our yaml file
If we comment out either one and rerun it deploys fine and doesn't delete them after. I have tried deleting the /var/cache/r10k as well and it has no impact.
The text was updated successfully, but these errors were encountered: