Comments (3)
I believe I ran into this as well-
It appears that goiardi will respect environment version constraints for any cookbooks that are specified in the run-list, but not their dependencies.
When I run chef-client
, goiardi will pull in cookbooks with the locked versions as expected, and it will pull in any cookbooks which are specified as dependencies in metadata.rb.
When retrieving these dependencies, any version constaints specified in metadata.rb are respected.
Goiardi does not apply the environment constraints against these dependency cookbooks, however.
This is different from the Progress Software chef-server implementation, which will respect these dependencies.
So for example, if we have-
-
Environment X, specifying constraints
- cookbook1, '~> 1.0'
- cookbook2, '~> 2.0'
-
A run-list of
["recipe[cookbook1]"]
-
cookbook1 (available in versions 1.0, 2.0, 3.0)
- depends on cookbook2
-
cookbook2 (available in version 1.0, 2.0, 3.0)
Running chef-client
/cinc-client
against goiardi will pull cookbook1 1.0 and cookbook2 3.0
Running chef-client
/cinc-client
against chef-server will pull cookbook1 1.0 and cookbook2 2.0
I'm not particularly familiar with this codebase, but it appears that we need to add these env constraints later in cookbook.go
, when evaluating these cookbook dependencies.
I couldn't get the master
branch to work quite right, so I made my own temporary fork of 0.11.10 with my implementation of this change. This change works for me in production.
Hopefully this help illustrate the problem better, even if it's not the right solution :)
https://github.com/e1ven/goiardi/pull/1/files
(The SQL index changes in the PR are unrelated -
These indexes were never accessed on my server, but it slowed the DB down substantially to keep writing them)
from goiardi.
I'm checking this out now, after adding options for purging statuses and reports per that earlier issue. It's in the 0.11.6-merging branch, so if you get a chance to try it out that'd be great - I have more testing to do on it still, so it's not release worthy yet, but for the first step it passes the go tests.
from goiardi.
Moving along on this. One thing I noticed, though, is that it doesn't look like knife cookbook download
obeys environment constraints, so that's behaving as intended at least. The first thing is still a problem though, although it's one of those things that chef-pedant
tests for and it passes that fine. I'll dig in, but I suspect there's a subtle interaction between two cookbooks. (I've certainly had goiardi do the right thing with environment constraints plenty of times.)
from goiardi.
Related Issues (20)
- chef 13 issue with cookbooks and knife HOT 3
- Server crash on query HOT 8
- Unable to upload cookbook with new knife HOT 7
- Q: Memory consumption when using in-memory/internal mode HOT 27
- Serf reconnect HOT 5
- Q: housekeeping of node_statuses/reports/sandboxes HOT 9
- Provide updated Docker builds HOT 2
- Client create fails with invalid key create_key HOT 3
- Postgres database size HOT 2
- Column extended_info too small in goiardi-schema-mysql.sql HOT 1
- goiardi.gl does not resolve anymore HOT 2
- Non-admin client cannot fetch another user's public key HOT 2
- Contributing on the project HOT 2
- Anonymous api endpoint for a load balancer healthcheck? HOT 3
- Message "cannot parse UTC" in goiardi logs HOT 4
- Knife upload user doesn't work properly HOT 3
- Excessive memory pressure during cookbook upload HOT 10
- V2 Proposal HOT 7
- Unexpected Search Index merge precedence
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 goiardi.