Comments (5)
Yeah, two converges currently happen (will have that fixed soon). This is because the default machine_batch converges the machine, and then chef still runs the machine resource. The second converge, however, shouldn't really do anything--are you encountering errors?
To turn this off for now, you can put this just before your first machine declaration: with_machine_batch 'thenewbatch', :action => :nothing . I'll make sure it doesn't happen in the general release.
from chef-provisioning.
Adding the with_machine_baytch
line did pevent the second convergence but also fails since the machine conversion uses a different strategy for retrieving the driver. The machine resource instantiates a fresh driver from the driver URL and the client config. Since I retrieve credentials at the LWRP and add to the runcontext, those credentials are not not present.
The machine_batch convergence is now eliminated but that was the one that had been succeeding because it gets the driver from the run context that hd been previously stuffed with the appropriate credentials.
I would expect that credentials set in the recipe would override any in the config and therefore it should be acceptable to set creds in the recipe and have them absent from the config. if creds are missing from both, then that would be the error condition.
My PR seems to follow that logic. If a driver is constructed in the recipe and olaces in the runcontext that is used and if it is not declared in the recipe, then it falls back to the driver url and config data.
from chef-provisioning.
In those cases, the right thing to do is probably to cache the driver for a given URL, so that when you first specify it, all subsequent people will get the same driver instance. That way all callsites will get the same response.
You don't need with_machine_batch anymore to avoid multiple converges, FYI. That's fixed.
from chef-provisioning.
er, that was not intentional
from chef-provisioning.
Machines are no longer converging twice.
from chef-provisioning.
Related Issues (20)
- LoadError: cannot load such file -- chef/provisioning
- machine_file fails with NoMethodError: undefined method `[]' for nil:NilClass
- How to run multiple chef-client processes in parallel HOT 1
- setting up chef_version doesn't seems to be working HOT 2
- 401 error on node \ client precreation HOT 1
- driver template HOT 1
- with_machine_options() being ignored 100% with machine_batch
- with_machine_options() being ignored 100% with machine_batch HOT 1
- Where does specs_and_options get defined at?
- "Cannot forward a socketless Chef Zero server" error when following Vagrant try it out HOT 1
- machine_batch resource fails with chef 13 HOT 2
- winrm available? function exception when using SSL
- [Q] Can this autoprovision BMC ports and PXE NIC on the server?
- Chef-client -z -j xyz.json /var/chef/cache/cookbooks/xyz/recipes/default.rb
- Feature request: KVM drivers
- undefined method `[]' for nil:NilClass () HOT 2
- Error: Unsupported reporting protocol version - While querying chef reporting api HOT 1
- Allow use of net-ssh 5.2.0 gem HOT 1
- chef-provisisioning does not work with new license acceptance framework HOT 1
- Dependabot can't parse your Gemfile
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 chef-provisioning.