GithubHelp home page GithubHelp logo

Comments (5)

jkeiser avatar jkeiser commented on May 28, 2024

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.

mwrock avatar mwrock commented on May 28, 2024

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.

jkeiser avatar jkeiser commented on May 28, 2024

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.

jkeiser avatar jkeiser commented on May 28, 2024

er, that was not intentional

from chef-provisioning.

jkeiser avatar jkeiser commented on May 28, 2024

Machines are no longer converging twice.

from chef-provisioning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.