Comments (5)
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.
from r10k.
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:
- list the contents of each managed directory (in a hash of arrays?),
- iterate over each source and remove the "desired" contents from our listing
- delete all entries remaining in the listing from the filesystem
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...
from r10k.
... Which is to say, that I have. :P
#53 allows prefixes to be used... Would pretty much have to be used in the case that multiple sources are in use. This should satisfy #48.
from r10k.
What does the file system look like if prefixes are used?
Greg
On Thursday, August 1, 2013, Adam wrote:
... Which is to say, that I have. :P
#53 #53 allows prefixes to be
used... Would pretty much have to be used in the case that multiple sources
are in use. This should satisfy #48#48
.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-21978807
.
from r10k.
This has been addressed by Adam's fix.
from r10k.
Related Issues (20)
- Add a TOC to the configuration doc
- svn doesn't work any more HOT 5
- Yaml environments fails to deploy banch when commit sha is a number HOT 1
- r10k gem fails to install on windows without admin or Create symbolic links user rights HOT 2
- R10k should be able to use bare Git repository without authentication as conrol_repo HOT 4
- R10k container - cannot generate types (missing puppet binary) HOT 1
- $modifiedenvs does not pass environment to postrun hook on deletion HOT 1
- r10k should not depend on gettext as a runtime dependency HOT 1
- r10k puppetfile install fails with "ERROR -> wrong number of arguments (given 2, expected 1)" when pool_size set to 1 HOT 1
- Not sure about the hiera.yaml statement in common-patterns HOT 2
- Allow override of exclude_spec option with puppetfile install subcommand HOT 1
- r10k gem is not compatible with faraday 2.9.0 HOT 2
- environment deployments: postrun $modifiedenvs lists all environments rather than only those modified HOT 1
- r10k does not write files correctly from git on Windows HOT 4
- Failing on aarch64 HOT 1
- How to use oauth tokens with r10k.yaml HOT 2
- Implement an allow list for deployments HOT 4
- Removal of obsolete multi_json dependency HOT 3
- r10k puppetfile install does not adhere to global exclude_spec false HOT 4
- Minitar v1 has been released
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r10k.