Coder Social home page Coder Social logo

Comments (17)

jkeiser avatar jkeiser commented on July 27, 2024

Nice find!

from chef-zero.

rteabeault avatar rteabeault commented on July 27, 2024

If we are using chef-zero as the test-kitchen provisioner and this bug is fixed do we need to wait for the next chef omnibus release to use it?

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

@rteabeault no - you can specify the version of Chef Zero you want to install. It's going to make TK runs slower though, because it's basically going to do a "gem update chef-zero"

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

See also: chef/chef#1189

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

Gah wrong button.

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

76e82b2

from chef-zero.

acaiafa avatar acaiafa commented on July 27, 2024

@rteabeault no - you can specify the version of Chef Zero you want to install. It's going to make TK runs slower though, because it's basically going to do a "gem update chef-zero"

I am curious how this would work. I recently built a new packer image to have chef-zero be apart of the os and even though I removed the chef-zero 1.7.2 that installs the error I get back https://gist.github.com/acaiafa/9b56b57011a5c247fe03. This will show you 11.8.2 and 11.6.2.

from chef-zero.

bdupras avatar bdupras commented on July 27, 2024

@sethvargo "you can specify the version of Chef Zero you want to install" - how can I specify the version of Chef Zero to install?

from chef-zero.

acaiafa avatar acaiafa commented on July 27, 2024

@bdupras i think its more or less the dependency that chef-client-11.8.2 calls. I have it setup to where I have chef-zero 2.0.2 installed and 1.7.2 removed but chef-client 11.8.2 still calls 1.7.2

from chef-zero.

rteabeault avatar rteabeault commented on July 27, 2024

After looking through the chef-zero source I can't find where you can specify the version of the chef-zero to install. I see

      def prepare_command
        return if local_mode_supported?

        ruby_bin = config[:ruby_bindir]

        # use Bourne (/bin/sh) as Bash does not exist on all Unix flavors
        #
        # * we are installing latest chef in order to get chef-zero and
        #   Chef::ChefFS only. The version of Chef that gets run will be
        #   the installed omnibus package. Yep, this is funky :)
        <<-PREPARE.gsub(/^ {10}/, '')
          sh -c '
          #{chef_client_zero_env(:export)}
          if ! #{sudo("#{ruby_bin}/gem")} list chef-zero -i >/dev/null; then
            echo ">>>>>> Attempting to use chef-zero with old version of Chef"
            echo "-----> Installing chef zero dependencies"
            #{sudo("#{ruby_bin}/gem")} install chef --no-ri --no-rdoc --conservative
          fi'
        PREPARE
      end

which seems to indicate that chef is installed to get chef-zero and that we are stuck until chef gets a new release.

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

@rteabeault @bdupras @rteabeault ya'll are overthinking this a bit:

chef_gem 'chef-zero' do
  version '1.x'
end

You won't be able to upgrade to the 2.x series because Chef has a hard lock on ~> 1.x. I have a PR open to raise that to the 2.x series. If there are changes we need to backport into the 1.x series, please open issues for them.

Sorry if there was confusion.

from chef-zero.

acaiafa avatar acaiafa commented on July 27, 2024

@rteabeault i basically created a new basebox image with packer and have it install chef-zero. Either way it doesn't seem to matter since chef-client 11.8.2 only calls on chef-zero 1.7.2. Even after removing it and having 2.0.2 on the system it will eventually just totally fail.

However how i got the node to actually converge using chef-zero is deleting the metadata.json file entirely and it went through.

from chef-zero.

mdellanoce avatar mdellanoce commented on July 27, 2024

@sethvargo can you expand on your last comment here? I assume you mean to put chef_gem in a recipe and add it to the run list, but when I try this chef-zero still explodes when expanding the cookbooks in the run list. Am I missing something obvious?

from chef-zero.

acaiafa avatar acaiafa commented on July 27, 2024

@mdellanoce what version of chef-zero do you have installed?

from chef-zero.

mdellanoce avatar mdellanoce commented on July 27, 2024

@acaiafa I have 1.7.2 installed via omnibus (latest)

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

@mdellanoce there's nothing you can do until chef/chef#1189 is merged.

from chef-zero.

acaiafa avatar acaiafa commented on July 27, 2024

@mdellanoce ahh i installed 1.7.3 and it worked without issues for me.

from chef-zero.

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.