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

Error while installing mariadb repository under Chef 13 #245

Closed
sinfomicien opened this issue Apr 2, 2019 · 1 comment
Closed

Error while installing mariadb repository under Chef 13 #245

sinfomicien opened this issue Apr 2, 2019 · 1 comment
Assignees

Comments

@sinfomicien
Copy link
Contributor

Cookbook version

2.1.0

Chef-client version

13.9.1

Platform Details

Debian 9

Scenario:

I try to configure a mariadb galera cluster (migration from old 1.x version of the cookbook)

Steps to Reproduce:

install a mariadb server with the resource:

mariadb_server_install 'mariadb-10.3-install' do
  version '10.3'
  action [:install, :create]
  setup_repo true
  password 'ASecurePassword'
end

on a Debian 9 OS with chef 13.x

Expected Result:

the repository to be installed

Actual Result:

I know that we support only chef >= 14, but as the fix is easy, i propose it to manage chef 13.
The error is:

RuntimeError
------------
mariadb_client_install[Install MariaDB Client] (/opt/kitchen/cache/cookbooks/mariadb/resources/server_install.rb line 35) had an error: 
RuntimeError: mariadb_repository[Add mariadb.org repository] (/opt/kitchen/cache/cookbooks/mariadb/resources/client_install.rb line 23) had an error:
RuntimeError: Property `apt_repository` of `mariadb_repository[Add mariadb.org repository]` was incorrectly passed a block. Possible property-resource collision.
To call a resource named `apt_repository` either rename the property or else use `declare_resource(:apt_repository, ...)`

Proposed Solution:

rename the property apt_repository used in "repository" resource, to apt_repository_uri. In this case the property won't have the same name as the apt resource, and it works like a charm. Will submit a PR.
I won't add any new tests, as chef 13 will remain unsupported.

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

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