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

Chef >=14 compatibility only? #594

Open
fr33l opened this issue May 27, 2022 · 2 comments
Open

Chef >=14 compatibility only? #594

fr33l opened this issue May 27, 2022 · 2 comments
Assignees

Comments

@fr33l
Copy link

fr33l commented May 27, 2022

Looks like rework in f046999 introduced undump method which requires ruby 2.5+. Chef infra client bundles ruby with it and 13th version has only 2.4.5 ruby.

  • Cookbook version used: 5.9.1
  • Operating system, version, and patch level - Ubuntu 18.04
  • RabbitMQ version provisioned - 3.9.18
  • Erlang version provisioned - 24.3.4-1
  • Chef infra client - 13.12.14
  • RabbitMQ server and client application log files
    ================================================================================
    Error executing action `set_permissions` on resource 'rabbitmq_user[user]'
    ================================================================================
    
    NoMethodError
    -------------
    undefined method `undump' for "\"user\t.*\t.*\t.*\n\"":String
    
    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/rabbitmq/providers/user.rb:86:in `user_has_expected_permissions?'
    /var/chef/cache/cookbooks/rabbitmq/providers/user.rb:129:in `block (2 levels) in class_from_file'
    /var/chef/cache/cookbooks/rabbitmq/providers/user.rb:129:in `reject'
    /var/chef/cache/cookbooks/rabbitmq/providers/user.rb:129:in `block in class_from_file'
    
    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/wrapper_rabbitmq/recipes/default.rb:79:in `block in from_file'
    
    rabbitmq_user("tuser") do
      action [:add, :set_permissions]
      default_guard_interpreter :default
      declared_type :rabbitmq_user
      cookbook_name "test_user
      recipe_name "default"
      vhost "test"
      permissions ".* .* .*"
    end

I suppose it's either bump compat for this cookbook or rework that undump method?

@michaelklishin
Copy link
Member

If you understand how we can rework the method for Ruby 2.4 compat, please submit a PR. Otherwise we can bump compatibility in cookbook's metadata.

@fr33l
Copy link
Author

fr33l commented May 30, 2022

If you understand how we can rework the method for Ruby 2.4 compat,

Unfortunately, I don't.

Otherwise we can bump compatibility in cookbook's metadata.

👍

@fozboz fozboz self-assigned this Dec 18, 2022
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

3 participants