Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `normalize_architecture' for Mixlib::Install::Util:Class - 2.1.7 #194

Closed
johndesp opened this issue Aug 11, 2017 · 12 comments

Comments

@johndesp
Copy link

Cookbook version

chef-ingredient 2.1.7

Chef-client version

chef --version
Chef Development Kit Version: 2.1.11
chef-client version: 13.2.20
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)
berks version: 6.3.0
kitchen version: 1.17.0
inspec version: 1.33.1

Platform Details

Centos 7 on Amazon EC2

Scenario:

converge a cookbook that deploys the chefdk cookbook

Steps to Reproduce:

In a cookbook , add the following
depends 'chefdk' in metadata.rb
include the following recipe
include_recipe 'chefdk::default'

Expected Result:

Successful converge for multiple converges.
The initial converge actually works, subsequent converges with no changes fail

Actual Result:

Recipe: chefdk::default

  • chef_ingredient[chefdk] action install
    Recipe:

    • chef_gem[mixlib-install] action install
      • install version ~> 3.3 of package mixlib-install

    ================================================================================
    Error executing action install on resource 'chef_ingredient[chefdk]'

    NoMethodError

    undefined method `normalize_architecture' for Mixlib::Install::Util:Class

    Cookbook Trace:

    /var/chef/cache/cookbooks/chef-ingredient/libraries/helpers.rb:281:in installer' /var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:99:in configure_from_channel'
    /var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:49:in configure_package' /var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:23:in handle_install'
    /var/chef/cache/cookbooks/chef-ingredient/resources/chef_ingredient.rb:59:in `block in class_from_file'

    Resource Declaration:

    In /var/chef/cache/cookbooks/chefdk/recipes/default.rb

    7: chef_ingredient 'chefdk' do
    8: action :install
    9: version node['chefdk']['version']
    10: channel node['chefdk']['channel']
    11: end

    Compiled Resource:

    Declared in /var/chef/cache/cookbooks/chefdk/recipes/default.rb:7:in `from_file'

    chef_ingredient("chefdk") do
    action [:install]
    default_guard_interpreter :default
    declared_type :chef_ingredient
    cookbook_name "chefdk"
    recipe_name "default"
    version :latest
    channel :current
    product_name "chefdk"
    platform "el"
    platform_version "7"
    architecture "x86_64"
    end

    System Info:

    chef_version=13.2.20
    platform=redhat
    platform_version=7.4
    ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
    program_name=chef-client worker: ppid=18707;start=18:18:28;
    executable=/opt/chefdk/bin/chef-client

@wrightp
Copy link

wrightp commented Aug 11, 2017

This is a known issue with chefdk 2. chefk2 locks mixlib-install to a 2.x version. Even though chef-ingredient installs 3.x it is not installed in the the default gem path.

@holmesb
Copy link

holmesb commented Sep 2, 2017

I'm also getting this, is there any solution\workaround?

@wrightp
Copy link

wrightp commented Sep 11, 2017

Currently chefdk locks down mixlib-install to 2.1.12 due to a version constraint in test-kitchen 1.17 which is what's installed with chefdk 2.1.7. TK 1.18 will include the latest version of mixlib-install and we will be able to update the version constraint of mixlib-install in chefdk.

A long term solution will need to be determined as this issue is likely to occur again as chef-ingredient uses new features of mixlib-install that are not installed as part of the chefdk.

@Defilan
Copy link
Contributor

Defilan commented Sep 11, 2017

@wrightp Thanks for this updated information. Do you know when TK 1.18 is supposed to be released? Is there a dev build available that can be used until 1.18 is officially released?

@wrightp
Copy link

wrightp commented Sep 11, 2017

Community Engineering is currently working on a release. TK master pulls in mixlib-install 3.5. The issue is that chefdk still needs to be released with the next release of TK before it locks down a later version of mixlib-install. I've got my eye on the releases and will push changes when everything is lined up.

@cheeseplus Any update on a TK release?

@akebi
Copy link

akebi commented Sep 18, 2017

thanks for the info @wrightp - run into the same with:
Chef Development Kit Version: 2.2.1
chef-client version: 13.3.42
kitchen version: 1.17.0

with the mixlib version installed on converge
mixlib-install-3.6.0

anyone with a hack/workaround?

@holmesb
Copy link

holmesb commented Sep 18, 2017

"anyone with a hack/workaround? "

Not other than upgrade to the latest 1.x version instead.

@Defilan
Copy link
Contributor

Defilan commented Oct 4, 2017

So unless I'm missing something, even the latest ChefDK "current" build (2.3.5) which includes TK 1.18, also includes 1.17 and its dependency on mixlib-install 2.1.12.

Is there any update as to when these will be totally removed from ChefDK?

Thanks!!

Chef Development Kit Version: 2.3.5
chef-client version: 13.4.24
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)
berks version: 6.3.1
kitchen version: 1.18.0
inspec version: 1.39.1

chef gem list | grep mixlib-install
mixlib-install (3.6.0, 2.1.12)

test-kitchen (1.18.0, 1.17.0)

@thommay
Copy link

thommay commented Oct 4, 2017

[18:23] ~ % chef gem list mixlib-install

*** LOCAL GEMS ***

mixlib-install (2.1.12)
[18:24] ~ % chef --version
Chef Development Kit Version: 2.3.5
chef-client version: 13.4.19
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)
berks version: 6.3.1
kitchen version: 1.17.0
inspec version: 1.39.1

I suspect you've got gems installed locally in ~/.chefdk and that's what you're seeing.
We will be moving to providing test-kitchen 1.18 and the accompanying mixlib-install, but that's not available yet.

@tstuber
Copy link

tstuber commented Nov 3, 2017

Any update on this issue?
Any known work-around? We are facing the same issue...

@wrightp
Copy link

wrightp commented Nov 3, 2017

This is fixed as of chefdk 2.3.9

@wrightp wrightp closed this as completed Nov 3, 2017
@wrightp
Copy link

wrightp commented Nov 3, 2017

To clarify - 2.3.9 was never officially released. This fix can be found in 2.3.17 which is in the current channel. The next chefdk stable release will have the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants